tripleo-ansible-inventory Error creating static inventory 'Undercloud'

Bug #1914084 reported by Michele Baldessari
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
tripleo
Fix Released
Medium
mathieu bultel

Bug Description

Starting today (this worked a couple of days ago) the inventory generation is broken:
$ tripleo-ansible-inventory --static-yaml-inventory /home/stack/inv.yaml
Error creating static inventory: 'Undercloud'

Maybe related to the fix for https://bugs.launchpad.net/tripleo/+bug/1913551 ?

(undercloud) [stack@undercloud-0 ~]$ rpm -qa |grep -e tripleo-heat -e tripleoclient -e tripleo-common
openstack-tripleo-common-containers-14.0.1-0.20210201094933.be7b231.el8.noarch
python3-tripleoclient-15.0.1-0.20210130164901.0c669f6.el8.noarch
openstack-tripleo-heat-templates-14.0.1-0.20210131084401.787b765.el8.noarch
openstack-tripleo-common-14.0.1-0.20210201094933.be7b231.el8.noarch
python3-tripleo-common-14.0.1-0.20210201094933.be7b231.el8.noarch

Revision history for this message
Michele Baldessari (michele) wrote :

(undercloud) [stack@undercloud-0 ~]$ tripleo-ansible-inventory --debug --static-yaml-inventory /home/stack/inv.yaml
Error creating static inventory: 'Undercloud'
Traceback (most recent call last):
  File "/usr/bin/tripleo-ansible-inventory", line 218, in main
    inventory.write_static_inventory(configs.static_yaml_inventory)
  File "/usr/lib/python3.6/site-packages/tripleo_common/inventories.py", line 125, in write_static_inventory
    inventory = self._merge(dynamic=False)
  File "/usr/lib/python3.6/site-packages/tripleo_common/inventories.py", line 111, in _merge
    inventory['Undercloud']['vars']['plans'].sort()
KeyError: 'Undercloud'

Changed in tripleo:
status: New → Triaged
importance: Undecided → Medium
milestone: none → wallaby-3
Revision history for this message
Michele Baldessari (michele) wrote :

Seems that this is due to Idf4269a2ae5ce9863e1eda2f824e7a9fc93847d2 (Generate inventory without any overcloud). In fact passing "--stack overcloud" to it fixes it for me. I think if nothing else we should print a proper error message and/or restore the previous default behaviour of this working without having to specify the stack?

Revision history for this message
Daniel Bengtsson (damani42) wrote :

We have the same error here[1], we will try the workaround to see if that works.

[1] https://review.opendev.org/c/openstack/tripleo-upgrade/+/773181

Revision history for this message
Sofer Athlan-Guyot (sofer-athlan-guyot) wrote :

Pinging Mathieu about it.

Changed in tripleo:
assignee: nobody → mathieu bultel (mat-bultel)
Revision history for this message
mathieu bultel (mat-bultel) wrote :
Changed in tripleo:
milestone: wallaby-3 → wallaby-rc1
Changed in tripleo:
status: Triaged → Fix Released
Revision history for this message
Michele Baldessari (michele) wrote :

Reopening as this has not been fixed.

I do have the patch mentioned in comment 5

(undercloud) [stack@undercloud-0 ~]$ grep "auth_variables = {}" /usr/bin/tripleo-ansible-inventory |wc -l
1

(undercloud) [stack@undercloud-0 ~]$ rpm -qf `which /usr/bin/tripleo-ansible-inventory`
openstack-tripleo-validations-14.0.1-0.20210323051419.c876cbb.el8.noarch

But it still breaks:
(undercloud) [stack@undercloud-0 ~]$ tripleo-ansible-inventory --static-yaml-inventory inv.yml
WARNING:tripleo_common.inventory:Stack not found: None. No data found in neither neutron or heat. Only the undercloud will be added to the inventory.

Specifying the stack works:
(undercloud) [stack@undercloud-0 ~]$ tripleo-ansible-inventory --stack overcloud --static-yaml-inventory inv.yml
(undercloud) [stack@undercloud-0 ~]$

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

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

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

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

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

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

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

Reviewed: https://review.opendev.org/c/openstack/tripleo-validations/+/786565
Committed: https://opendev.org/openstack/tripleo-validations/commit/065e13b6f4f4f1a2c7da213af8d11468e760e282
Submitter: "Zuul (22348)"
Branch: stable/victoria

commit 065e13b6f4f4f1a2c7da213af8d11468e760e282
Author: Mathieu Bultel <email address hidden>
Date: Wed Feb 10 09:53:44 2021 +0100

    Fix set by merging two list without duplicate

    The previous statement result to an empty list, this
    fix merge the two list and avoid duplicate

    Declare auth_variables dictionary to avoid
    reference before assignment issues

    Change-Id: Ie28357d692f604c647d0f252a932242024e84f6e
    Closes-Bug: #1914084
    (cherry picked from commit 6de73491d697ca92c8b8b7fcc9c445fe6f9f5d5d)

tags: added: in-stable-victoria
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to tripleo-validations (stable/train)

Reviewed: https://review.opendev.org/c/openstack/tripleo-validations/+/786568
Committed: https://opendev.org/openstack/tripleo-validations/commit/31577df1e54694cc00c1e086aeefb5c5eeb4f7e8
Submitter: "Zuul (22348)"
Branch: stable/train

commit 31577df1e54694cc00c1e086aeefb5c5eeb4f7e8
Author: Mathieu Bultel <email address hidden>
Date: Wed Feb 10 09:53:44 2021 +0100

    Fix set by merging two list without duplicate

    The previous statement result to an empty list, this
    fix merge the two list and avoid duplicate

    Declare auth_variables dictionary to avoid
    reference before assignment issues

    Change-Id: Ie28357d692f604c647d0f252a932242024e84f6e
    Closes-Bug: #1914084
    (cherry picked from commit 6de73491d697ca92c8b8b7fcc9c445fe6f9f5d5d)
    (cherry picked from commit 065e13b6f4f4f1a2c7da213af8d11468e760e282)
    (cherry picked from commit 9b2d173debe88709daf613353ed6191f9a45758a)

tags: added: in-stable-train
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to tripleo-validations (stable/ussuri)

Reviewed: https://review.opendev.org/c/openstack/tripleo-validations/+/786566
Committed: https://opendev.org/openstack/tripleo-validations/commit/9b2d173debe88709daf613353ed6191f9a45758a
Submitter: "Zuul (22348)"
Branch: stable/ussuri

commit 9b2d173debe88709daf613353ed6191f9a45758a
Author: Mathieu Bultel <email address hidden>
Date: Wed Feb 10 09:53:44 2021 +0100

    Fix set by merging two list without duplicate

    The previous statement result to an empty list, this
    fix merge the two list and avoid duplicate

    Declare auth_variables dictionary to avoid
    reference before assignment issues

    Change-Id: Ie28357d692f604c647d0f252a932242024e84f6e
    Closes-Bug: #1914084
    (cherry picked from commit 6de73491d697ca92c8b8b7fcc9c445fe6f9f5d5d)
    (cherry picked from commit 065e13b6f4f4f1a2c7da213af8d11468e760e282)

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

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

Changed in tripleo:
milestone: wallaby-rc1 → xena-1
Changed in tripleo:
status: Triaged → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/tripleo-validations 13.3.0

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

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

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

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

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