Skip to content

(multiple) Add roles for backup/restore functionality#3886

Open
abays wants to merge 1 commit intoopenstack-k8s-operators:mainfrom
abays:backup_restore3
Open

(multiple) Add roles for backup/restore functionality#3886
abays wants to merge 1 commit intoopenstack-k8s-operators:mainfrom
abays:backup_restore3

Conversation

@abays
Copy link
Copy Markdown
Contributor

@abays abays commented Apr 23, 2026

Add three new Ansible roles for OpenStack on OpenShift backup and
restore using OADP (OpenShift API for Data Protection) and Velero:

  • cifmw_backup_restore: orchestrates backup, restore, and cleanup of OpenStack control plane and data plane resources, including Galera database dumps, Velero CSI volume snapshots, and ordered multi-phase restore sequences.

  • openshift_adp: installs and configures the OADP operator with an S3-compatible storage backend, creates the DataProtectionApplication CR, sets up VolumeSnapshotClass for CSI snapshots, and verifies the BackupStorageLocation is available.

  • deploy_minio: deploys MinIO as a lightweight S3-compatible object store for use as the Velero backup target in development and CI environments.

Also adds playbooks (backup_restore.yaml, backup_restore_tasks.yaml)
to integrate backup and restore into the post-deployment pipeline.

Signed-off-by: Andrew Bays abays@redhat.com
Signed-off-by: Martin Schuppert mschuppert@redhat.com

@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci Bot commented Apr 23, 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 eshulman2 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

@abays abays requested review from danpawlik and evallesp April 23, 2026 13:27
@abays abays force-pushed the backup_restore3 branch from 9113297 to bd28a16 Compare April 23, 2026 13:42
@abays abays changed the title [cifmw_backup_restore] Add role for backup/restore functionality (multiple) Add roles for backup/restore functionality Apr 23, 2026
@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/53bd5aeecb3c49f2a2b055441269b372

✔️ openstack-k8s-operators-content-provider SUCCESS in 2h 19m 39s
✔️ podified-multinode-edpm-deployment-crc SUCCESS in 1h 21m 43s
✔️ cifmw-crc-podified-edpm-baremetal SUCCESS in 1h 28m 19s
✔️ cifmw-crc-podified-edpm-baremetal-minor-update SUCCESS in 2h 07m 15s
cifmw-pod-zuul-files FAILURE in 4m 38s
✔️ noop SUCCESS in 0s
✔️ cifmw-pod-ansible-test SUCCESS in 9m 00s
cifmw-pod-pre-commit FAILURE in 8m 03s

@abays abays force-pushed the backup_restore3 branch from bd28a16 to f895e3a Compare April 24, 2026 11:59
@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/bdf74b0181114163974bebdac49d4001

✔️ openstack-k8s-operators-content-provider SUCCESS in 2h 14m 41s
✔️ podified-multinode-edpm-deployment-crc SUCCESS in 1h 26m 18s
✔️ cifmw-crc-podified-edpm-baremetal SUCCESS in 1h 38m 13s
✔️ cifmw-crc-podified-edpm-baremetal-minor-update SUCCESS in 2h 01m 11s
cifmw-pod-zuul-files FAILURE in 5m 06s
✔️ noop SUCCESS in 0s
✔️ cifmw-pod-ansible-test SUCCESS in 8m 53s
cifmw-pod-pre-commit FAILURE in 8m 59s

@abays
Copy link
Copy Markdown
Contributor Author

abays commented Apr 30, 2026

recheck

Zuul seems to be stuck

@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/rdo/buildset/f256b54bd75545b094a3e13373e18b4f

✔️ openstack-k8s-operators-content-provider SUCCESS in 12m 27s
podified-multinode-edpm-deployment-crc RETRY_LIMIT in 31s
cifmw-crc-podified-edpm-baremetal RETRY_LIMIT in 29s
cifmw-crc-podified-edpm-baremetal-minor-update RETRY_LIMIT in 28s
✔️ cifmw-pod-zuul-files SUCCESS in 4m 58s
✔️ noop SUCCESS in 0s
✔️ cifmw-pod-ansible-test SUCCESS in 9m 20s
✔️ cifmw-pod-pre-commit SUCCESS in 8m 51s
✔️ cifmw-molecule-cifmw_backup_restore SUCCESS in 2m 11s
✔️ cifmw-molecule-deploy_minio SUCCESS in 2m 06s
✔️ cifmw-molecule-openshift_adp SUCCESS in 2m 12s

Comment thread playbooks/backup_restore.yaml Outdated
- name: Setup MinIO
ansible.builtin.include_role:
name: deploy_minio
when: cifmw_backup_restore_install_deps | default(true) | bool
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.

don't think that default is needed here, because in L65 you set the var

Comment thread playbooks/backup_restore.yaml Outdated
vars:
cifmw_openshift_adp_s3_access_key: "{{ cifmw_deploy_minio_access_key }}"
cifmw_openshift_adp_s3_secret_key: "{{ cifmw_deploy_minio_secret_key }}"
when: cifmw_backup_restore_install_deps | default(true) | bool
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.

same

Comment thread playbooks/backup_restore.yaml Outdated
hosts: "{{ cifmw_target_host | default('localhost') }}"
gather_facts: true

vars:
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.

IMHO vars should be deleted and relay on |default(true/falce) value.

Comment thread playbooks/backup_restore.yaml Outdated
- name: Create test workload
when: cifmw_backup_restore_create_workload | default(true) | bool
vars:
cifmw_update_ping_test: true
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.

is it not set in vars on the top of the playbook?

