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

Support Roles on OpenStackDataPlaneService #1227

Merged

Conversation

fao89
Copy link
Contributor

@fao89 fao89 commented Dec 10, 2024

Additionally to playbooks, it enables running roles directly with ansible-runner

closes OSPRH-12358

@bshephar
Copy link
Contributor

/test openstack-operator-build-deploy-kuttl

Copy link
Contributor

openshift-ci bot commented Dec 23, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: bshephar, fao89

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

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/b6e4a6ae5f4c4408803affe3a223b339

✔️ openstack-k8s-operators-content-provider SUCCESS in 39m 30s
podified-multinode-edpm-deployment-crc FAILURE in 17m 04s
cifmw-crc-podified-edpm-baremetal FAILURE in 15m 29s
adoption-standalone-to-crc-ceph-provider RETRY_LIMIT in 23m 09s
openstack-operator-tempest-multinode FAILURE in 20m 16s

@fao89
Copy link
Contributor Author

fao89 commented Jan 2, 2025

recheck

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/7d3c5efa43ab47f6b9388184c3eb3b65

openstack-k8s-operators-content-provider FAILURE in 4m 54s
⚠️ podified-multinode-edpm-deployment-crc SKIPPED Skipped due to failed job openstack-k8s-operators-content-provider
⚠️ cifmw-crc-podified-edpm-baremetal SKIPPED Skipped due to failed job openstack-k8s-operators-content-provider
⚠️ adoption-standalone-to-crc-ceph-provider SKIPPED Skipped due to failed job openstack-k8s-operators-content-provider
⚠️ openstack-operator-tempest-multinode SKIPPED Skipped due to failed job openstack-k8s-operators-content-provider

@fao89
Copy link
Contributor Author

fao89 commented Jan 2, 2025

recheck

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/2a72402dc12c41fea60555ebb281990d

openstack-k8s-operators-content-provider FAILURE in 4m 58s
⚠️ podified-multinode-edpm-deployment-crc SKIPPED Skipped due to failed job openstack-k8s-operators-content-provider
⚠️ cifmw-crc-podified-edpm-baremetal SKIPPED Skipped due to failed job openstack-k8s-operators-content-provider
⚠️ adoption-standalone-to-crc-ceph-provider SKIPPED Skipped due to failed job openstack-k8s-operators-content-provider
⚠️ openstack-operator-tempest-multinode SKIPPED Skipped due to failed job openstack-k8s-operators-content-provider

@fao89
Copy link
Contributor Author

fao89 commented Jan 2, 2025

/retest

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/8244968d080a409aa729d9b1229f3553

openstack-k8s-operators-content-provider FAILURE in 5m 02s
⚠️ podified-multinode-edpm-deployment-crc SKIPPED Skipped due to failed job openstack-k8s-operators-content-provider
⚠️ cifmw-crc-podified-edpm-baremetal SKIPPED Skipped due to failed job openstack-k8s-operators-content-provider
⚠️ adoption-standalone-to-crc-ceph-provider SKIPPED Skipped due to failed job openstack-k8s-operators-content-provider
⚠️ openstack-operator-tempest-multinode SKIPPED Skipped due to failed job openstack-k8s-operators-content-provider

@fao89
Copy link
Contributor Author

fao89 commented Jan 2, 2025

recheck

@fao89 fao89 requested a review from bshephar January 3, 2025 00:49
if len(args) == 0 {
if len(playbook) == 0 {
playbook = CustomPlaybook
if len(a.PlaybookContents) > 0 {
Copy link
Contributor

Choose a reason for hiding this comment

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

I think this changes the old behavior. Earlier Playbook provided used to supersede PlaybookContents. Now it's the reverse and role provided supersedes both of them. Is that what we want now?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

playbook, playbookContents and role are not mandatory fields, so we need to check which one isn't empty. Ideally, we shouldn't supersede, but it would happen when more than one field is filled. I think we might need a validation to ensure only one of the three fields is filed

Copy link
Contributor

Choose a reason for hiding this comment

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

Yeah either have a validation or ensure that there is proper prededence. playbook->playbookContent->role

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I've updated the precedence

@fao89 fao89 force-pushed the OSPRH-12358 branch 2 times, most recently from 644cc34 to 793f0b1 Compare January 3, 2025 11:45
playbook = CustomPlaybook
artifact := a.Role
param := "-r"
if len(artifact) == 0 {
Copy link
Contributor

Choose a reason for hiding this comment

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

Are we still saying role if provided has the highest precedence?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

oh! I misplaced the order

@fao89 fao89 force-pushed the OSPRH-12358 branch 2 times, most recently from caeea64 to 71f44e9 Compare January 3, 2025 13:47
Additionally to playbooks, it enables running roles directly with ansible-runner

closes OSPRH-12358

Signed-off-by: Fabricio Aguiar <[email protected]>
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/8b7b5f2afc934cf7ad88b209cd5335c6

✔️ openstack-k8s-operators-content-provider SUCCESS in 3h 10m 45s
✔️ podified-multinode-edpm-deployment-crc SUCCESS in 1h 14m 46s
cifmw-crc-podified-edpm-baremetal RETRY_LIMIT in 11m 26s
✔️ adoption-standalone-to-crc-ceph-provider SUCCESS in 2h 58m 39s
✔️ openstack-operator-tempest-multinode SUCCESS in 1h 33m 48s

@fao89
Copy link
Contributor Author

fao89 commented Jan 3, 2025

recheck

Copy link
Contributor

@rabi rabi left a comment

Choose a reason for hiding this comment

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

/lgtm

@openshift-ci openshift-ci bot added the lgtm label Jan 6, 2025
@openshift-merge-bot openshift-merge-bot bot merged commit 3fb4708 into openstack-k8s-operators:main Jan 6, 2025
8 checks passed
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