tripleo-ansible-inventory no longer functional in master

Bug #1936406 reported by David Peacock
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
tripleo
Fix Released
High
mathieu bultel

Bug Description

tripleo-ansible-inventory tool no longer functions in master.

(undercloud) [centos@undercloud-0 ~]$ tripleo-ansible-inventory
Traceback (most recent call last):
  File "/usr/bin/tripleo-ansible-inventory", line 239, in <module>
    main()
  File "/usr/bin/tripleo-ansible-inventory", line 178, in main
    utils.get_swift_client(auth_variables))
  File "/usr/lib/python3.6/site-packages/tripleo_validations/utils.py", line 91, in list_plan_and_stack
    stacks = [s.stack_name for s in hclient.stacks.list()]
  File "/usr/lib/python3.6/site-packages/tripleo_validations/utils.py", line 91, in <listcomp>
    stacks = [s.stack_name for s in hclient.stacks.list()]
  File "/usr/lib/python3.6/site-packages/heatclient/v1/stacks.py", line 136, in paginate
    stacks = self._list(url, 'stacks')
  File "/usr/lib/python3.6/site-packages/heatclient/common/base.py", line 114, in _list
    body = self.client.get(url).json()
  File "/usr/lib/python3.6/site-packages/keystoneauth1/adapter.py", line 395, in get
    return self.request(url, 'GET', **kwargs)
  File "/usr/lib/python3.6/site-packages/heatclient/common/http.py", line 320, in request
    **kwargs)
  File "/usr/lib/python3.6/site-packages/keystoneauth1/adapter.py", line 554, in request
    resp = super(LegacyJsonAdapter, self).request(*args, **kwargs)
  File "/usr/lib/python3.6/site-packages/keystoneauth1/adapter.py", line 257, in request
    return self.session.request(url, method, **kwargs)
  File "/usr/lib/python3.6/site-packages/keystoneauth1/session.py", line 812, in request
    **endpoint_filter)
  File "/usr/lib/python3.6/site-packages/keystoneauth1/session.py", line 1243, in get_endpoint
    return auth.get_endpoint(self, **kwargs)
  File "/usr/lib/python3.6/site-packages/keystoneauth1/identity/base.py", line 380, in get_endpoint
    allow_version_hack=allow_version_hack, **kwargs)
  File "/usr/lib/python3.6/site-packages/keystoneauth1/identity/base.py", line 279, in get_endpoint_data
    service_name=service_name)
  File "/usr/lib/python3.6/site-packages/keystoneauth1/access/service_catalog.py", line 462, in endpoint_data_for
    raise exceptions.EndpointNotFound(msg)
keystoneauth1.exceptions.catalog.EndpointNotFound: public endpoint for orchestration service not found

Changed in tripleo:
status: New → Triaged
Changed in tripleo:
milestone: none → xena-2
Revision history for this message
Brendan Shephard (bshephar) wrote :

Yeah, the whole tripleo-ansible-inventory script needs to be revised. Missing Nova and Heat on the undercloud now mean this doesn't work the way it used to.

We'll need to consider how we want to handle this moving forward.

Revision history for this message
Rabi Mishra (rabi) wrote :

We should get rid of the script and use the ansible module[1] as we do elsewhere.

[1] https://github.com/openstack/tripleo-ansible/blob/master/tripleo_ansible/playbooks/cli-config-download.yaml#L47

Changed in tripleo:
milestone: xena-2 → xena-3
Revision history for this message
Bogdan Dobrelya (bogdando) wrote :

do we have tripleo-ansible-inventory in any critical path?

Changed in tripleo:
importance: Critical → High
Changed in tripleo:
assignee: nobody → mathieu bultel (mat-bultel)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to tripleo-validations (master)
Changed in tripleo:
status: Triaged → In Progress
Revision history for this message
David Peacock (davidjpeacock) wrote :

Looks like we dropped the ball on this one and need to reach resolution here - starting 16.2.2 it seems that this is a genuine problem.

DVD is raising a BZ from his reproducer.

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

Reviewed: https://review.opendev.org/c/openstack/tripleo-validations/+/813535
Committed: https://opendev.org/openstack/tripleo-validations/commit/08e2e1a060332bb5dfba4e9b52d526d2272dd343
Submitter: "Zuul (22348)"
Branch: master

commit 08e2e1a060332bb5dfba4e9b52d526d2272dd343
Author: matbu <email address hidden>
Date: Mon Oct 11 22:46:53 2021 +0200

    Deprecates tripleo-ansible-inventory and remove tripleo-validation scripts

    tripleo-ansible-inventory is broken in Master/Wallaby and need to be revisit
    to what tripleo is actually deploying:
    * tripleo-deploy directory contains a valid inventory
    * tripleo-ansible with the playbook cli-config-download.yaml offers a way to
      regenerate a fresh inventory.

    This review also removed the scripts/tripleo-validation.py which is not longer functional
    with the current VF CLI.

    Change-Id: Ie02259336c763cfa980b59ad64f9e478d05690fb
    Closes-Bug: #1936406
    Resolves: rhbz#2008426

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

Fix proposed to branch: stable/wallaby
Review: https://review.opendev.org/c/openstack/tripleo-validations/+/847162

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to tripleo-validations (stable/wallaby)

Reviewed: https://review.opendev.org/c/openstack/tripleo-validations/+/847162
Committed: https://opendev.org/openstack/tripleo-validations/commit/eba4db2ff428c8163c936156979f2309a867ef9a
Submitter: "Zuul (22348)"
Branch: stable/wallaby

commit eba4db2ff428c8163c936156979f2309a867ef9a
Author: matbu <email address hidden>
Date: Mon Oct 11 22:46:53 2021 +0200

    Deprecates tripleo-ansible-inventory and remove tripleo-validation scripts

    tripleo-ansible-inventory is broken in Master/Wallaby and need to be revisit
    to what tripleo is actually deploying:
    * tripleo-deploy directory contains a valid inventory
    * tripleo-ansible with the playbook cli-config-download.yaml offers a way to
      regenerate a fresh inventory.

    This review also removed the scripts/tripleo-validation.py which is not longer functional
    with the current VF CLI.

    Change-Id: Ie02259336c763cfa980b59ad64f9e478d05690fb
    Closes-Bug: #1936406
    Resolves: rhbz#2008426
    (cherry picked from commit 08e2e1a060332bb5dfba4e9b52d526d2272dd343)

tags: added: in-stable-wallaby
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/tripleo-validations 14.3.0

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

Revision history for this message
John Fulton (jfulton-org) wrote :

tripleo-ansible-inventory script (and inventories.py in tripleo-common) is still used for DCN deployments which pre-cache images.

https://docs.openstack.org/project-deploy-guide/tripleo-docs/latest/post_deployment/pre_cache_images.html#multi-stacks-inventory

Revision history for this message
John Fulton (jfulton-org) wrote :

Ollie has a WIP patch to update the generated inventory so it's mergable by passing a directory of inventories to ansible:

 https://review.opendev.org/c/openstack/tripleo-common/+/861804

Once that's verified to work and this document updated:

https://docs.openstack.org/project-deploy-guide/tripleo-docs/latest/post_deployment/pre_cache_images.html#multi-stacks-inventory

We can probably follow up with a patch to remove tripleo-ansible-inventory in triple-main branch for zed.

Current behavior in Wallaby and OSP17.0 is:

(undercloud) [stack@site-undercloud-0 ~]$ tripleo-ansible-inventory --help
DEPRECATED - This script has been deprecated.Use the inventory file tripleo-ansible-inventory.yaml located under ~/tripleo-deploy/<stack> for a Standalone/Undercloud deployment or overcloud-deploy/<stack> for the Overcloud.
To generate an inventory file, use the playbook in tripleo-ansible: cli-config-download.yaml
(undercloud) [stack@site-undercloud-0 ~]$

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/tripleo-validations 16.0.0

This issue was fixed in the openstack/tripleo-validations 16.0.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.