Bug 1324211 - deleting a container using hammer silently fails without error
Summary: deleting a container using hammer silently fails without error
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Container Management
Version: 6.2.0
Hardware: Unspecified
OS: Unspecified
high vote
Target Milestone: Unspecified
Assignee: Daniel Lobato Garcia
QA Contact: sthirugn@redhat.com
URL: http://projects.theforeman.org/issues...
: 1266842 (view as bug list)
Depends On: 1327320
TreeView+ depends on / blocked
Reported: 2016-04-05 20:23 UTC by sthirugn@redhat.com
Modified: 2020-01-17 15:42 UTC (History)
3 users (show)

Fixed In Version: rubygem-foreman_docker-
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2016-07-27 09:30:56 UTC
Target Upstream Version:

Attachments (Terms of Use)

System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 1318275 1 None None None 2021-01-20 06:05:38 UTC
Red Hat Product Errata RHBA-2016:1501 0 normal SHIPPED_LIVE Red Hat Satellite 6.2 Capsule and Server 2016-07-27 12:28:58 UTC

Internal Links: 1318275

Description sthirugn@redhat.com 2016-04-05 20:23:07 UTC
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):

How reproducible:

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

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:

Comment 2 Daniel Lobato Garcia 2016-04-07 08:15:14 UTC
Created redmine issue http://projects.theforeman.org/issues/14519 from this bug

Comment 3 Daniel Lobato Garcia 2016-04-07 08:40:03 UTC
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

Comment 4 Daniel Lobato Garcia 2016-04-07 14:37:08 UTC
Now under review at https://github.com/theforeman/foreman-docker/pull/154

Comment 5 Daniel Lobato Garcia 2016-04-07 14:40:31 UTC
*** Bug 1266842 has been marked as a duplicate of this bug. ***

Comment 7 sthirugn@redhat.com 2016-04-14 19:08:01 UTC
Blocked with https://bugzilla.redhat.com/show_bug.cgi?id=1327320

Comment 8 Daniel Lobato Garcia 2016-04-15 10:01:16 UTC
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.

Comment 10 sthirugn@redhat.com 2016-04-15 21:16:24 UTC
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.

Comment 12 errata-xmlrpc 2016-07-27 09:30:56 UTC
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.


Note You need to log in before you can comment on or make changes to this bug.