Jump to content
  • 6.12.0-rc7 docker autostart not working


    dsmith44
    • Minor

    None of my docker containers are running after reboot to 6.12.0-rc7, however will start fine if manually started.

     

    This is somewhat a show stopper for 6.12 for me, I haven't tried any of the earlier rc so can't say if this is recent.

     

    Diagnostics attached.

     

     

    unraid-diagnostics-20230609-1219.zip




    User Feedback

    Recommended Comments

    There is some kind of race condition here.

     

    If I add a sleep 10 into the rc.docker script before start_containers then when I disable and re-enable docker then it works.

     

    It is failing is_docker_running due to lack of /var/run/docker.sock

    This appears <2s after start_containers complains that docker isn't running from my testing.

    Link to comment

    I setup an inotify on /var/run and ran a tail of /var/log/syslog

     

    Jun 11 23:06:47 unraid emhttpd: shcmd (362): /etc/rc.d/rc.docker start
    Jun 11 23:06:47 unraid root: starting dockerd ...
    /var/run/ CREATE dockerd.pid
    Jun 11 23:06:47 unraid avahi-daemon[14531]: Server startup complete. Host name is unraid.local. Local service cookie is 39991689.
    Jun 11 23:06:48 unraid avahi-daemon[14531]: Service "unraid" (/services/ssh.service) successfully established.
    Jun 11 23:06:48 unraid avahi-daemon[14531]: Service "unraid" (/services/smb.service) successfully established.
    Jun 11 23:06:48 unraid avahi-daemon[14531]: Service "unraid" (/services/sftp-ssh.service) successfully established.
    Jun 11 23:07:02 unraid root: Docker not running, can't start containers
    /var/run/ CREATE docker.sock

     

    You can see that the CREATE of docker.sock is after start_containers complains docker isn't running.

     

    Looking through rc.docker this puzzles me as wait_daemon is called in start_network so I'm at a bit of a loss

    Link to comment

    So wait_daemon() currently waits up to 15 seconds. If you remove your "sleep 10" and bump wait_daemon() up to 30 does that solve the problem?

    Link to comment
    17 hours ago, ljm42 said:

    So wait_daemon() currently waits up to 15 seconds. If you remove your "sleep 10" and bump wait_daemon() up to 30 does that solve the problem?

     

    Yes that does indeed fix the issue, so I got digging.

     

    I have DOCKER_OPTS set in /boot/config/docker.cfg as per

     

     

    Removing this and problem is solved, and as I no longer need remote access I'm good, however this will bite others potentially.

     

    It's the -H tcp://0.0.0.0:2375 that causes the delay for me, somewhere between 15 and 30s.

     

    Thanks

     

    Link to comment

    Thanks, we modified wait_daemon() to wait up to 30 seconds in the next release.

     

    I'm glad you were able to figure out the source of the delay. Putting an actual IP address rather than 0.0.0.0 may allow this customization to work.

    Link to comment


    Join the conversation

    You can post now and register later. If you have an account, sign in now to post with your account.
    Note: Your post will require moderator approval before it will be visible.

    Guest
    Add a comment...

    ×   Pasted as rich text.   Restore formatting

      Only 75 emoji are allowed.

    ×   Your link has been automatically embedded.   Display as a link instead

    ×   Your previous content has been restored.   Clear editor

    ×   You cannot paste images directly. Upload or insert images from URL.


  • Status Definitions

     

    Open = Under consideration.

     

    Solved = The issue has been resolved.

     

    Solved version = The issue has been resolved in the indicated release version.

     

    Closed = Feedback or opinion better posted on our forum for discussion. Also for reports we cannot reproduce or need more information. In this case just add a comment and we will review it again.

     

    Retest = Please retest in latest release.


    Priority Definitions

     

    Minor = Something not working correctly.

     

    Urgent = Server crash, data loss, or other showstopper.

     

    Annoyance = Doesn't affect functionality but should be fixed.

     

    Other = Announcement or other non-issue.

×
×
  • Create New...