Red Hat Bugzilla – Bug 1324211
deleting a container using hammer silently fails without error
Last modified: 2016-07-27 05:30:56 EDT
Description of problem: deleting a container in hammer is successful but the container is not actually removed from external docker compute resource Version-Release number of selected component (if applicable): Satellite-6.2-beta-snap6.1 How reproducible: Always Steps to Reproduce: 1. Create an external docker compute resource 2. Create a docker container using the external docker computer resource 3. delete the docker container using hammer # hammer -u admin -p changeme docker container list ---|--------------|----------------------------------------------------------------|--------|---------|----------------- ID | NAME | IMAGE REPOSITORY | TAG | COMMAND | COMPUTE RESOURCE ---|--------------|----------------------------------------------------------------|--------|---------|----------------- 5 | container_02 | default_organization-dev1-docker_cv-dockerproduct1-dockerrepo1 | latest | top | docker_cr ---|--------------|----------------------------------------------------------------|--------|---------|----------------- # hammer -u admin -p changeme docker container delete --name container_02 Docker container deleted # hammer -u admin -p changeme docker container list ---|------|------------------|-----|---------|----------------- ID | NAME | IMAGE REPOSITORY | TAG | COMMAND | COMPUTE RESOURCE ---|------|------------------|-----|---------|----------------- Actual results: Hammer delete was successful as shown above. But * Container is still shown as running in Satellite UI * Container is still running in the external docker compute resource Expected results: Container should be removed from Satellite UI too. Container should be removed in external docker compute resource too. Additional info:
Created redmine issue http://projects.theforeman.org/issues/14519 from this bug
Containers deletion does work on the UI but the API is using a different method. I'll create a service so both use the same method for deleting containers - the API was just removing the Foreman object instead of making a delete call to the Docker API
Now under review at https://github.com/theforeman/foreman-docker/pull/154
*** Bug 1266842 has been marked as a duplicate of this bug. ***
Recently merged as https://github.com/theforeman/foreman-docker/commit/bbb77219ca1650d4bbb304ef431a5e4622853c3f
Blocked with https://bugzilla.redhat.com/show_bug.cgi?id=1327320
How is this blocked by https://bugzilla.redhat.com/show_bug.cgi?id=1327320? You can create a container using the hub, delete it using the API and see if it was deleted on the Docker host or not.
Verified in satellite-6.2.0-8.0.beta.el7sat.noarch hammer> docker container delete --name newcontainer_01 Docker container deleted hammer> docker container delete --id 10 Docker container deleted And the external docker host had the containers deleted as well.
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHBA-2016:1501