Bug 1301763

Summary: HTTPNotFound exception when updating an overcloud
Product: Red Hat OpenStack Reporter: Zane Bitter <zbitter>
Component: openstack-tripleo-commonAssignee: Brad P. Crochet <brad>
Status: CLOSED ERRATA QA Contact: Alexander Chuzhoy <sasha>
Severity: high Docs Contact:
Priority: high    
Version: 7.0 (Kilo)CC: athomas, bcrochet, dmacpher, hbrock, jcoufal, jslagle, mburns, ohochman, rhel-osp-director-maint, slinaber, yeylon
Target Milestone: y3   
Target Release: 7.0 (Kilo)   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: openstack-tripleo-common-0.0.1.dev6-6.git49b57eb.el7ost Doc Type: Bug Fix
Doc Text:
The 'openstack overcloud update' command sought a list of events for each resource. When listing events for a resource, the Heat API returned a HTTP 404 error (Not Found) for resources with no events. The resource was considered as non-existent (due to the 404 error) and the client would fail. This occurred in situations where a previous update would end after adding a resource to the stack but before any events occur, such as a resource waiting at a breakpoint at the time the update ended. This fix adds error handling to the client, which resolves issues with the 404 error.
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-02-18 16:51:50 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:

Description Zane Bitter 2016-01-25 23:16:18 UTC
In tripleo-common's StackUpdateManager._resources_by_state() method, we attempt to retrieve the event list for each resource in a stack. However, if there are no events for a given resource, Heat returns a 404 error. (This is probably unwise, since it should be possible to distinguish between a resource that does not exist and one that has no events, but nevertheless that's what it does). We need to catch this error, otherwise we cannot update the overcloud in the cases where one or more resources have no associated events.

Comment 1 James Slagle 2016-02-03 14:35:21 UTC
Brad, if you're done with this patch, can you merge it downstream?

Comment 2 James Slagle 2016-02-03 20:45:07 UTC
patch is merged now

Comment 4 Zane Bitter 2016-02-11 18:55:59 UTC
This would be really hard to reproduce if you were trying. I think the way to do it might be:

- Do a stack update that adds a new resource, with a breakpoint set on that resource
- Restart heat-engine without clearing the breakpoint
- Do an overcloud update

Comment 5 Omri Hochman 2016-02-11 19:03:27 UTC
Unable to reproduce. when updates from 7.x to 7.3:
----------------------------------------------------
openstack-tripleo-heat-templates-0.8.6-117.el7ost.noarch
openstack-heat-api-cloudwatch-2015.1.2-8.el7ost.noarch
openstack-heat-templates-0-0.8.20150605git.el7ost.noarch
openstack-heat-common-2015.1.2-8.el7ost.noarch
python-heatclient-0.6.0-1.el7ost.noarch
openstack-heat-api-cfn-2015.1.2-8.el7ost.noarch
openstack-heat-engine-2015.1.2-8.el7ost.noarch
openstack-heat-api-2015.1.2-8.el7ost.noarch

Comment 7 errata-xmlrpc 2016-02-18 16:51:50 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://rhn.redhat.com/errata/RHBA-2016-0264.html