socket error when running onedev image with podman (OD-983)
bufferUnderrun opened 3 years ago

Hi,

In my journey trying to migrate from debian/docker to nixos/podman, i'm having issue.

Nixos config : i'm running under simple user (non root).

First, i start a podman.socket [OK]

image.png

Then, running the pod [OK]

image_5.png

Issue came when creating a docker executor and testing it [ERROR]

image_3.png

well i don't have docker installed but everything should be fine due to podman alias and full compatible api.

  • Robin Shen commented 3 years ago

    Just tried and it works at my side on Ubuntu. What I am doing:

    1. Open a terminal, and start podman api service:
    systemctl start --user podman.socket
    
    1. Start onedev using same command as yours
    2. Test server docker executor
  • bufferUnderrun commented 3 years ago

    thanks for your help.

    I've just test in a fresh ubuntu server install

    just install podman

    # apt-get install podman
    

    run socket as user

    $ systemctl --user start podman.socket
    

    run onedev

    $ podman run -it --name onedev --rm -v $XDG_RUNTIME_DIR/podman/podman.sock:/var/run/docker.sock -v onedev_data:/opt/onedev -p 6610:6610 -p 6611:6611 docker.io/1dev/server
    

    And another error, maybe i'm doing it wrong ??

    image_6.png

  • bufferUnderrun commented 3 years ago

    hum, back on nixos just after the executor test, the podman.socket failed

    image_7.png

    i'm digging to find where the issue come from...

  • Robin Shen commented 3 years ago

    I am testing on Ubuntu 20.04. What is your ubuntu version?

  • bufferUnderrun commented 3 years ago

    i took the last one, 22.04 with podman 3.4.4.

    With nixos, podman is 4.2.0

  • Robin Shen commented 3 years ago

    Not sure what's wrong at your side. Just started a AWS ubuntu 22.04, follow same steps as yours, and everything works fine.

  • Robin Shen commented 3 years ago

    You may also mount the podman socket as /var/run/docker.sock into a container with docker tool (docker.io/docker for instance), and then inside that container run docker ps to see if it works.

  • bufferUnderrun commented 3 years ago

    Same distro, same commands two results, that's crazy.

    can you confirm :

    • you use the server docker executor in the onedev jobs executor menu without any specific option, just like if it was docker not podman ?
    • just install podman package and not other podman-* ?
    • run podman as normal user ?

    i will try new ubuntu install and see what's happen.

    Remark : i run ubuntu inside virtualbox but it should not have any related problem

  • bufferUnderrun commented 3 years ago

    Could you explain how onedev (docker edition) is doing job executor ?

  • Robin Shen commented 3 years ago

    This is all I have done after lauching a ubuntu 22.04 from AWS:

    $ sudo apt update
    $ sudo apt install -y podman
    $ systemctl --user start podman.socket
    $ mkdir onedev
    $ podman run -it --name onedev --rm -v $XDG_RUNTIME_DIR/podman/podman.sock:/var/run/docker.sock -v $(pwd)/onedev:/opt/onedev -p 6610:6610 -p 6611:6611 docker.io/1dev/server
    

    Then setup OneDev, create a server docker executor, give it a name, with other settings untouched, and test it to be working fine.

  • Robin Shen changed fields 3 years ago
    Name Previous Value Current Value
    Type
    Bug
    Support Request
  • bufferUnderrun commented 3 years ago

    on ubuntu 22.04 on virtualbox (windows underlying host). copy/paste your commands, setup onedev, create docker executor and test it

    always error image_8.png

    i will try on another machine, bare metal...

  • bufferUnderrun commented 3 years ago

    i've test the podman.sock like you've proposed above.

    The podman.sock is working as docker ps inside docker look good image_9.png

  • Robin Shen commented 3 years ago

    Please exec into OneDev container and run some container to see if it works.

  • bufferUnderrun commented 3 years ago

    it works

    image_10.png

  • Robin Shen commented 3 years ago

    Then can you please run the same failed command as printed in build log to see what happens?

  • bufferUnderrun commented 3 years ago

    so the output in onedev docker container (ubuntu server 22.04/virtualbox/windows)

    image_11.png

    Remark: the first command did not return nothing (the filter volume not match any result). without, the onedev container is found

  • Robin Shen commented 3 years ago

    The volume filter is a bug of podman:

    https://github.com/containers/podman/issues/16019

    Maybe here is another bug of podman failing to run container with volume and working directory specified. It will be great if you do some more tests to see what is the difference of your environment and AWS launched environment, and submit a bug report for podman.

  • bufferUnderrun commented 3 years ago

    The hello-world image must not be used for testing purpose as before !!

    When using another, like node, everything works as expected on ubuntu/podman.

    There's still an bug with the podman.socket in nixos. I've report the issue, waiting for help..

  • bufferUnderrun commented 3 years ago

    so, a workaround exists for nixos 22.05. The next nixos 22.11 is already patched.

    Just one last issue : the echo hello world is working but seems to be stuck afterward

    image_14.png

    whereas it should go until busybox ?

    image_15.png

    Same problem when adding a build job in a test projet. The build is running never ending.

    Do you think there is also another bug with podman ?

  • bufferUnderrun changed state to 'Closed' 3 years ago
    Previous Value Current Value
    Open
    Closed
  • bufferUnderrun changed state to 'Open' 3 years ago
    Previous Value Current Value
    Closed
    Open
  • Robin Shen commented 3 years ago

    Seems like another bug of podman. You may check if the container is still running.

  • Robin Shen changed state to 'Closed' 3 years ago
    Previous Value Current Value
    Open
    Closed
  • bufferUnderrun commented 3 years ago

    last update : all bugs fixed in the nixos unstable channel that will be the next stable v22.11.

    thanks.

issue 1/1
Type
Question
Priority
Normal
Assignee
Issue Votes (0)
Watchers (2)
Reference
OD-983
Please wait...
Connection lost or session expired, reload to recover
Page is in error, reload to recover