Skip to content

[adoption_osp_deploy] Allow overriding scenario stack CLI args#3750

Open
imatza-rh wants to merge 1 commit intoopenstack-k8s-operators:mainfrom
shiftstack:adoption-osp-deploy-stack-args-override
Open

[adoption_osp_deploy] Allow overriding scenario stack CLI args#3750
imatza-rh wants to merge 1 commit intoopenstack-k8s-operators:mainfrom
shiftstack:adoption-osp-deploy-stack-args-override

Conversation

@imatza-rh
Copy link
Copy Markdown

@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 from 9f49310 to a2572f2 Compare March 23, 2026 13:30
@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci bot commented Mar 23, 2026

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign sathlan for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found 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

@imatza-rh imatza-rh force-pushed the adoption-osp-deploy-stack-args-override branch 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
Copy link
Copy Markdown
Author

@bogdando Sorry about the dismissed review - I retargeted the base branch from stable to main (where PRs should land first) and GitHub auto-dismissed existing approvals. No code changes were made. Could you re-approve when you get a chance?

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 force-pushed the adoption-osp-deploy-stack-args-override branch from 110d174 to 208f48e Compare March 31, 2026 05:45
@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/dcdae86968a04ae09ad43eebafe2e500

✔️ openstack-k8s-operators-content-provider SUCCESS in 2h 13m 09s
✔️ podified-multinode-edpm-deployment-crc SUCCESS in 1h 25m 59s
cifmw-crc-podified-edpm-baremetal RETRY_LIMIT in 33m 47s
✔️ cifmw-crc-podified-edpm-baremetal-minor-update SUCCESS in 2h 00m 34s
✔️ cifmw-pod-zuul-files SUCCESS in 4m 59s
✔️ noop SUCCESS in 0s
cifmw-pod-ansible-test TIMED_OUT in 31m 02s
✔️ cifmw-pod-pre-commit SUCCESS in 8m 24s
✔️ cifmw-molecule-adoption_osp_deploy SUCCESS in 3m 37s

@github-actions
Copy link
Copy Markdown

This PR is stale because it has been for over 15 days with no activity.
Remove stale label or comment or this will be closed in 7 days.

@github-actions github-actions bot added the Stale label Apr 16, 2026
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.

2 participants