Skip to content

[adoption_osp_deploy] Allow overriding scenario stack CLI args#3750

Merged
brjackma merged 1 commit intoopenstack-k8s-operators:mainfrom
shiftstack:adoption-osp-deploy-stack-args-override
Apr 29, 2026
Merged

[adoption_osp_deploy] Allow overriding scenario stack CLI args#3750
brjackma merged 1 commit intoopenstack-k8s-operators:mainfrom
shiftstack:adoption-osp-deploy-stack-args-override

Conversation

@imatza-rh
Copy link
Copy Markdown
Contributor

@imatza-rh imatza-rh commented Mar 7, 2026

TripleO CLI arguments like --libvirt-type generate internal heat
environments that are applied after all user-provided -e files
in the overcloud deploy command.
This means cifmw_adoption_osp_deploy_overcloud_extra_args (which
creates internal-configuration.yaml as the last -e file) cannot
override them - the CLI arg wins because TripleO processes it
separately from -e file stacking.

For shiftstack adoption on baremetal, we need --libvirt-type kvm
instead of --libvirt-type qemu (nested virt requires KVM), but
the existing override mechanism has no effect. See the
TripleO hiera hierarchy
for the full priority chain.

This adds two variables to adoption_osp_deploy:

  • cifmw_adoption_osp_deploy_stack_args_remove - filter out args
    from the scenario's stack.args using Ansible's reject('in', ...)
    (preserves order, unlike difference() which uses sets)
  • cifmw_adoption_osp_deploy_stack_args_add - append new args after
    removals

Both default to [], so existing jobs produce identical output.
Input validation ensures both are lists (not string/mapping) before
the Jinja2 expression runs.

Usage in ci-framework-jobs (shiftstack adoption deploy-osp):

cifmw_adoption_osp_deploy_stack_args_remove:
  - '--libvirt-type qemu'
cifmw_adoption_osp_deploy_stack_args_add:
  - '--libvirt-type kvm'

Companion PR: data-plane-adoption #1292 -
removes redundant ExtraConfig virt_type entries that would otherwise
still override at hiera priority 7 vs 11.

Molecule tests cover 6 scenarios: default (no-op), remove, add,
replace, multi-remove, non-existent removal. Full adoption pipeline
passed (7/7 stages) via testproject buildset.

Related-Issue: OSPRH-27919

Assisted-By: Claude Code

@imatza-rh imatza-rh marked this pull request as draft March 7, 2026 10:11
@imatza-rh imatza-rh changed the base branch from main to stable March 7, 2026 15:36
@imatza-rh imatza-rh force-pushed the adoption-osp-deploy-stack-args-override branch 4 times, most recently from 52c3b81 to d625233 Compare March 17, 2026 19:08
@imatza-rh imatza-rh force-pushed the adoption-osp-deploy-stack-args-override branch from d625233 to 9f49310 Compare March 19, 2026 13:35
@imatza-rh imatza-rh changed the base branch from stable to main March 23, 2026 13:30
@imatza-rh imatza-rh force-pushed the adoption-osp-deploy-stack-args-override branch 2 times, most recently from a2572f2 to 556e7bc Compare March 25, 2026 13:53
@softwarefactory-project-zuul
Copy link
Copy Markdown

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

✔️ openstack-k8s-operators-content-provider SUCCESS in 1h 52m 23s
✔️ podified-multinode-edpm-deployment-crc SUCCESS in 1h 28m 33s
✔️ cifmw-crc-podified-edpm-baremetal SUCCESS in 1h 20m 13s
cifmw-crc-podified-edpm-baremetal-minor-update RETRY_LIMIT in 29m 59s
✔️ cifmw-pod-zuul-files SUCCESS in 5m 44s
✔️ noop SUCCESS in 0s
✔️ cifmw-pod-ansible-test SUCCESS in 10m 17s
✔️ cifmw-pod-pre-commit SUCCESS in 8m 59s
✔️ cifmw-molecule-adoption_osp_deploy SUCCESS in 3m 36s

bogdando
bogdando previously approved these changes Mar 30, 2026
Copy link
Copy Markdown
Contributor

@bogdando bogdando left a comment

Choose a reason for hiding this comment

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

