-
Notifications
You must be signed in to change notification settings - Fork 425
[18.09 backport] Windows: DetachVhd attempt in cleanup #113
[18.09 backport] Windows: DetachVhd attempt in cleanup #113
Conversation
Signed-off-by: John Howard <jhoward@microsoft.com> This is a fix for a few related scenarios where it's impossible to remove layers or containers until the host is rebooted. Generally (or at least easiest to repro) through a forced daemon kill while a container is running. Possibly slightly worse than that, as following a host reboot, the scratch layer would possibly be leaked and left on disk under the dataroot\windowsfilter directory after the container is removed. One such example of a failure: 1. run a long running container with the --rm flag docker run --rm -d --name test microsoft/windowsservercore powershell sleep 30 2. Force kill the daemon not allowing it to cleanup. Simulates a crash or a host power-cycle. 3. (re-)Start daemon 4. docker ps -a PS C:\control> docker ps -a CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 7aff773d782b malloc "powershell start-sl…" 11 seconds ago Removal In Progress malloc 5. Try to remove PS C:\control> docker rm 7aff Error response from daemon: container 7aff773d782bbf35d95095369ffcb170b7b8f0e6f8f65d5aff42abf61234855d: driver "windowsfilter" failed to remove root filesystem: rename C:\control\windowsfilter\7aff773d782bbf35d95095369ffcb170b7b8f0e6f8f65d5aff42abf61234855d C:\control\windowsfilter\7aff773d782bbf35d95095369ffcb170b7b8f0e6f8f65d5aff42abf61234855d-removing: Access is denied. PS C:\control> Step 5 fails. (cherry picked from commit efdad53) Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
ping @jhowardmsft |
@thaJeztah LGTM (not a maintainer), assuming this repo already has the required go-winio revendor with the new function call. Will this also hit EE? EDIT: NVM - just saw your comment about not needing the go-winio fix |
Yes; during the time that CE is supported, the EE repository is kept in sync with the CE repository. After 6 months (when the next CE version is released, and 18.09 CE reaches EOL), backported to 18.09 EE will be done in the private EE repository (EE has a longer support - 24 months) |
1 similar comment
Yes; during the time that CE is supported, the EE repository is kept in sync with the CE repository. After 6 months (when the next CE version is released, and 18.09 CE reaches EOL), backported to 18.09 EE will be done in the private EE repository (EE has a longer support - 24 months) |
Flaky test; https://jenkins.dockerproject.org/job/Docker-PRs/51701/console This test once was flaky on PowerPC (moby#23626), but now seeing it flaky again on other platforms
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
backport of moby#37712 for 18.09
fixes moby#36218 for 18.09
first commit was skipped, as the go-winio version was already bumped to v0.4.11 in #75
This is a fix for a few related scenarios where it's impossible to remove layers or containers
until the host is rebooted. Generally (or at least easiest to repro) through a forced daemon kill
while a container is running.
Possibly slightly worse than that, as following a host reboot, the scratch layer would possibly be leaked and
left on disk under the dataroot\windowsfilter directory after the container is removed.
One such example of a failure:
docker run --rm -d --name test microsoft/windowsservercore powershell sleep 30
PS C:\control> docker ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
7aff773d782b malloc "powershell start-sl…" 11 seconds ago Removal In Progress malloc
PS C:\control> docker rm 7aff
Error response from daemon: container 7aff773d782bbf35d95095369ffcb170b7b8f0e6f8f65d5aff42abf61234855d: driver "windowsfilter" failed to remove root filesystem: rename C:\control\windowsfilter\7aff773d782bbf35d95095369ffcb170b7b8f0e6f8f65d5aff42abf61234855d C:\control\windowsfilter\7aff773d782bbf35d95095369ffcb170b7b8f0e6f8f65d5aff42abf61234855d-removing: Access is denied.
PS C:\control>
Step 5 fails.
(cherry picked from commit efdad53)
Signed-off-by: Sebastiaan van Stijn github@gone.nl
- What I did
- How I did it
- How to verify it
- Description for the changelog
- A picture of a cute animal (not mandatory but encouraged)