Docker registry doesn't stay up and keeps restarting
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
linux (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned | ||
Eoan |
Fix Released
|
Undecided
|
Unassigned | ||
Focal |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
[Impact]
The change applied for bug 1857257 and its followup fix bug 1876645, which were released on focal and eoan -updates, introduced a regression on overlayfs, breaking docker snap.
[Test case]
See original bug report.
[Fix]
While we don't have a final fix the solution for now is to revert the following commits:
UBUNTU: SAUCE: overlayfs: fix shitfs special-casing
UBUNTU: SAUCE: overlayfs: use shiftfs hacks only with shiftfs as underlay
[Regression potential]
Low. Reverting these two commits will introduce back the issue reported on bug 1857257, but will fix the other use cases which was broken by the latest release.
Original bug report.
-------
Tested kernels:
Focal 5.4.0-31.35
Eoan 5.3.0-53.47
To reproduce:
1) Spin up a cloud image
2) snap install docker
3) auth_folder=
4) mkdir -p $auth_folder
5) docker run --entrypoint htpasswd registry:2 -Bbn user passwd > $auth_folder/
6) docker run -d -p 5000:5000 --restart=always --name registry \
-v $auth_folder:/auth \
-e "REGISTRY_
-e "REGISTRY_
-e REGISTRY_
registry:2
On a good kernel 'docker ps' shows something like:
# docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
a346b65b4509 registry:2 "/entrypoint.sh /etc…" 14 seconds ago Up 12 seconds 0.0.0.0:
On a bad kernel:
docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
0322374f1b1d registry:2 "/entrypoint.sh /etc…" 5 seconds ago Restarting (2) 1 second ago registry
Note status 'Restarting' on the bad kernel.
This seems to be introduce by any of the following commits:
b3bdda24f1bc UBUNTU: SAUCE: overlayfs: fix shitfs special-casing
6f18a8434050 UBUNTU: SAUCE: overlayfs: use shiftfs hacks only with shiftfs as underlay
629edd70891c UBUNTU: SAUCE: shiftfs: record correct creator credentials
cfaa482afb97 UBUNTU: SAUCE: shiftfs: fix dentry revalidation
Kernels that don't have these commits seem fine.
CVE References
description: | updated |
Changed in linux (Ubuntu Eoan): | |
status: | Incomplete → Confirmed |
Changed in linux (Ubuntu Focal): | |
status: | Incomplete → Confirmed |
Changed in linux (Ubuntu Eoan): | |
status: | Confirmed → In Progress |
Changed in linux (Ubuntu Focal): | |
status: | Confirmed → In Progress |
description: | updated |
Changed in linux (Ubuntu Eoan): | |
status: | In Progress → Fix Committed |
Changed in linux (Ubuntu Focal): | |
status: | In Progress → Fix Committed |
This bug is missing log files that will aid in diagnosing the problem. While running an Ubuntu kernel (not a mainline or third-party kernel) please enter the following command in a terminal window:
apport-collect 1879690
and then change the status of the bug to 'Confirmed'.
If, due to the nature of the issue you have encountered, you are unable to run this command, please add a comment stating that fact and change the bug status to 'Confirmed'.
This change has been made by an automated script, maintained by the Ubuntu Kernel Team.