Bugzilla (bugzilla.redhat.com) will be under maintenance for infrastructure upgrades and will not be available on July 31st between 12:30 AM - 05:30 AM UTC. We appreciate your understanding and patience. You can follow status.redhat.com for details.
Bug 1418447 - atomic host commands return zero on errors
Summary: atomic host commands return zero on errors
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: atomic
Version: 7.3
Hardware: x86_64
OS: Linux
medium
medium
Target Milestone: rc
: ---
Assignee: Lokesh Mandvekar
QA Contact: atomic-bugs@redhat.com
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-02-01 21:08 UTC by Qian Cai
Modified: 2017-03-01 17:12 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-03-01 17:12:39 UTC
Target Upstream Version:


Attachments (Terms of Use)

Description Qian Cai 2017-02-01 21:08:45 UTC
Description of problem:
# atomic host upgrade
...
I/O timeout
# echo $?
0

On the hand, rpm-ostree upgrade seems non-zero in this case.

Looks at the code, and seems like the method just return None and never propagate return results from rpm-ostree.

https://github.com/projectatomic/atomic/blob/master/Atomic/host.py

    def host_upgrade(self):
        argv = ["upgrade"]
        if self.args.reboot:
            argv.append("--reboot")
        if self.args.os:
            argv.append("--os=" % self.args.os )
        if self.args.diff:
            argv.append("--check-diff")
        if self.args.downgrade:
            argv.append("--allow-downgrade")
        self._rpmostree(argv)

Version-Release number of selected component (if applicable):
atomic-1.14.1-5.el7.x86_64

How reproducible:
always

Comment 2 Colin Walters 2017-02-02 14:13:15 UTC
I only glanced quickly, but I'm pretty sure this is already fixed upstream by https://github.com/projectatomic/atomic/commits/f999147b030414f02e95a510ff7a0d1d0ba29413

Comment 3 Qian Cai 2017-03-01 17:12:39 UTC
It is working fine now.


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