On 2018-12-29 Olaf Meeuwissen wrote:

> On 2018-11-12, Olaf Meeuwissen wrote:
>
>> [...]
>>
>> When upgrading a package that provides a daemon, I expect the upgrade to
>> shut down the daemon provided by the old version and start the one from
>> the new version.  I do not want anything to "muck" with that, be that
>> daemontools or anything else.
>> Keeping an otherwise running daemon running is a different story.
>>
>> I checked to /var/lib/dpkg/info/docker-ce.{prerm,postinst} scripts.  For
>> 18.06.1~ce~3-0~debian these include calls to invoke-rc.d to stop and
>> start the daemon.  As of 5:18.09.0~3-0~debian-stretch these calls are
>> gone.  The only stop/start mechanism supported is systemd :-(
>> Ditto for containerd.io :-(
>>
>> FWIW, I've submitted https://github.com/docker/for-linux/issues/482
>
> I've been working with upstream and submitted a patch a couple of days
> ago.  Yesterday that patch was merged onto the 18.09 branch and cherry
> picked on the master branch of docker-ce-packaging.  The next release
> of the docker-ce package should have working sysvinit support again.

The next release is out (5:18.09.1~3-0~debian-stretch) and the upgrade
didn't quite go as smoothly as I had hoped for :-/

# But then again, upstream merged my changes before I thoroughly tested
# them ;-)

Before upgrading, you should stop a running Docker Engine.  You can do
so with

  $ sudo invoke-rc.d docker stop

Please note that this will take down any running containers.

If you happened to apt upgrade before doing so, you'll see something
like the following:

  $ sudo apt upgrade
  [...]
  Preparing to unpack .../docker-ce_5%3a18.09.1~3-0~debian-stretch_amd64.deb ...
  Unpacking docker-ce (5:18.09.1~3-0~debian-stretch) over 
(5:18.09.0~3-0~debian-stretch) ...
  Setting up containerd.io (1.2.2-1) ...
  Processing triggers for man-db (2.7.6.1-2) ...
  Setting up docker-ce-cli (5:18.09.1~3-0~debian-stretch) ...
  Setting up docker-ce (5:18.09.1~3-0~debian-stretch) ...
  update-alternatives: using /usr/bin/dockerd-ce to provide /usr/bin/dockerd 
(dockerd) in auto mode
  [....] Starting Docker: dockerinvoke-rc.d: initscript docker, action "start" 
failed.
  dpkg: error processing package docker-ce (--configure):
   subprocess installed post-installation script returned error exit status 1
  Errors were encountered while processing:
   docker-ce

Fixing up isn't very difficult.  Just stop the daemon and configure any
pending packages, like so:

  $ sudo invoke-rc.d docker stop
  $ sudo dpkg --configure --pending

After the upgrade, start the daemon again with:

  $ sudo invoke-rc.d docker start

Whether or not containers that were running before you stopped the
daemon will be restarted depends on their restart policy.

Hope this helps,
--
Olaf Meeuwissen, LPIC-2            FSF Associate Member since 2004-01-27
 GnuPG key: F84A2DD9/B3C0 2F47 EA19 64F4 9F13  F43E B8A4 A88A F84A 2DD9
 Support Free Software                        https://my.fsf.org/donate
 Join the Free Software Foundation              https://my.fsf.org/join
_______________________________________________
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng

Reply via email to