Bug 50261 - Fix update to UCS 4.4-2 issue with docker packages
Fix update to UCS 4.4-2 issue with docker packages
Status: CLOSED FIXED
Product: UCS
Classification: Unclassified
Component: Docker
UCS 4.4
Other Linux
: P5 normal (vote)
: ---
Assigned To: Johannes Keiser
Dirk Wiesenthal
:
Depends on: 50166
Blocks:
  Show dependency treegraph
 
Reported: 2019-09-25 10:08 CEST by Erik Damrose
Modified: 2019-11-19 13:16 CET (History)
14 users (show)

See Also:
What kind of report is it?: Development Internal
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:
Flags outvoted (downgraded) after PO Review:
Ticket number: 2019092421000927
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 Erik Damrose univentionstaff 2019-09-25 10:08:42 CEST
At bug #50259 we blocked the update to UCS 4.4-2 due to an issue with the docker packages.

In https://help.univention.com/t/13088 and Ticket#2019092421000927 the update to UCS 4.4-2 fails.

At this bug a fix will be developed. The preup block should be removed as well.
Comment 1 Nico Stöckigt univentionstaff 2019-09-30 10:46:24 CEST
Information about the initial UCS Version and installed Apps can be found on Ticket#2019092421000927.
Comment 2 Philipp Hahn univentionstaff 2019-09-30 11:05:45 CEST
I just upgraded a UCS-4.0 system to 4.4-2; UCS-4.0 uses a 3.16 kernel, which did not yet have "overlayfs", but used "aufs" from Debian. Only with UCS-4.1 we switched to linux-4.1, which supports "overlay".
The default was changed with Bug #40515.
So any system setup before UCS-4.1 should be affected.
Comment 3 Nico Gulden univentionstaff 2019-10-07 09:58:02 CEST
We should fix this issue quite soon to allow administrators to upgrade to 4.4-2, because according to our maintenance life cycle 4.4-1 will stop to receive updates at beginning of November 2019. See https://help.univention.com/t//13088/10
Comment 4 Dirk Wiesenthal univentionstaff 2019-10-10 14:49:04 CEST
Suggested approach:

check "docker info" or "ucr get docker/daemon/default/opts/storage-driver"

if != "overlay"
  cancel update

mv /var/lib/docker/aufs /var/lib/docker/aufs.bak
mv /var/lib/docker/devicemapper /var/lib/docker/devicemapper.bak

