(multiple) Allow OCP cluster reuse when switching architectures - #4145
Conversation
The devscripts compliance check in `110_check_ocp.yml` required an exact match of extra disk volume count to consider an existing OCP deployment reusable. When switching architectures after a non-deepscrub clean (e.g. va-multi with 3 extra disks to va-hci with 2), the volume count mismatch forced a full `make clean` followed by `make all`, triggering an hour-plus OCP rebuild that is unnecessary — the OCP boot disk images are architecture-agnostic and extra disks are blank storage volumes that `deploy_layout.yml` recreates with the correct count. Remove `_needed_volumes` from the compliance condition so that the boot disk image count and cluster directory are sufficient to determine reusability. Clean up stale volume attachment XML files during non-deepscrub cleanup to prevent a decrease in `extra_disks_num` from leaving orphan XMLs that would cause `create_vms.yml` to attach the wrong number of disks. Add a safety-net block in `ocp_layout.yml` to restore libvirt networks destroyed by `make clean` for cases where a genuine full rebuild is still required (e.g. master count change). Co-authored-by: Cursor <cursoragent@cursor.com> Signed-off-by: Andrew Bays <abays@redhat.com>
PR Summary by QodoAllow OCP cluster reuse across architecture switches
AI Description
Diagram
High-Level Assessment
Files changed (3)
|
Code Review by Qodo
1.
|
|
Build failed (check pipeline). Post ✔️ openstack-k8s-operators-content-provider SUCCESS in 3h 24m 31s |
Could be related. Let's retry and see what happens. |
|
recheck |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: nemarjan The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
04593d8
into
openstack-k8s-operators:main
The devscripts compliance check in
110_check_ocp.ymlrequired an exact match of extra disk volume count to consider an existing OCP deployment reusable. When switching architectures after a non-deepscrub clean (e.g. va-multi with 3 extra disks to va-hci with 2), the volume count mismatch forced a fullmake cleanfollowed bymake all, triggering an hour-plus OCP rebuild that is unnecessary — the OCP boot disk images are architecture-agnostic and extra disks are blank storage volumes thatdeploy_layout.ymlrecreates with the correct count.Remove
_needed_volumesfrom the compliance condition so that the boot disk image count and cluster directory are sufficient to determine reusability. Clean up stale volume attachment XML files during non-deepscrub cleanup to prevent a decrease inextra_disks_numfrom leaving orphan XMLs that would causecreate_vms.ymlto attach the wrong number of disks. Add a safety-net block inocp_layout.ymlto restore libvirt networks destroyed bymake cleanfor cases where a genuine full rebuild is still required (e.g. master count change).