Public bug reported:

When installing docker-registry individually in a machine, it works well
and the service can be started with systemd. But trying to enable it for
boot time with

~# systemctl enable docker-registry

does not work. Also, when searching for it in the unit list, it shows as
"static"

~# systemctl list-unit-files

UNIT FILE                                  STATE
proc-sys-fs-binfmt_misc.automount          static
...
docker-registry.service                    static
...

The only solution I found so far is to set the service as a desired one
for multi-user.target.wants, by creating a symlink like

~# ln -s /lib/systemd/system/docker-registry.service /etc/systemd/system
/multi-user.target.wants/docker-registry.service

Also, it seems to be an error in the /etc/init/docker-registry.conf
upstart script, showing a duplicate "/etc" component path in the CONFIG
variable

description "the Docker toolset to pack, ship, store, and deliver
content"

start on local-filesystems
stop on runlevel [!2345]

respawn

setuid docker-registry

script
 BINARY=/usr/bin/$UPSTART_JOB
 CONFIG=/etc/etc/docker/registry/config.yml
 if [ -f /etc/default/$UPSTART_JOB ]; then
  . /etc/default/$UPSTART_JOB
 fi
 exec "$BINARY" "$CONFIG"
end script

# vim:set ft=upstart:

** Affects: docker-registry (Ubuntu)
     Importance: Undecided
         Status: New

** Description changed:

  When installing docker-registry individually in a machine, it works well
  and the service can be started with systemd. But trying to enable it for
  boot time with
  
  ~# systemctl enable docker-registry
  
  does not work. Also, when searching for it in the unit list, it shows as
  "static"
  
  ~# systemctl list-unit-files
  
- UNIT FILE                                  STATE   
+ UNIT FILE                                  STATE
  proc-sys-fs-binfmt_misc.automount          static
  ...
  docker-registry.service                    static
  ...
  
  The only solution I found so far is to set the service as a desired one
  for multi-user.target.wants, by creating a symlink like
  
  ~# ln -s /lib/systemd/system/docker-registry.service /etc/systemd/system
  /multi-user.target.wants/docker-registry.service
  
  Also, it seems to be an error in the /etc/init/docker-registry.conf
- startup script, showing a duplicate "/etc" component path in the CONFIG
+ upstart script, showing a duplicate "/etc" component path in the CONFIG
  variable
  
- 
- description "the Docker toolset to pack, ship, store, and deliver content"
+ description "the Docker toolset to pack, ship, store, and deliver
+ content"
  
  start on local-filesystems
  stop on runlevel [!2345]
  
  respawn
  
  setuid docker-registry
  
  script
-       BINARY=/usr/bin/$UPSTART_JOB
-       CONFIG=/etc/etc/docker/registry/config.yml
-       if [ -f /etc/default/$UPSTART_JOB ]; then
-               . /etc/default/$UPSTART_JOB
-       fi
-       exec "$BINARY" "$CONFIG"
+  BINARY=/usr/bin/$UPSTART_JOB
+  CONFIG=/etc/etc/docker/registry/config.yml
+  if [ -f /etc/default/$UPSTART_JOB ]; then
+   . /etc/default/$UPSTART_JOB
+  fi
+  exec "$BINARY" "$CONFIG"
  end script
  
  # vim:set ft=upstart:

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1749406

Title:
  Systemd init scripts not working for docker-registry

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/docker-registry/+bug/1749406/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to