Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No group in inventory for managed: false vms. #1860

Merged

Conversation

hjensas
Copy link
Contributor

@hjensas hjensas commented Jun 12, 2024

If the VM is created as managed: false, it is not added to the inventory. This change ensure no group is created in the inventory as well.

Fixes whitebox_neutron_tempest_plugin which rely on the inventory.

setUpClass (whitebox_neutron_tempest_plugin.tests.scenario.test_broadcast.BroadcastTestVlanTransparency)
--------------------------------------------------------------------------------------------------------

Captured traceback:
~~~~~~~~~~~~~~~~~~~
    Traceback (most recent call last):

      File "/usr/lib/python3.9/site-packages/tempest/test.py", line 191, in setUpClass
    raise value.with_traceback(trace)

      File "/usr/lib/python3.9/site-packages/tempest/test.py", line 184, in setUpClass
    cls.resource_setup()

      File "/usr/lib/python3.9/site-packages/whitebox_neutron_tempest_plugin/tests/scenario/test_broadcast.py", line 73, in resource_setup
    super(BaseBroadcastTest, cls).resource_setup()

      File "/usr/lib/python3.9/site-packages/whitebox_neutron_tempest_plugin/tests/scenario/base.py", line 988, in resource_setup
    cls.discover_nodes()

      File "/usr/lib/python3.9/site-packages/whitebox_neutron_tempest_plugin/tests/scenario/base.py", line 264, in discover_nodes
    cls.nodes = cls.get_podified_nodes_data()

      File "/usr/lib/python3.9/site-packages/whitebox_neutron_tempest_plugin/tests/scenario/base.py", line 244, in get_podified_nodes_data
    hosts_data.update(inventory_data[host_type]['hosts'])

    KeyError: 'ironics'

As a pull request owner and reviewers, I checked that:

  • Appropriate testing is done and actually running
  • Appropriate documentation exists and/or is up-to-date:
    • README in the role
    • Content of the docs/source is reflecting the changes

If the VM is created as `managed: false`, it is not added to
the inventory. This change ensure no group is created in the
inventory as well.

Fixes whitebox_neutron_tempest_plugin which rely on the inventory.
@hjensas hjensas added the uni01alpha uni01alpha related patches label Jun 12, 2024
@hjensas hjensas requested a review from eduolivares June 12, 2024 00:48
@github-actions github-actions bot marked this pull request as draft June 12, 2024 00:48
Copy link

Thanks for the PR! ❤️
I'm marking it as a draft, once your happy with it merging and the PR is passing CI, click the "Ready for review" button below.

@cjeanner
Copy link
Contributor

/approve
makes sense: not managed, not in inventory, so don't create group.

Copy link
Contributor

openshift-ci bot commented Jun 12, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: cjeanner

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@eduolivares
Copy link
Contributor

The patch makes sense to me.
My only doubt is that I have checked the latest unialpha results and the BroadcastTestVlanTransparency tests pass. I haven't seen that "ironic" group.
Perhaps this is from another job or from unialpha+WIP patches?

@hjensas
Copy link
Contributor Author

hjensas commented Jun 12, 2024

The patch makes sense to me. My only doubt is that I have checked the latest unialpha results and the BroadcastTestVlanTransparency tests pass. I haven't seen that "ironic" group. Perhaps this is from another job or from unialpha+WIP patches?

We are making modifications to the job, to enable ironic and running it's scenario tests etc.
See downstream ci-framework/ci-framework-jobs/-/merge_requests/282 - it is adding ironic VMs, these are blank VMs taht we use a virtual baremetal.

@hjensas hjensas marked this pull request as ready for review June 12, 2024 09:17
@openshift-ci openshift-ci bot added the lgtm label Jun 12, 2024
@openshift-merge-bot openshift-merge-bot bot merged commit 9f8eee4 into openstack-k8s-operators:main Jun 12, 2024
10 of 11 checks passed
@hjensas hjensas deleted the inventory-groups branch June 20, 2024 22:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants