Skip to content

Add tests for cinderBackups in dz-storage scenario#3927

Draft
gais-ameer-rh wants to merge 1 commit into
openstack-k8s-operators:mainfrom
gais-ameer-rh:cinderBackups
Draft

Add tests for cinderBackups in dz-storage scenario#3927
gais-ameer-rh wants to merge 1 commit into
openstack-k8s-operators:mainfrom
gais-ameer-rh:cinderBackups

Conversation

@gais-ameer-rh
Copy link
Copy Markdown

@gais-ameer-rh gais-ameer-rh commented May 13, 2026

[DZ-Storage] Add tests for cinderBackups
spec.cinder.template.cinderBackup (singluar) in DZ-Storage DT is
replaced with cinderBackups (plural) to deploy multiple cinder backups based on AZ topology.
hooks/playbooks/dz_storage_cinder_backups.yaml validates the behaviour of cinderBackups.

The playbook tests different scenarios of cinder backup creation
and restoring the backups across availability zones.

Jira: OSPRH-28342

Signed-off-by: Gais Ameer gameer@redhat.com
Co-Authored-By: Claude Sonnet 4.5 noreply@anthropic.com

@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci Bot commented May 13, 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 michburk 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

@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci Bot commented May 13, 2026

Hi @gais-ameer-rh. Thanks for your PR.

I'm waiting for a openstack-k8s-operators member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work.

Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@centosinfra-prod-github-app
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://gateway-cloud-softwarefactory.apps.ocp.cloud.ci.centos.org/zuul/t/rdoproject.org/buildset/3580cedda4a041b2b649fbafae4b9d29

✔️ openstack-k8s-operators-content-provider SUCCESS in 2h 27m 53s
✔️ podified-multinode-edpm-deployment-crc SUCCESS in 1h 35m 59s
✔️ cifmw-crc-podified-edpm-baremetal SUCCESS in 1h 29m 21s
✔️ cifmw-crc-podified-edpm-baremetal-minor-update SUCCESS in 2h 03m 51s
✔️ noop SUCCESS in 0s
✔️ cifmw-pod-ansible-test SUCCESS in 9m 56s
cifmw-pod-pre-commit FAILURE in 9m 51s

gais-ameer-rh added a commit to gais-ameer-rh/architecture that referenced this pull request May 14, 2026
To deploy multiple cinder backups based on AZ topology

Removes the existing spec.cinder.template.cinderBackup (singluar)
and replaces with cinderBackups (plural)

Depends-On: openstack-k8s-operators/ci-framework#3927

OSPRH-28342
@fultonj fultonj self-requested a review May 14, 2026 13:21
spec.cinder.template.cinderBackup (singluar) in DZ-Storage DT is
replaced with cinderBackups (plural) to deploy multiple cinder backups based on AZ topology.
hooks/playbooks/dz_storage_cinder_backups.yaml validates the behaviour of cinderBackups.

The playbook tests different scenarios of cinder backup creation
and restoring the backups across availability zones.

Jira: OSPRH-28342

Signed-off-by: Gais Ameer <gameer@redhat.com>
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
@gais-ameer-rh
Copy link
Copy Markdown
Author

recheck

Copy link
Copy Markdown
Contributor

@fultonj fultonj left a comment

Choose a reason for hiding this comment

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

Thanks Gais! A few suggestions.

failed_when: "'az1' not in vol_az1_restore_az1_zone.stdout"

# ==================================================================================
# Cleanup before Scenario 2
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.

Please remove lines 121-150. It will save CI Time.

I assume the clean up was done so names could be re-used in the subsequent scenario, but please use a different name instead.

# 1. AZ1 backs up to AZ1 and restores to AZ1
# 2. AZ1 backs up to AZ2 and restores to AZ1
# 3. AZ1 backs up to AZ2 and restores to AZ2

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.

Please try setting the environment on the play level instead of per task. That should make the playbook shorter. For example...

- name: Test Cinder backup and restore across availability zones
  hosts: "{{ cifmw_target_host | default('localhost') }}"
  environment:
    KUBECONFIG: "{{ cifmw_openshift_kubeconfig | default('/home/' + ansible_user | default('zuul') + '/.kube/config') }}"
    PATH: "{{ cifmw_path | default(ansible_env.PATH) }}"
  tasks:
    # Scenario 1: AZ1 backs up to AZ1 and restores to AZ1
    - name: "Scenario 1: Create volume in AZ1"
      ansible.builtin.command: >-
        oc rsh
        -n {{ cifmw_openstack_namespace }}
        openstackclient
        openstack volume create --size 1 vol-az1 --availability-zone az1 -f value -c id
      register: vol_az1_id

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