Bug 38549 - docker.io package fails to upgrade when docker is not running
docker.io package fails to upgrade when docker is not running
Status: CLOSED FIXED
Product: UCS
Classification: Unclassified
Component: Docker
UCS 4.0
Other Linux
: P5 normal (vote)
: UCS 4.0-3-errata
Assigned To: Daniel Tröder
Stefan Gohmann
:
: 38737 (view as bug list)
Depends on:
Blocks: 39273
  Show dependency treegraph
 
Reported: 2015-05-15 22:11 CEST by Dirk Wiesenthal
Modified: 2015-09-09 12:51 CEST (History)
4 users (show)

See Also:
What kind of report is it?: ---
What type of bug is this?: ---
Who will be affected by this bug?: ---
How will those affected feel about the bug?: ---
User Pain:
Enterprise Customer affected?:
School Customer affected?:
ISV affected?:
Waiting Support:
Ticket number:
Bug group (optional):
Max CVSS v3 score:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Dirk Wiesenthal univentionstaff 2015-05-15 22:11:08 CEST
It seems like the postinst of docker.io _insists_ on stopping docker when upgrading. If it was not running, the script fails, leaving the package in a (quoting dpkg) "very bad inconsistent state - you should reinstall it before attempting configuration".

Please also have a look why the service was not running. Seems like docker sometimes does not run after a reboot (which then triggers this bug quite easily). Please open a new bug if I am right.
Comment 1 Dirk Wiesenthal univentionstaff 2015-05-15 22:11:28 CEST
Please also fix in docker scope.
Comment 2 Daniel Tröder univentionstaff 2015-08-13 17:32:16 CEST
A patch is coaxed into the packages patch folder to patch the docker init script to not fail on 'stop' if docker was not running…

Commit: 15109
YAML: 62998

Commit 15112 adds the patch to the docker scope for version 1.6.2.
Comment 3 Daniel Tröder univentionstaff 2015-08-26 13:12:27 CEST
The patch was patched to include a fix for the init script, so it works with sysvinit. Error was:

/usr/bin/S20docker not present or not executable ... failed

Patches exist for 4.0-3errata and 4.0-docker-scope

Commit: 15187 for 4.0-3errata (docker-scope patch in this one is broken)
YAML: 63258 for 4.0-3errata


Commit: 15188 for docker-scope
Comment 4 Daniel Tröder univentionstaff 2015-08-27 12:07:11 CEST
Separate bug for 1.6.2 in docker-scope with the same problem but inverse reason: Bug #39273
Comment 5 Daniel Tröder univentionstaff 2015-08-31 15:25:33 CEST
*** Bug 38737 has been marked as a duplicate of this bug. ***
Comment 6 Stefan Gohmann univentionstaff 2015-09-08 08:19:01 CEST
My tests failed. Can you have a look:

root@master401:~# /etc/init.d/docker start
[ ok ] Starting Docker: docker.
root@master401:~# pidof docker
4658
root@master401:~# /etc/init.d/docker stop
[ ok ] Stopping Docker: docker.
root@master401:~# apt-get install --reinstall docker.io
Paketlisten werden gelesen... Fertig
Abhängigkeitsbaum wird aufgebaut.       
Statusinformationen werden eingelesen.... Fertig
0 aktualisiert, 0 neu installiert, 1 erneut installiert, 0 zu entfernen und 0 nicht aktualisiert.
1 nicht vollständig installiert oder entfernt.
Es müssen noch 0 B von 3.712 kB an Archiven heruntergeladen werden.
Nach dieser Operation werden 0 B Plattenplatz zusätzlich benutzt.
(Lese Datenbank ... 97708 Dateien und Verzeichnisse sind derzeit installiert.)
Vorbereitung zum Ersetzen von docker.io 1.3.3~dfsg1-2.14.201508261206 (durch .../docker.io_1.3.3~dfsg1-2.14.201508261206_amd64.deb) ...
[....] Stopping Docker: dockerstart-stop-daemon: warning: failed to kill 4658: No such process
1 pids were not killed
No process in pidfile '/var/run/docker-ssd.pid' found running; none killed.
invoke-rc.d: initscript docker, action "stop" failed.
dpkg: Warnung: Unterprozess altes pre-removal-Skript gab den Fehlerwert 1 zurück
dpkg: stattdessen wird Skript aus dem neuen Paket probiert ...
[....] Stopping Docker: dockerstart-stop-daemon: warning: failed to kill 4658: No such process
1 pids were not killed
No process in pidfile '/var/run/docker-ssd.pid' found running; none killed.
invoke-rc.d: initscript docker, action "stop" failed.
dpkg: Fehler beim Bearbeiten von /var/cache/apt/archives/docker.io_1.3.3~dfsg1-2.14.201508261206_amd64.deb (--unpack):
 Unterprozess neues pre-removal-Skript gab den Fehlerwert 1 zurück
dpkg: Fehler beim Aufräumen:
 Unterprozess installiertes post-installation-Skript gab den Fehlerwert 1 zurück
Fehler traten auf beim Bearbeiten von:
 /var/cache/apt/archives/docker.io_1.3.3~dfsg1-2.14.201508261206_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
root@master401:~#
Comment 7 Daniel Tröder univentionstaff 2015-09-08 15:56:30 CEST
Fixed patches in commit 15239.
YAML (r63519): 2015-08-13-docker.io.yaml
Comment 8 Stefan Gohmann univentionstaff 2015-09-09 06:22:10 CEST
Tests: OK, it works after this upgrade. I think that is sufficient.

YAML: OK
Comment 9 Janek Walkenhorst univentionstaff 2015-09-09 12:51:00 CEST
<http://errata.software-univention.de/ucs/4.0/303.html>