No option to configure docker.io for restart on package upgrade

Bug #1784602 reported by Tom Haddon
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
docker.io (Ubuntu)
Fix Released
Undecided
Unassigned
Xenial
Fix Released
Undecided
Unassigned
Bionic
Fix Released
Undecided
Unassigned

Bug Description

[impact]
docker.io now prompts on upgrade as to whether to restart, which is an improvement, but there is no way to decide ahead of time for a non-interactive upgrade.

[test case]
# apt-get install docker.io
# pgrep dockerd
# dpkg-reconfigure docker.io
< this will only ask a question once the package from proposed is installed >
< choose yes >
# DEBIAN_FRONTEND=noninteractive apt-get install --reinstall docker.io
# pgrep dockerd
< check dockerd has restarted >
# dpkg-reconfigure docker.io
< choose no >
# DEBIAN_FRONTEND=noninteractive apt-get install --reinstall docker.io
# pgrep dockerd
< check dockerd has not restarted>

[regression potential]
The change implementing this clearly only affects install/upgrade scenarios: https://github.com/tianon/debian-docker/commit/4bc8afa9594ca51d2707cfbf0cc682e68b215c68. The test case above covers these.

Also we don't care much about regressions in docker.io! https://wiki.ubuntu.com/DockerUpdates

[original description]

Currently if I run "dpkg-reconfigure docker.io" it doesn't present me with any option to restart the package on upgrade. Looking at the debian post install file, it should, and lp#1668621 suggests it should.

ProblemType: Bug
DistroRelease: Ubuntu 16.04
Package: docker.io 17.03.2-0ubuntu2~16.04.1
ProcVersionSignature: User Name 4.15.0-29.31-generic 4.15.18
Uname: Linux 4.15.0-29-generic x86_64
ApportVersion: 2.20.1-0ubuntu2.18
Architecture: amd64
Date: Tue Jul 31 10:15:21 2018
ProcEnviron:
 TERM=xterm-256color
 PATH=(custom, no user)
 XDG_RUNTIME_DIR=<set>
 LANG=en_US.UTF-8
 SHELL=/bin/bash
SourcePackage: docker.io
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
Tom Haddon (mthaddon) wrote :
Revision history for this message
Michael Hudson-Doyle (mwhudson) wrote :

After chatting, I think the underlying question is how to decide the answer to the restart question when the upgrade is going to be done non-interactively -- and I don't really know the answer to that. Maybe it involves debconf-set-selections?

Revision history for this message
Tianon Gravi (tianon) wrote :

I can confirm this behavior -- there's a bug in the postinst script where it makes sure we don't restart the daemon during "dpkg-reconfigure" (since that should only happen during install/upgrade), but instead it also stops us from prompting during "dpkg-reconfigure", which isn't right.

I think we need to move the check for "dpkg-reconfigure" slightly further inward to only apply to the actual restart event so that we still prompt (and can thus configure non-interactive installs appropriately).

Revision history for this message
Tianon Gravi (tianon) wrote :

Proposed patch attached -- I've tested that this:

1. does not prompt on initial install (but does start the daemon)
2. does prompt on every reinstall / upgrade (if the daemon is running)
3. does prompt during "dpkg-reconfigure docker.io" (but does _not_ [re]start the daemon)
4. works properly with DEBIAN_FRONTEND=noninteractive -- user's previous/stored answer to the question automatically applies with no prompt

Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

The attachment "prompt-during-reconfigure.patch" seems to be a patch. If it isn't, please remove the "patch" flag from the attachment, remove the "patch" tag, and if you are a member of the ~ubuntu-reviewers, unsubscribe the team.

[This is an automated message performed by a Launchpad user owned by ~brian-murray, for any issues please contact him.]

tags: added: patch
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package docker.io - 18.06.1-0ubuntu1

---------------
docker.io (18.06.1-0ubuntu1) cosmic; urgency=medium

  * Update to 18.06.1 upstream release (LP: #1794396)
    - drop "fix-btrfs-constants.patch" (applied upstream)
  * Update debconf to prompt more aggressively (LP: #1784602)
    1. does not prompt on initial install (but does start the daemon)
    2. does prompt on every reinstall / upgrade (if the daemon is running)
    3. does prompt during "dpkg-reconfigure docker.io" (but does _not_
       [re]start the daemon)
    4. works properly with DEBIAN_FRONTEND=noninteractive -- user's
       previous/stored answer to the question automatically applies with no
       prompt
  * Check if "docker" group exists before creating it (LP: #1769911)

 -- Tianon Gravi <email address hidden> Mon, 24 Sep 2018 15:42:19 -0700

Changed in docker.io (Ubuntu):
status: New → Fix Released
Changed in docker.io (Ubuntu Xenial):
status: New → Incomplete
status: Incomplete → Fix Committed
Changed in docker.io (Ubuntu Bionic):
status: New → Fix Committed
Changed in docker.io (Ubuntu Xenial):
status: Fix Committed → In Progress
status: In Progress → Triaged
description: updated
description: updated
description: updated
description: updated
Revision history for this message
Brian Murray (brian-murray) wrote : Please test proposed package

Hello Tom, or anyone else affected,

Accepted docker.io into xenial-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/docker.io/18.06.1-0ubuntu1~16.04.1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested and change the tag from verification-needed-xenial to verification-done-xenial. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-xenial. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Changed in docker.io (Ubuntu Bionic):
status: Fix Committed → Fix Released
Changed in docker.io (Ubuntu Xenial):
status: Triaged → Fix Committed
tags: added: verification-needed verification-needed-xenial
tags: added: verification-done-xenial
removed: verification-needed verification-needed-xenial
Revision history for this message
Brian Murray (brian-murray) wrote :

Hello Tom, or anyone else affected,

Accepted docker.io into xenial-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/docker.io/18.06.1-0ubuntu1~16.04.2 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested and change the tag from verification-needed-xenial to verification-done-xenial. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-xenial. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

tags: added: verification-needed verification-needed-xenial
removed: verification-done-xenial
tags: added: verification-done-xenial
removed: verification-needed verification-needed-xenial
Revision history for this message
Łukasz Zemczak (sil2100) wrote : Update Released

The verification of the Stable Release Update for docker.io has completed successfully and the package has now been released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package docker.io - 18.06.1-0ubuntu1~16.04.2

---------------
docker.io (18.06.1-0ubuntu1~16.04.2) xenial; urgency=medium

  * d/tests/docker-in-lxd: Increase timeout passed to lxd waitready.

docker.io (18.06.1-0ubuntu1~16.04.1) xenial; urgency=medium

  * Backport to Xenial (LP: #1794396). Includes fixes for
    - "No option to configure docker.io for restart on package upgrade"
      (LP: #1784602)
    - "docker.io install fails when docker group exists" (LP: #1769911)
  * Revert "Let dh_systemd install .service file: replace .install file entry
    with symlink".
  * Build with the freshly backported golang-1.10-go package.
  * Relax the build dependency on debhelper.
  * Build depend on btrfs-tools, not libbtrfs-dev or btrfs-progs.
  * Re-add build-depends on dh-systemd.

 -- Michael Hudson-Doyle <email address hidden> Mon, 12 Nov 2018 10:53:22 +1300

Changed in docker.io (Ubuntu Xenial):
status: Fix Committed → Fix Released
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.