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 |
| register: registry_pod | ||
| retries: 60 | ||
| delay: 10 | ||
| until: |
There was a problem hiding this comment.
We need to check registry_pod.resources | length > 0 before referencing registry_pod.resources[0]. If this task executes while the pod is being recreated and the query returns an empty resources list, Ansible will throw a fatal list index out of range Python evaluation error and crash immediately instead of retrying.
Maybe this better way to write it WDYT?
until:
- registry_pod.resources | length > 0
- registry_pod.resources[0].spec.volumes[0].persistentVolumeClaim is defined
- registry_pod.resources[0].spec.volumes[0].persistentVolumeClaim.claimName == "pvc-registry"
- registry_pod.resources[0].status is defined
- registry_pod.resources[0].status.phase == "Running"
There was a problem hiding this comment.
Agreed, added the new condition.
|
|
||
| - name: Add registry domain resolution to /etc/hosts | ||
| block: | ||
| - name: Resolve apps ingress IP from /etc/hosts |
There was a problem hiding this comment.
Matching only $2 in awk ($2 ~ "apps...") assumes the wildcard domain is always the second column in /etc/hosts. Depending on how /etc/hosts was formatted by earlier stages or local resolution, the entry might have multiple hostnames/aliases where the apps domain sits in column $3 or beyond. Using grep with awk '{print $1}' ensures we reliably extract the IP address regardless of line ordering.
grep -E "apps.{{ ocp_cluster_name }}" /etc/hosts | awk '{print $1}' | head -n 1
There was a problem hiding this comment.
The original logic was ported from openshift-ir-plugin, but this looks like a reasonable change to me.
| - machine.openshift.io/cluster-api-machine-type=worker | ||
| register: ms_worker | ||
|
|
||
| - name: Set the expected workers replicas |
There was a problem hiding this comment.
When az_enable: true is set, OpenShift IPI provisions multiple worker MachineSets (one per Availability Zone). Standard k8s_info will return a list of all matching worker MachineSets, so taking resources[0] will arbitrarily scale only the first AZ's MachineSet.
Can we update this procedure to either iterate over all returned worker MachineSets or target a specific AZ/MachineSet name explicitly so scale-up works predictably in multi-AZ environments?
There was a problem hiding this comment.
Similar as the /etc/hosts apps IP lookup, this was ported to follow the same logic as in openshift-ir-plugin. But your suggestion makes sense, to scale predictably across all worker MachineSets, Updated to loop over each MachineSet (sorted by name)
bfbf9b9 to
569888c
Compare
Port the Nova + Cinder Availability Zones scenario from the legacy openshift-ir-plugin / rhos-infrared automation into the shiftstack-qa stages. The AZ job installs OCP IPI on OpenStack with one Nova aggregate per compute host (one AZ each), OCP masters/workers distributed evenly across the AZs, and rootVolumes placed on per-AZ Cinder backends. Post- install verification asserts the OCP nodes and their root volumes landed in the expected Nova and Cinder AZs. Stages/roles: - prepare: configure_az.yml creates host aggregates + per-AZ volume types, configure_az_ceph_crush.yml pins each per-AZ pool to its host-local OSDs. - install: discovers Nova/Cinder AZs (tools_cluster_checks/discover_az.yml) and renders zones + per-AZ rootVolume types/zones into install-config. - verification: check_azs.yml verifies Nova and Cinder AZ placement. - day2ops: scaleup_worker and cinder_registry (AZ-aware registry storage). - cleanup: remove_az.yml tears down aggregates and AZ volume types, gated by az_remove_on_cleanup. - jobs_definitions/availability_zones_4.22_nightly.yaml wires it together. All AZ behaviour is gated behind az_enable / openshift_root_volumes (default false), so non-AZ jobs are unaffected. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Change-Id: I45bdf61b3bc8e270c950e2e07590a736a9cd81ce Signed-off-by: Daniel Lawton <dlawton@redhat.com>
Ports the Nova + Cinder Availability Zones scenario from the legacy
openshift-ir-plugin / rhos-infrared automation into the shiftstack-qa
stages, so it can run under ci-framework on RHOSO 18.
What it does
Installs OCP IPI on OpenStack with one Nova aggregate per compute host
(one AZ each), OCP masters/workers distributed evenly across the AZs, and
rootVolumes placed on per-AZ Cinder backends. Post-install verification
asserts the OCP nodes and their root volumes landed in the expected Nova
and Cinder AZs. Day2 coverage includes worker scaleup and an AZ-aware
integrated-registry test.
Changes
configure_az.yml(host aggregates + per-AZ volume types),configure_az_ceph_crush.yml(pins each per-AZ pool to its host-localOSDs).
zonesandper-AZ rootVolume
types/zonesinto install-config.check_azs.ymlverifies Nova and Cinder AZ placement.scaleup_workerandcinder_registry.remove_az.yml, gated byaz_remove_on_cleanup.jobs_definitions/availability_zones_4.22_nightly.yamlties it together.Backward compatibility
All AZ behaviour is gated behind
az_enable/openshift_root_volumes(default
false). Existing shiftstack jobs are unaffected.Add Availability Zones (AZ) scenario support
Ports the Nova + Cinder Availability Zones scenario from the legacy
openshift-ir-plugin / rhos-infrared automation into the shiftstack-qa
stages, so it can run under ci-framework on RHOSO 18.
What it does
Installs OCP IPI on OpenStack with one Nova aggregate per compute host
(one AZ each), OCP masters/workers distributed evenly across the AZs, and
rootVolumes placed on per-AZ Cinder backends. Post-install verification
asserts the OCP nodes and their root volumes landed in the expected Nova
and Cinder AZs. Day2 coverage includes worker scaleup and an AZ-aware
integrated-registry test.
Changes
configure_az.yml(host aggregates + per-AZ volume types),configure_az_ceph_crush.yml(pins each per-AZ pool to its host-localOSDs).
zonesandper-AZ rootVolume
types/zonesinto install-config.check_azs.ymlverifies Nova and Cinder AZ placement.scaleup_workerandcinder_registry.remove_az.yml, gated byaz_remove_on_cleanup.jobs_definitions/availability_zones_4.22_nightly.yamlties it together.