Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 1324211 - deleting a container using hammer silently fails without error
deleting a container using hammer silently fails without error
Status: CLOSED ERRATA
Product: Red Hat Satellite 6
Classification: Red Hat
Component: Container Management (Show other bugs)
6.2.0
Unspecified Unspecified
unspecified Severity high (vote)
: Beta
: Unused
Assigned To: Daniel Lobato Garcia
sthirugn@redhat.com
http://projects.theforeman.org/issues...
: Triaged
: 1266842 (view as bug list)
Depends On: 1327320
Blocks:
  Show dependency treegraph
 
Reported: 2016-04-05 16:23 EDT by sthirugn@redhat.com
Modified: 2016-07-27 05:30 EDT (History)
3 users (show)

See Also:
Fixed In Version: rubygem-foreman_docker-2.0.1.4-1
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2016-07-27 05:30:56 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2016:1501 normal SHIPPED_LIVE Red Hat Satellite 6.2 Capsule and Server 2016-07-27 08:28:58 EDT

  None (edit)
Description sthirugn@redhat.com 2016-04-05 16:23:07 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:
Comment 2 Daniel Lobato Garcia 2016-04-07 04:15:14 EDT
Created redmine issue http://projects.theforeman.org/issues/14519 from this bug
Comment 3 Daniel Lobato Garcia 2016-04-07 04:40:03 EDT
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 10:37:08 EDT
Now under review at https://github.com/theforeman/foreman-docker/pull/154
Comment 5 Daniel Lobato Garcia 2016-04-07 10:40:31 EDT
*** Bug 1266842 has been marked as a duplicate of this bug. ***
Comment 7 sthirugn@redhat.com 2016-04-14 15:08:01 EDT
Blocked with https://bugzilla.redhat.com/show_bug.cgi?id=1327320
Comment 8 Daniel Lobato Garcia 2016-04-15 06:01:16 EDT
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 17:16:24 EDT
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 05:30:56 EDT
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

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