-
Notifications
You must be signed in to change notification settings - Fork 290
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[FLOC-1194] Add forceable container removal if needed #1753
base: master
Are you sure you want to change the base?
Conversation
@@ -546,7 +546,7 @@ def _blocking_container_runs(self, container_name): | |||
).write() | |||
return result['State']['Running'] | |||
|
|||
def remove(self, unit_name): | |||
def remove(self, unit_name, force=False): |
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.
This method is an implementation of an interface method, IDockerClient.remove
.
- The interface needs to be updated similarly.
- The other implementation needs to be updated similarly.
- The interface-based test suite factory,
make_idockerclient_tests
, needs to have tests for the new functionality added.
Thanks. Please address and re-submit. |
@@ -208,13 +208,14 @@ def exists(unit_name): | |||
otherwise ``False``. | |||
""" | |||
|
|||
def remove(unit_name): | |||
def remove(unit_name, force): |
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.
I'd have thought zope.verify
would have caught this, but the signature in the interface should match the signature in the implementation, so the interface ought to have force=False
.
http://blog.hashbangbash.com/2014/11/docker-devicemapper-fix-for-device-or-resource-busy-ebusy/ seems to describe the problem and the fix. Do we know if any of our supported Distros implement the suggested fix in their systemd / upstart units? @binocarlos tells me that Docker on Ubuntu uses AUFs by default if the kernel module is detected; exactly because of this device mapper issue. Although judging by the @dwgebler 's other link (moby/moby#9665) the problem also occurs with AUFs. I'm not convinced about the I also notice that docker API 1.19 has a I don't really know what to say. I think I'll reject this so that we can discuss it further. |
Has anyone tested this: ...work around? Start another container for the same image then remove the old container. |
I didn't try that one - As per the discussion we were just having in the office, supporting a more up-to-date Docker, i.e. 1.7 and 1.19 API might also be a good thing to start thinking about at this time. |
Can someone verify this PR? |
This PR has been around for a while. Maybe we should close it for now? |
Probably fixes FLOC-1194 by allowing the affected test to force container removal during cleanup.