Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1353049

Summary: [RFE] failed update and/or upgrade attempt should return non 0 value.
Product: Red Hat OpenStack Reporter: Alexander Chuzhoy <sasha>
Component: python-tripleoclientAssignee: Brad P. Crochet <brad>
Status: CLOSED ERRATA QA Contact: Ola Pavlenko <opavlenk>
Severity: unspecified Docs Contact:
Priority: high    
Version: 9.0 (Mitaka)CC: achernet, apannu, brad, ccollett, dbecker, hbrock, jason.dobies, jcoufal, jpichon, jrist, jslagle, mburns, morazi, nlevinki, opavlenk, rhel-osp-director-maint, sasha, sclewis, tvignaud, ukalifon
Target Milestone: Upstream M3Keywords: FutureFeature, Triaged
Target Release: 11.0 (Ocata)   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: python-tripleoclient-6.0.1-0.20170127055753.8ea289c.el7ost Doc Type: Bug Fix
Doc Text:
Previously, a failed update or upgrade would return an exit value of 0, so it was not possible to test for success based upon this value. With this update, a failed update or upgrade will throw an exception to signify to OpenStackClient that there is an error condition. As a result, OpenStackClient will only return an exit value of 0 on success, and a non-zero value after an error.
Story Points: ---
Clone Of:
: 1461498 (view as bug list) Environment:
Last Closed: 2017-05-17 19:31:40 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1461498    

Description Alexander Chuzhoy 2016-07-05 22:21:34 UTC
rhel-osp-director:  [RFE] failed update and/or upgrade attempt should return non 0 value.

Currently , once the update or upgrade fails:
IN_PROGRESS
FAILED
update finished with status FAILED


The exit value is 0, so we can't test result based on it.


Expected:
The exit value should be 0 only when the update/upgrade succeeded.

Comment 2 Jay Dobies 2016-07-07 13:09:24 UTC
Brad - Can you see if this is a reasonably quick fix to include in 9?

Comment 3 Brad P. Crochet 2016-07-07 13:16:17 UTC
What command(s) is this referring to? openstack overcloud deploy? openstack overcloud update?

Comment 4 Alexander Chuzhoy 2016-07-07 13:54:06 UTC
openstack overcloud update stack overcloud -i with arguments.

Comment 5 Alexander Chuzhoy 2016-07-07 13:55:24 UTC
Upstream bug:
https://bugs.launchpad.net/tripleo/+bug/1599872

Comment 6 Jaromir Coufal 2016-09-30 07:54:44 UTC
Can you please update the BZ, please? Seems that upstream bug was merged back.

Comment 7 Jaromir Coufal 2016-10-04 20:10:56 UTC
Sasha, did you notice if this is included in OSP10 while testing upgrades?

Comment 8 Alexander Chuzhoy 2016-10-04 22:38:45 UTC
[stack@instack ~]$ openstack overcloud update stack overcloud -i --templates -e /usr/share/openstack-tripleo-heat-templates/overcloud-resource-registry-puppet.yaml -e /usr/share/openstack-tripleo-heat-templates/environments/puppet-pacemaker.yaml -e /usr/share/openstack-tripleo-heat-templates/environments/storage-environment.yaml -e /usr/share/openstack-tripleo-heat-templates/environments/network-isolation.yaml -e network-environment.yaml
starting package update on stack overcloud
<urlopen error [Errno 2] No such file or directory: '/usr/share/openstack-tripleo-heat-templates/overcloud-without-mergepy.yaml'>

[stack@instack ~]$ echo $?
1

Comment 9 Jaromir Coufal 2016-10-09 23:29:18 UTC
Thank you, Sasha. Adding as an RFE for 11.

Comment 10 Jaromir Coufal 2016-10-18 14:23:30 UTC
Brad, this still seems not working, could you have a look, please?

Comment 11 Ola Pavlenko 2016-12-13 11:57:22 UTC
fix was merged upstream in stable/newton on Sep 20.
Moving to Modified

Comment 12 Ola Pavlenko 2016-12-13 11:58:10 UTC
See comment#11

Comment 14 Julie Pichon 2017-02-08 13:47:55 UTC
Updating NVR and component. Target release is set to 11 so, even though the fix was backported I'm setting "Fixed in version" according to the 11 puddle.

Comment 16 Udi Kalifon 2017-04-13 06:05:02 UTC
Verified for puddle 2017-04-06.

Comment 17 errata-xmlrpc 2017-05-17 19:31:40 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.

https://access.redhat.com/errata/RHEA-2017:1245