Skip to content

Fix multi-cell edpm_nodes generation in adoption_vars template#3870

Open
ashu-011 wants to merge 1 commit intoopenstack-k8s-operators:mainfrom
ashu-011:fix_multicell
Open

Fix multi-cell edpm_nodes generation in adoption_vars template#3870
ashu-011 wants to merge 1 commit intoopenstack-k8s-operators:mainfrom
ashu-011:fix_multicell

Conversation

@ashu-011
Copy link
Copy Markdown
Contributor

@ashu-011 ashu-011 commented Apr 20, 2026

[adoption_osp_deploy] Fix multi-cell edpm_nodes generation in adoption_vars template

The template logic was broken for multi-cell scenarios since commit 78bf394,
which replaced the multi-cell-aware loop with single-cell-only logic that only
checked for 'osp-computes' group.

This fix restores the original _stack_names-driven approach that:

  • Loops through stacks (overcloud, cell1, cell2, etc.)
  • Uses appropriate prefix for each stack ('' for overcloud, 'cell1-' for cell1)
  • Generates edpm_nodes with correct structure based on deployment type
  • Works for both single-cell and multi-cell scenarios
  • Maintains consistency with source_mariadb_ip and source_galera_members

Backward compatibility:

  • Single-cell deployments (only overcloud): edpm_nodes.
  • Multi-cell deployments: edpm_nodes..
  • Preserves existing adoption job behavior for single-cell scenarios

Also adds molecule test for multi-cell fixtures to
verify the logic and prevent future breakages.

@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci Bot commented Apr 20, 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 archana203 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

Comment thread roles/adoption_osp_deploy/templates/adoption_vars.yaml.j2 Outdated
# Generates edpm_nodes with cell structure based on existing groups
edpm_nodes:
{% for group_name in _cell_compute_groups | sort %}
{%- if group_name != 'osp-computes' -%}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

this drops nodes when osp-computes coexists with cellN-osp-computes. Should be fine if we don't test this in CI (the product doesn't support placing computes in the control plane stack AFAIK)

Comment thread roles/adoption_osp_deploy/templates/adoption_vars.yaml.j2 Outdated
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.

please see inline

@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/05e114e6a6e441878d87b0a16fe72749

✔️ openstack-k8s-operators-content-provider SUCCESS in 2h 14m 47s
✔️ podified-multinode-edpm-deployment-crc SUCCESS in 1h 21m 38s
✔️ cifmw-crc-podified-edpm-baremetal SUCCESS in 1h 31m 29s
✔️ cifmw-crc-podified-edpm-baremetal-minor-update SUCCESS in 2h 02m 40s
✔️ cifmw-pod-zuul-files SUCCESS in 28m 51s
✔️ noop SUCCESS in 0s
✔️ cifmw-pod-ansible-test SUCCESS in 8m 59s
cifmw-pod-pre-commit FAILURE in 7m 59s
cifmw-molecule-adoption_osp_deploy FAILURE in 3m 55s

@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/c22d0f586265482bb5f48a7cd67af97e

✔️ openstack-k8s-operators-content-provider SUCCESS in 2h 04m 52s
✔️ podified-multinode-edpm-deployment-crc SUCCESS in 1h 27m 49s
✔️ cifmw-crc-podified-edpm-baremetal SUCCESS in 1h 29m 05s
✔️ cifmw-crc-podified-edpm-baremetal-minor-update SUCCESS in 1h 52m 57s
✔️ cifmw-pod-zuul-files SUCCESS in 4m 55s
✔️ noop SUCCESS in 0s
✔️ cifmw-pod-ansible-test SUCCESS in 9m 02s
cifmw-pod-pre-commit FAILURE in 11m 41s
cifmw-molecule-adoption_osp_deploy FAILURE in 3m 55s

@bogdando bogdando self-requested a review April 23, 2026 16:52
bogdando
bogdando previously approved these changes Apr 23, 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.

Good, the test project has passed. LGTM

@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/247b73b1146c4d259c7e1f47072fe5cf

✔️ openstack-k8s-operators-content-provider SUCCESS in 2h 15m 47s
✔️ podified-multinode-edpm-deployment-crc SUCCESS in 1h 22m 17s
✔️ cifmw-crc-podified-edpm-baremetal SUCCESS in 1h 31m 37s
✔️ cifmw-crc-podified-edpm-baremetal-minor-update SUCCESS in 2h 04m 21s
✔️ cifmw-pod-zuul-files SUCCESS in 5m 58s
✔️ noop SUCCESS in 0s
✔️ cifmw-pod-ansible-test SUCCESS in 9m 16s
✔️ cifmw-pod-pre-commit SUCCESS in 9m 12s
cifmw-molecule-adoption_osp_deploy FAILURE in 3m 58s

@ashu-011 ashu-011 force-pushed the fix_multicell branch 3 times, most recently from 749e391 to 3ed845e Compare April 24, 2026 15:29
@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/015783cbdaa244d5a153bb6980dfb8d8

✔️ openstack-k8s-operators-content-provider SUCCESS in 2h 15m 32s
✔️ podified-multinode-edpm-deployment-crc SUCCESS in 1h 24m 39s
✔️ cifmw-crc-podified-edpm-baremetal SUCCESS in 1h 38m 06s
✔️ cifmw-crc-podified-edpm-baremetal-minor-update SUCCESS in 2h 02m 40s
✔️ cifmw-pod-zuul-files SUCCESS in 4m 42s
✔️ noop SUCCESS in 0s
✔️ cifmw-pod-ansible-test SUCCESS in 9m 04s
✔️ cifmw-pod-pre-commit SUCCESS in 8m 49s
cifmw-molecule-adoption_osp_deploy FAILURE in 4m 24s

…n_vars template

The template logic was broken for multi-cell scenarios since commit 78bf394,
which replaced the multi-cell-aware loop with single-cell-only logic that only
checked for 'osp-computes' group.

This fix restores the original _stack_names-driven approach that:
- Loops through stacks (overcloud, cell1, cell2, etc.)
- Uses appropriate prefix for each stack ('' for overcloud, 'cell1-' for cell1)
- Generates edpm_nodes with nested cell structure
- Works for both single-cell and multi-cell scenarios
- Maintains consistency with source_mariadb_ip and source_galera_members

Also adds molecule test with multi-cell fixtures to verify the logic and
prevent future breakages.

Fixes: 78bf394 ("Add support for distributed DCN/AZ deployments")
Signed-off-by: Ashish Gupta <ashigupt@redhat.com>
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.

2 participants