[cinder_multiattach] Wait for Glance reconciliation after config patch#4060
[cinder_multiattach] Wait for Glance reconciliation after config patch#4060fmount wants to merge 1 commit into
Conversation
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
01cbd8f to
e43ecfe
Compare
e43ecfe to
3330406
Compare
|
Build failed (check pipeline). Post ✔️ openstack-k8s-operators-content-provider SUCCESS in 2h 44m 33s |
|
The failure in the precommit job looks legit, but please wait before updating this as I'm testing it |
3330406 to
3b8144e
Compare
|
Build failed (check pipeline). Post ✔️ openstack-k8s-operators-content-provider SUCCESS in 1h 54m 49s |
|
recheck |
|
Build failed (check pipeline). Post ✔️ openstack-k8s-operators-content-provider SUCCESS in 2h 59m 06s |
77a964b to
c6612d0
Compare
|
Build failed (check pipeline). Post ✔️ openstack-k8s-operators-content-provider SUCCESS in 2h 30m 28s |
c6612d0 to
aaa3ded
Compare
|
Build failed (check pipeline). Post ✔️ openstack-k8s-operators-content-provider SUCCESS in 2h 30m 43s |
b655707 to
ff90252
Compare
The oc wait --for=condition=Ready on the controlplane returns immediately when the condition is already true, before the StatefulSet rolling update triggered by the config change completes. This causes a race with subsequent hooks (e.g. amphora image upload) that depend on Glance being stable. Replace the inline oc wait with two explicit steps: 1. Poll the Glance CR until customServiceConfig reflects the change 2. Wait for both the glance CR and the controlplane Ready condition after reconciliation starts (Ready=False) Closes: OSPCIX-1454 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Signed-off-by: Francesco Pantano <fpantano@redhat.com>
ff90252 to
8334297
Compare
| - name: Block to configure cinder_volume_type when needed | ||
| when: configure_cinder_volume_type | default(false) | bool | ||
| block: | ||
| - name: Get OpenStackControlPlane CR name |
There was a problem hiding this comment.
(blocking) suggestion: Could you use ansible k8s_info?
(non-blocking) Do we want to add retry logic?
| set -xe -o pipefail | ||
| crname=$(oc get openstackcontrolplane -o name -n {{ namespace }}) | ||
| oc -n {{ namespace }} get ${crname} -o jsonpath={.spec.glance.template.customServiceConfig} > {{ _glance_custom_service_config_file.path }} | ||
| oc -n {{ namespace }} get {{ _ctlplane_name.stdout }} -o jsonpath={.spec.glance.template.customServiceConfig} > {{ _glance_custom_service_config_file.path }} |
There was a problem hiding this comment.
praise: this is much better!!
| # reconciliation has not propagated yet. Wait for Glance to | ||
| # enter reconciliation (Ready=False) before waiting for it | ||
| # and the controlplane to become Ready again. | ||
| - name: Get Glance CR name # noqa: no-handler |
There was a problem hiding this comment.
(blocking) suggestion: can we use k8s_info?
| @@ -37,8 +47,7 @@ | |||
| - name: Write current glance customServiceConfig to tempfile | |||
| ansible.builtin.shell: | | |||
There was a problem hiding this comment.
(non-blocking) thought would be awesome if we refactor this eventually! to follow a more ansible idiomantic approach
The
oc wait --for=condition=Readyon thecontrolplanereturns immediately when the condition is already true, before theStatefulSetrolling update triggered by the config change completes.This causes a race with subsequent hooks (e.g. amphora image upload) that depend on
Glancebeing stable.This patch replaces the inline
oc waitwith two explicit steps:Glance CRuntilcustomServiceConfigreflects the change (oc applyhappened and therolloutstarted)controlplaneReadycondition after reconciliation starts (which is what we had previously)Closes: OSPCIX-1454