Merge "Catch NotFound when listing events during updates"
This commit is contained in:
commit
d5b5d35efe
|
@ -18,6 +18,8 @@ import logging
|
||||||
import re
|
import re
|
||||||
import time
|
import time
|
||||||
|
|
||||||
|
import heatclient.exc
|
||||||
|
|
||||||
LOG = logging.getLogger(__name__)
|
LOG = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
|
||||||
|
@ -134,10 +136,13 @@ class StackUpdateManager(object):
|
||||||
stack_name, stack_id = next(
|
stack_name, stack_id = next(
|
||||||
x['href'] for x in res.links if
|
x['href'] for x in res.links if
|
||||||
x['rel'] == 'stack').rsplit('/', 2)[1:]
|
x['rel'] == 'stack').rsplit('/', 2)[1:]
|
||||||
events = self.heatclient.events.list(
|
try:
|
||||||
stack_id=stack_id,
|
events = self.heatclient.events.list(
|
||||||
resource_name=res.logical_resource_id,
|
stack_id=stack_id,
|
||||||
sort_dir='asc')
|
resource_name=res.logical_resource_id,
|
||||||
|
sort_dir='asc')
|
||||||
|
except heatclient.exc.HTTPNotFound:
|
||||||
|
events = []
|
||||||
state = 'not_started'
|
state = 'not_started'
|
||||||
for ev in events:
|
for ev in events:
|
||||||
# ignore events older than start of the last stack change
|
# ignore events older than start of the last stack change
|
||||||
|
|
Loading…
Reference in New Issue