Since migrating to systemd, docker service doesn't work due to bad unit file

Bug #1688300 reported by Daniel Mellado
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
devstack
Fix Released
Undecided
Daniel Mellado
kuryr-kubernetes
Fix Released
Undecided
Daniel Mellado

Bug Description

Since migrating to systemd, if docker service is on local.conf

enable_service docker

This creates a unit file in such way that it has 'sudo' on the ExecStart and won't run giving out the following errors:

May 04 12:13:19 devstack systemd[1]: [/<email address hidden>:6] Executable path is not absolute, ignoring: sudo /usr/bin/docker daemon --debug=true -H unix:/
May 04 12:13:19 devstack systemd[1]: <email address hidden>: Service lacks both ExecStart= and ExecStop= setting. Refusing.

Changing the original file created by devstack:

[Unit]
Description=Devstack <email address hidden>

[Service]
ExecStart=sudo /usr/bin/docker daemon --debug=true -H unix:///var/run/docker.sock
User=stack

[Install]
WantedBy=multi-user.target
----
for this updated one
----

[Unit]
Description=Devstack <email address hidden>

[Service]
ExecStart=/usr/bin/dockerd --debug=true -H unix:///var/run/docker.sock
ExecReload=/bin/kill -s HUP $MAINPID

[Install]
WantedBy=multi-user.target

Which comes from:

https://github.com/moby/moby/tree/master/contrib/init/systemd

Makes it work as expected.

Changed in devstack:
assignee: nobody → Daniel Mellado (daniel-mellado)
Changed in kuryr-kubernetes:
assignee: nobody → Daniel Mellado (daniel-mellado)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to kuryr-kubernetes (master)

Fix proposed to branch: master
Review: https://review.openstack.org/462578

Changed in kuryr-kubernetes:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to kuryr-kubernetes (master)

Reviewed: https://review.openstack.org/462578
Committed: https://git.openstack.org/cgit/openstack/kuryr-kubernetes/commit/?id=79051f384c761342d059638d4595eb6707ac18f4
Submitter: Jenkins
Branch: master

commit 79051f384c761342d059638d4595eb6707ac18f4
Author: Daniel Mellado <email address hidden>
Date: Thu May 4 14:33:48 2017 +0000

    Fix kuryr devstack systemd unit file issues

    This commit fixes several unit file related issues on kuryr devstack
    plugin.

    - drops 'sudo' from Execstart
    - adds full path to commands in order to avoid unit file issues
    - handles dockerd path
    - wraps run_process to use root user instead of stack

    Change-Id: If585d3f33eed5e7488212157a763d217a7b7c4bd
    Co-Authored-By: Frederick F. Kautz IV <email address hidden>
    Closes-Bug:1688300
    Closes-Bug:1688346

Changed in kuryr-kubernetes:
status: In Progress → Fix Released
Sean Dague (sdague)
Changed in devstack:
status: New → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/kuryr-kubernetes 0.2.0

This issue was fixed in the openstack/kuryr-kubernetes 0.2.0 release.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.