Bug 1353049 - [RFE] failed update and/or upgrade attempt should return non 0 value.
Summary: [RFE] failed update and/or upgrade attempt should return non 0 value.
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat OpenStack
Classification: Red Hat
Component: python-tripleoclient
Version: 9.0 (Mitaka)
Hardware: Unspecified
OS: Unspecified
high
unspecified
Target Milestone: Upstream M3
: 11.0 (Ocata)
Assignee: Brad P. Crochet
QA Contact: Ola Pavlenko
URL:
Whiteboard:
Depends On:
Blocks: 1461498
TreeView+ depends on / blocked
 
Reported: 2016-07-05 22:21 UTC by Alexander Chuzhoy
Modified: 2017-06-14 15:16 UTC (History)
20 users (show)

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.
Clone Of:
: 1461498 (view as bug list)
Environment:
Last Closed: 2017-05-17 19:31:40 UTC


Attachments (Terms of Use)


Links
System ID Priority Status Summary Last Updated
Red Hat Product Errata RHEA-2017:1245 normal SHIPPED_LIVE Red Hat OpenStack Platform 11.0 Bug Fix and Enhancement Advisory 2017-05-17 23:01:50 UTC
OpenStack gerrit 339048 None None None 2016-07-07 15:08:31 UTC
OpenStack gerrit 370742 None None None 2016-12-13 11:57:22 UTC
Launchpad 1599872 None None None 2017-02-08 13:47:54 UTC

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 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


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