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

Rework inventory generation #2341

Merged
merged 1 commit into from
Sep 12, 2024
Merged

Conversation

cjeanner
Copy link
Collaborator

First we move the inventory files generation to a far earlier stage.
While it doesn't change anything on its content, having the inventory
generated earlier helps debugging it without the need to create any
actual workload (hacky approach I used to validate the generated
inventories).

Then, the data used to generate the inventories is updated, in order to
ensure we're still puting the nodes under the right group.
This is especially important for the OCP cluster, when we have workers
in the picture.

Before this change, the workers were nested under the "ocps" group,
leaving the "ocp_workers" empty.

This change corrects the situation, leading the generated inventories to
look like this:

ocps:
  hosts:
    ocp-master-0:
      ansible_host: master-0.utility
      ansible_user: core
      ansible_ssh_common_args: '-o StrictHostKeyChecking=no'
      ansible_ssh_private_key_file: ~/.ssh/devscripts_key
ocp_workers:
  hosts:
    ocp-worker-0:
      ansible_host: worker-0.utility
      ansible_user: core
      ansible_ssh_common_args: '-o StrictHostKeyChecking=no'
      ansible_ssh_private_key_file: ~/.ssh/devscripts_key
computes:
  hosts:
    compute-xio2mlri-0:
      ansible_host: compute-xio2mlri-0.utility
      ansible_user: zuul
      ansible_ssh_common_args: '-o StrictHostKeyChecking=no'
      ansible_ssh_private_key_file: ~/.ssh/id_cifw
controllers:
  hosts:
    controller-0:
      ansible_host: controller-0.utility
      ansible_user: zuul
      ansible_ssh_common_args: '-o StrictHostKeyChecking=no'
      ansible_ssh_private_key_file: ~/.ssh/id_cifw

Copy link
Contributor

openshift-ci bot commented Sep 11, 2024

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@cjeanner cjeanner marked this pull request as ready for review September 11, 2024 13:35
First we move the inventory files generation to a far earlier stage.
While it doesn't change anything on its content, having the inventory
generated earlier helps debugging it without the need to create any
actual workload (hacky approach I used to validate the generated
inventories).

Then, the data used to generate the inventories is updated, in order to
ensure we're still puting the nodes under the right group.
This is especially important for the OCP cluster, when we have workers
in the picture.

Before this change, the workers were nested under the "ocps" group,
leaving the "ocp_workers" empty.

This change corrects the situation, leading the generated inventories to
look like this:
```yaml
ocps:
  hosts:
    ocp-master-0:
      ansible_host: master-0.utility
      ansible_user: core
      ansible_ssh_common_args: '-o StrictHostKeyChecking=no'
      ansible_ssh_private_key_file: ~/.ssh/devscripts_key
ocp_workers:
  hosts:
    ocp-worker-0:
      ansible_host: worker-0.utility
      ansible_user: core
      ansible_ssh_common_args: '-o StrictHostKeyChecking=no'
      ansible_ssh_private_key_file: ~/.ssh/devscripts_key
computes:
  hosts:
    compute-xio2mlri-0:
      ansible_host: compute-xio2mlri-0.utility
      ansible_user: zuul
      ansible_ssh_common_args: '-o StrictHostKeyChecking=no'
      ansible_ssh_private_key_file: ~/.ssh/id_cifw
controllers:
  hosts:
    controller-0:
      ansible_host: controller-0.utility
      ansible_user: zuul
      ansible_ssh_common_args: '-o StrictHostKeyChecking=no'
      ansible_ssh_private_key_file: ~/.ssh/id_cifw
```
Copy link

Build failed (check pipeline). Post recheck (without leading slash)
to rerun all jobs. Make sure the failure cause has been resolved before
you rerun jobs.

https://softwarefactory-project.io/zuul/t/rdoproject.org/buildset/7510933306b348fea31e7d11e9d4baee

✔️ openstack-k8s-operators-content-provider SUCCESS in 1h 36m 25s
✔️ podified-multinode-edpm-deployment-crc SUCCESS in 1h 18m 41s
cifmw-crc-podified-edpm-baremetal RETRY_LIMIT in 11m 54s
✔️ noop SUCCESS in 0s
✔️ cifmw-pod-ansible-test SUCCESS in 7m 38s
✔️ cifmw-pod-pre-commit SUCCESS in 7m 08s
✔️ build-push-container-cifmw-client SUCCESS in 35m 41s
✔️ cifmw-molecule-libvirt_manager SUCCESS in 30m 20s
✔️ cifmw-molecule-reproducer SUCCESS in 14m 22s

@cjeanner
Copy link
Collaborator Author

recheck

Copy link
Contributor

@eduolivares eduolivares left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

verified downstream

@raukadah
Copy link
Contributor

/approve
/lgtm

Copy link
Contributor

openshift-ci bot commented Sep 12, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: raukadah

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

@openshift-merge-bot openshift-merge-bot bot merged commit a2586d6 into main Sep 12, 2024
4 checks passed
@openshift-merge-bot openshift-merge-bot bot deleted the libvirt_manager/ocp-inventory branch September 12, 2024 10:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants