tripleo-ansible-inventory is failing with a heatclient.exc.HTTPNotFound: ERROR: The Stack (overcloud) could not be found

Bug #1694712 reported by Gael Chamoulaud
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
tripleo
Fix Released
High
Florian Fuchs

Bug Description

When using tripleo-ansible-inventory script to generate a static inventory, it always fails:

(undercloud) [stack@undercloud ~]$ tripleo-ansible-inventory --static-inventory /home/stack/validations_static_inventory
Traceback (most recent call last):
  File "/usr/bin/tripleo-ansible-inventory", line 133, in <module>
    main()
  File "/usr/bin/tripleo-ansible-inventory", line 114, in main
    hclient)
  File "/usr/lib/python2.7/site-packages/tripleo_validations/inventory.py", line 61, in __init__
    self.stack_outputs = StackOutputs(self.configs.plan, self.hclient)
  File "/usr/lib/python2.7/site-packages/tripleo_validations/inventory.py", line 35, in __init__
    self.hclient.stacks.output_list(plan)['outputs']]
  File "/usr/lib/python2.7/site-packages/heatclient/v1/stacks.py", line 257, in output_list
    stack_identifier = self._resolve_stack_id(stack_id)
  File "/usr/lib/python2.7/site-packages/heatclient/v1/stacks.py", line 112, in _resolve_stack_id
    resp = self.client.get('/stacks/%s' % stack_id, redirect=False)
  File "/usr/lib/python2.7/site-packages/keystoneauth1/adapter.py", line 223, in get
    return self.request(url, 'GET', **kwargs)
  File "/usr/lib/python2.7/site-packages/heatclient/common/http.py", line 317, in request
    raise exc.from_response(resp)
heatclient.exc.HTTPNotFound: ERROR: The Stack (overcloud) could not be found.

Note that this behaviour is only happening from tripleo-validations master branch.
Moreover, running validations through the mistral framework is failing as well.

Tags: validations
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to tripleo-validations (master)

Fix proposed to branch: master
Review: https://review.openstack.org/469554

Changed in tripleo:
status: New → In Progress
Changed in tripleo:
milestone: none → pike-3
importance: Critical → High
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to tripleo-validations (master)

Reviewed: https://review.openstack.org/469554
Committed: https://git.openstack.org/cgit/openstack/tripleo-validations/commit/?id=7fb11d24ade7167c11796be3e2344b6ca5741de0
Submitter: Jenkins
Branch: master

commit 7fb11d24ade7167c11796be3e2344b6ca5741de0
Author: Florian Fuchs <email address hidden>
Date: Wed May 31 18:08:05 2017 +0200

    Fix inventory without existing stack

    The inventory currently tries to fetch stack outputs without checking if
    the stack exists, so the inventory breaks if the plan has no
    corresponding stack.

    This patch changes the StackOutputs class to hide heat API exceptions
    and return an empty output list instead.

    Change-Id: Icb9e6828aeb1f65d8707333fc1098942f1691204
    Closes-Bug: #1694712

Changed in tripleo:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/tripleo-validations 7.1.0

This issue was fixed in the openstack/tripleo-validations 7.1.0 release.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.