LGTM, it appears to be non-breaking opted-out change so need no extra testing in downstream testproject

@imatza-rh imatza-rh changed the base branch from main to stable March 30, 2026 15:07
@imatza-rh imatza-rh dismissed bogdando’s stale review March 30, 2026 15:07

The base branch was changed.

@imatza-rh imatza-rh changed the base branch from stable to main March 30, 2026 15:23
@imatza-rh imatza-rh requested a review from bogdando April 18, 2026 16:27
@imatza-rh imatza-rh removed the Stale label Apr 18, 2026
@softwarefactory-project-zuul
Copy link
Copy Markdown

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/0cd47efaa5e54937b6d0d3f106f91f7c

✔️ openstack-k8s-operators-content-provider SUCCESS in 2h 16m 54s
podified-multinode-edpm-deployment-crc FAILURE in 25m 40s
✔️ cifmw-crc-podified-edpm-baremetal SUCCESS in 1h 36m 54s
✔️ cifmw-crc-podified-edpm-baremetal-minor-update SUCCESS in 2h 03m 58s
✔️ cifmw-pod-zuul-files SUCCESS in 4m 57s
✔️ noop SUCCESS in 0s
✔️ cifmw-pod-ansible-test SUCCESS in 8m 54s
✔️ cifmw-pod-pre-commit SUCCESS in 8m 06s
✔️ cifmw-molecule-adoption_osp_deploy SUCCESS in 3m 21s

@imatza-rh
Copy link
Copy Markdown
Contributor Author

recheck

@imatza-rh imatza-rh force-pushed the adoption-osp-deploy-stack-args-override branch from 04ce0b3 to c4b59d7 Compare April 22, 2026 21:28
@softwarefactory-project-zuul
Copy link
Copy Markdown

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

✔️ openstack-k8s-operators-content-provider SUCCESS in 2h 08m 34s
podified-multinode-edpm-deployment-crc FAILURE in 40m 03s
✔️ cifmw-crc-podified-edpm-baremetal SUCCESS in 1h 41m 17s
✔️ cifmw-crc-podified-edpm-baremetal-minor-update SUCCESS in 1h 56m 31s
✔️ cifmw-pod-zuul-files SUCCESS in 6m 17s
✔️ noop SUCCESS in 0s
✔️ cifmw-pod-ansible-test SUCCESS in 10m 24s
✔️ cifmw-pod-pre-commit SUCCESS in 9m 43s
✔️ cifmw-molecule-adoption_osp_deploy SUCCESS in 4m 23s

@imatza-rh imatza-rh force-pushed the adoption-osp-deploy-stack-args-override branch from c4b59d7 to a8fe1ac Compare April 26, 2026 19:31
@imatza-rh
Copy link
Copy Markdown
Contributor Author

Rebased on main, no code changes. CI passed (6/6 stages). Previous LGTM was dismissed by the rebase.

bogdando
bogdando previously approved these changes Apr 27, 2026
Add cifmw_adoption_osp_deploy_stack_args_remove and
cifmw_adoption_osp_deploy_stack_args_add variables to allow
callers to modify the TripleO overcloud deploy CLI arguments
from the DPA scenario.

TripleO CLI arguments like --libvirt-type generate internal
heat environments applied after all user-provided -e files,
so they cannot be overridden via the existing
cifmw_adoption_osp_deploy_overcloud_extra_args mechanism.
The new variables use Ansible's reject filter to remove
unwanted args (preserving order) and append replacements.

Also adds:
- Input validation for the new variables in validate_scenario
- Molecule test coverage for the args override logic
- README documentation for both new parameters

Assisted-By: Claude Code
Signed-off-by: Itay Matza <imatza@redhat.com>
@imatza-rh imatza-rh requested a review from bogdando April 29, 2026 08:50
Copy link
Copy Markdown
Contributor

@bogdando bogdando left a comment

Choose a reason for hiding this comment

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

LGTM

@brjackma
Copy link
Copy Markdown
Contributor

/approve
/lgtm

@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci Bot commented Apr 29, 2026

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: brjackma

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

The pull request process is described here

Details 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

@brjackma brjackma merged commit 8def4a6 into openstack-k8s-operators:main Apr 29, 2026
11 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.

5 participants