proceed with univention-upgrade
Comment 5 Philipp Hahn univentionstaff 2019-10-10 15:17:16 CEST
(In reply to Dirk Wiesenthal from comment #4)
> Suggested approach:
> 
> check "docker info" or "ucr get docker/daemon/default/opts/storage-driver"
> 
> if != "overlay"
>   cancel update
> 
> mv /var/lib/docker/aufs /var/lib/docker/aufs.bak

[ -d /var/lib/docker/aufs ] && find /var/lib/docker/aufs -type d -empty -delete
[ -d /var/lib/docker/aufs ] && mv /var/lib/docker/aufs /var/lib/docker/aufs.moved-by-ucs4.4-2-upgrade

> mv /var/lib/docker/devicemapper /var/lib/docker/devicemapper.bak

dito?

> proceed with univention-upgrade
Comment 6 Johannes Keiser univentionstaff 2019-10-11 18:14:01 CEST
585c94ec64 Bug #50261: check current docker storage driver and abort upgrade if not 'overlay'

preup.sh uploaded to test_mirror
Comment 7 Dirk Wiesenthal univentionstaff 2019-10-17 11:15:34 CEST
Works as expected.

REOPENED for minor wording issues and copying it to the live server eventually
Comment 8 Johannes Keiser univentionstaff 2019-10-17 13:43:42 CEST
dfe8bfa222 Bug #50261: adjust error message for wrong docker storage driver

no changelog/build needed

copied preup.sh and preup.sh.gpg to
/var/univention/buildsystem2/mirror/ftp/4.4/maintained/4.4-2/all/
Comment 9 Dirk Wiesenthal univentionstaff 2019-10-17 13:47:56 CEST
Update from 4.0 to 4.4 w/ App: OK
Update from 4.0 to 4.4 w/o App: OK
Update from 4.0 to 4.4 w/ wrong storage driver: OK
Update from 4.0 to 4.4 w/o running docker service: OK
Update from 4.3 to 4.4 w/ App: OK
Update from 4.3 to 4.4 w/o App: OK
Wording: OK
Comment 10 Johannes Keiser univentionstaff 2019-10-21 12:01:02 CEST
3125ad036a Bug #50261: link to sdb article

copied to {test_}mirror
synced to extern

SDB article
https://help.univention.com/t/problem-upgrade-to-ucs-4-4-2-is-blocked-due-to-docker-storage/13368
Comment 11 Moritz Bunkus 2019-10-21 12:08:00 CEST
With all due respect, that support article is lacking on important details:

> Changing the storage driver causes docker to not find previously created containers anymore since the location where container data is stored changed. To keep them they have to be migrated.

_How_ are users supposed to migrate the containers? At the moment this sounds like "well, your installed Docker apps will be buggered; tough luck". That's not a solution.
Comment 12 Mathieu Simon 2019-10-21 22:02:30 CEST
Hi

While the applied fixes and docs should now allow updating docker-free systems from 4.4-1 to 4.4-2, I do share the concerns expressed by Moritz. The workaround procedure should definitely show how to migrate the docker containers and be a bit more explicit on how it impact dockerized applications.

Also this is issue is something that should should be part of an update to the release notes of 4.4-2. System administrators and service provides do actually read them and use them for preparation during release upgrades.

Also please consider sharing an update on how this blocker affects the end of maintenance for 4.4-1.

-- Mathieu
Comment 13 Dirk Wiesenthal univentionstaff 2019-10-22 00:37:00 CEST
(In reply to Moritz Bunkus from comment #11)
> _How_ are users supposed to migrate the containers? At the moment this
> sounds like "well, your installed Docker apps will be buggered; tough luck".
> That's not a solution.

(In reply to Mathieu Simon from comment #12)
> Hi
> 
> While the applied fixes and docs should now allow updating docker-free
> systems from 4.4-1 to 4.4-2, I do share the concerns expressed by Moritz.
> The workaround procedure should definitely show how to migrate the docker
> containers and be a bit more explicit on how it impact dockerized
> applications.

We released this fix in the preup.sh so that users can now update to 4.4-2 where it was blocked before. The accompanying article does not provide an extensive solution.

The link to the article is shown in UCS if the docker daemon of the 4.4-1 system does have a configured storage driver other than "overlay".

We assumed the number of systems to be rather low compared to the systems that were blocked from the update prior to this change.

May I ask, is any of your systems affected? If so, what storage driver do you / did you use? Do you use any App Center Apps? Which other Docker Containers are running?

As any "untouched" UCS 4.4-1 uses overlay, any other scenario should involve some kind of "custom setup". While we do allow admins to customize their systems, of course, we are reluctant to offer a "one size fits all" migration guide for these setups.

We will gladly update the current article with our findings if you could provide us some insights in what you are using.

Migrating the containers should not be too difficult. Stopping them and reinitializing them after the daemon restart should be enough (needs re-pulling). It is the data that may be problematic. Did you use a volume (-v myvolume:/data)? Then everything should be in place after the service restart.

But as we do not know your setup, we have not yet written anything in the article.

> 
> Also this is issue is something that should should be part of an update to
> the release notes of 4.4-2. System administrators and service provides do
> actually read them and use them for preparation during release upgrades.
> 

That is a good point. We will talk about this.

> Also please consider sharing an update on how this blocker affects the end
> of maintenance for 4.4-1.
> 

We are currently discussing how to approach this, yes.
Comment 14 Mathieu Simon 2019-10-22 08:38:29 CEST
Hi Dirk

Not speaking for Moritz but only for my use case:

> We released this fix in the preup.sh so that users can now update to 4.4-2
> where it was blocked before. The accompanying article does not provide an
> extensive solution.
That's fine.

> The link to the article is shown in UCS if the docker daemon of the 4.4-1
> system does have a configured storage driver other than "overlay".
> 
> We assumed the number of systems to be rather low compared to the systems
> that were blocked from the update prior to this change.
It could be useful to check with your statistics you get via the free users, but it may not be representative.

> May I ask, is any of your systems affected? If so, what storage driver do
> you / did you use? Do you use any App Center Apps? Which other Docker
> Containers are running?
Our systems all use the default overlay storage driver so we're not affected.

If overlay was and is the supported and expected configuration, then this should be outlined in the article. Our systems were updated since the early 2.4 days but they have all the same settings.
 
I think the point is to give some reassuring words. If i.e. the git history shows that overlay was always the default, highligt this. Maybe for enterprise customers something along the line of the following could be helpful: "the default storage driver is and has been "overlay", if in some rare circumstances you've changed it to something different, please contact Univention support for further assistance".

I know plenty examples with another large open source vendor whose KB mentions similar wordings for rare and specific issues that may need case-by-case decision and hence the recommendation is to log a support case referencing the given KB article. Then they ask you for specific environment information and a plan to action is formulated.

Also thanks for your update concerning updating the release notes EoL of 4.4-1.

Regards
Mathieu
Comment 15 Dirk Wiesenthal univentionstaff 2019-10-29 10:50:22 CET
Released updated preup.sh
Comment 16 Nico Gulden univentionstaff 2019-11-06 12:46:50 CET
FYI: Because of this update issue and the necessary time to fix it, we have decided to postpone the end of security maintenance for UCS 4.4-1 until 03. Dec. 2019.