Bug 1313555 - atomic uninstall gives non-zero exit
atomic uninstall gives non-zero exit
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: sadc-docker (Show other bugs)
7.2
Unspecified Unspecified
unspecified Severity medium
: rc
: ---
Assigned To: Jeremy Eder
atomic-bugs@redhat.com
Vikram Goyal
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2016-03-01 16:53 EST by Chris Evich
Modified: 2016-05-12 12:56 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2016-05-12 12:56:41 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)

  None (edit)
Description Chris Evich 2016-03-01 16:53:12 EST
Description of problem:
When uninstalling, the script tries to remove an existing sadc container.  That works fine, unless no container was started, or it was already removed (manually).  In that case, the script returns non-zero exit status when it shouldn't (since removing the container was the goal).

Version-Release number of selected component (if applicable):

registry.access.redhat.com/rhel7/sadc         latest              96ca6a153fd6        16 hours ago        215 MB

How reproducible:
Trivial

Steps to Reproduce:
1. atomic install registry.access.redhat.com/rhel7/sadc:latest
2. atomic uninstall registry.access.stage.redhat.com/rhel7/sadc:latest

Actual results:
-bash-4.2# atomic uninstall registry.access.stage.redhat.com/rhel7/sadc:latest
docker run --rm --privileged -v /:/host -e HOST=/host -v /var/log:/var/log -e IMAGE=registry.access.stage.redhat.com/rhel7/sadc:latest -e NAME=sadc registry.access.stage.redhat.com/rhel7/sadc:latest /usr/local/bin/sysstat-uninstall.sh ; docker rm -f sadc
Error response from daemon: no such id: sadc
Error: failed to remove containers: [sadc]
-bash-4.2# echo $?
1

Expected results:
-bash-4.2# atomic uninstall registry.access.stage.redhat.com/rhel7/sadc:latest
docker run --rm --privileged -v /:/host -e HOST=/host -v /var/log:/var/log -e ...whatever...
-bash-4.2# echo $?
0


Additional info:
The rsyslog image uninstall does not have this problem
Comment 5 errata-xmlrpc 2016-05-12 12:56:41 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://rhn.redhat.com/errata/RHBA-2016-1067.html

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