Comment thread playbooks/backup_restore.yaml Outdated
cifmw_update_control_plane_check: false
cifmw_update_artifacts_basedir_suffix: "tests/update"
cifmw_update_artifacts_basedir: "{{ ansible_user_dir }}/ci-framework-data/{{ cifmw_update_artifacts_basedir_suffix }}"
cifmw_update_workload_launch_script: "{{ cifmw_update_artifacts_basedir }}/workload_launch.sh"
Copy link
Copy Markdown
Contributor

@danpawlik danpawlik Apr 30, 2026

Choose a reason for hiding this comment

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

is it used somewhere or Github is hiding something?
I see it is used in update role, but it has already default value


- name: Set operator version facts
ansible.builtin.set_fact:
_backup_csv_version: "{{ _operator_csv_version.stdout | default('unknown') }}"
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.

don't we want to fail, when csv is none?

Comment thread roles/cifmw_backup_restore/tasks/backup.yml
Comment thread post-deployment.yml Outdated
- compliance

- name: Run backup and restore test
ansible.builtin.import_playbook: playbooks/backup_restore.yaml
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.

That part is...problematic.
We used to drop import_playbook or nested ansible execution, because of the variable overwriting. Maybe would be better to move the playbook into some tasks file in the role and just call it? Then include_role/import_role would be better. More, you can set the vars in default instead of repeating |default() and if the playbook backup_restore.yaml needs to stay, you can also call the task file.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Alright, I'll talk to @stuggi about that

  Add three new Ansible roles for OpenStack on OpenShift backup and
  restore using OADP (OpenShift API for Data Protection) and Velero:

  - cifmw_backup_restore: orchestrates backup, restore, and cleanup of
    OpenStack control plane and data plane resources, including Galera
    database dumps, Velero CSI volume snapshots, and ordered multi-phase
    restore sequences.

  - openshift_adp: installs and configures the OADP operator with an
    S3-compatible storage backend, creates the DataProtectionApplication
    CR, sets up VolumeSnapshotClass for CSI snapshots, and verifies the
    BackupStorageLocation is available.

  - deploy_minio: deploys MinIO as a lightweight S3-compatible object
    store for use as the Velero backup target in development and CI
    environments.

  Also adds playbooks (backup_restore.yaml, backup_restore_tasks.yaml)
  to integrate backup and restore into the post-deployment pipeline.

Signed-off-by: Andrew Bays <abays@redhat.com>
Signed-off-by: Martin Schuppert <mschuppert@redhat.com>
@abays abays force-pushed the backup_restore3 branch from f0f66d5 to ab71e14 Compare April 30, 2026 19:32
@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/rdo/buildset/d48f5275a9364111ad351b6439ab0207

✔️ openstack-k8s-operators-content-provider SUCCESS in 2h 04m 50s
✔️ podified-multinode-edpm-deployment-crc SUCCESS in 1h 19m 28s
cifmw-crc-podified-edpm-baremetal RETRY_LIMIT in 27s
cifmw-crc-podified-edpm-baremetal-minor-update RETRY_LIMIT in 26s
✔️ cifmw-pod-zuul-files SUCCESS in 5m 26s
✔️ noop SUCCESS in 0s
✔️ cifmw-pod-ansible-test SUCCESS in 9m 51s
✔️ cifmw-pod-pre-commit SUCCESS in 9m 01s
✔️ cifmw-molecule-cifmw_backup_restore SUCCESS in 2m 07s
✔️ cifmw-molecule-deploy_minio SUCCESS in 2m 06s
✔️ cifmw-molecule-openshift_adp SUCCESS in 2m 10s

@abays
Copy link
Copy Markdown
Contributor Author

abays commented Apr 30, 2026

recheck

@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/rdo/buildset/c0b3b5d7b7144c5980e3796d9b7cd536

✔️ openstack-k8s-operators-content-provider SUCCESS in 1h 37m 00s
✔️ podified-multinode-edpm-deployment-crc SUCCESS in 1h 22m 48s
cifmw-crc-podified-edpm-baremetal RETRY_LIMIT in 28s
cifmw-crc-podified-edpm-baremetal-minor-update RETRY_LIMIT in 26s
✔️ cifmw-pod-zuul-files SUCCESS in 6m 39s
✔️ noop SUCCESS in 0s
✔️ cifmw-pod-ansible-test SUCCESS in 11m 14s
✔️ cifmw-pod-pre-commit SUCCESS in 10m 45s
✔️ cifmw-molecule-cifmw_backup_restore SUCCESS in 2m 17s
✔️ cifmw-molecule-deploy_minio SUCCESS in 2m 25s
✔️ cifmw-molecule-openshift_adp SUCCESS in 2m 22s

@abays
Copy link
Copy Markdown
Contributor Author

abays commented May 1, 2026

recheck

@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/rdo/buildset/c7cbbb84a46548b99d6313dc7900bc41

✔️ openstack-k8s-operators-content-provider SUCCESS in 1h 35m 46s
✔️ podified-multinode-edpm-deployment-crc SUCCESS in 1h 22m 58s
cifmw-crc-podified-edpm-baremetal RETRY_LIMIT in 27s
cifmw-crc-podified-edpm-baremetal-minor-update RETRY_LIMIT in 31s
✔️ cifmw-pod-zuul-files SUCCESS in 5m 27s
✔️ noop SUCCESS in 0s
✔️ cifmw-pod-ansible-test SUCCESS in 9m 21s
✔️ cifmw-pod-pre-commit SUCCESS in 9m 04s
✔️ cifmw-molecule-cifmw_backup_restore SUCCESS in 2m 06s
✔️ cifmw-molecule-deploy_minio SUCCESS in 2m 02s
✔️ cifmw-molecule-openshift_adp SUCCESS in 2m 03s

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants