(multiple) Add roles for backup/restore functionality#3886
(multiple) Add roles for backup/restore functionality#3886abays wants to merge 1 commit intoopenstack-k8s-operators:mainfrom
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 |
|
Build failed (check pipeline). Post https://softwarefactory-project.io/zuul/t/rdoproject.org/buildset/53bd5aeecb3c49f2a2b055441269b372 ✔️ openstack-k8s-operators-content-provider SUCCESS in 2h 19m 39s |
|
Build failed (check pipeline). Post https://softwarefactory-project.io/zuul/t/rdoproject.org/buildset/bdf74b0181114163974bebdac49d4001 ✔️ openstack-k8s-operators-content-provider SUCCESS in 2h 14m 41s |
|
recheck Zuul seems to be stuck |
|
Build failed (check pipeline). Post ✔️ openstack-k8s-operators-content-provider SUCCESS in 12m 27s |
| - name: Setup MinIO | ||
| ansible.builtin.include_role: | ||
| name: deploy_minio | ||
| when: cifmw_backup_restore_install_deps | default(true) | bool |
There was a problem hiding this comment.
don't think that default is needed here, because in L65 you set the var
| 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 |
| hosts: "{{ cifmw_target_host | default('localhost') }}" | ||
| gather_facts: true | ||
|
|
||
| vars: |
There was a problem hiding this comment.
IMHO vars should be deleted and relay on |default(true/falce) value.
| - name: Create test workload | ||
| when: cifmw_backup_restore_create_workload | default(true) | bool | ||
| vars: | ||
| cifmw_update_ping_test: true |
There was a problem hiding this comment.
is it not set in vars on the top of the playbook?
| 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" |
There was a problem hiding this comment.
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') }}" |
There was a problem hiding this comment.
don't we want to fail, when csv is none?
| - compliance | ||
|
|
||
| - name: Run backup and restore test | ||
| ansible.builtin.import_playbook: playbooks/backup_restore.yaml |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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>
|
Build failed (check pipeline). Post ✔️ openstack-k8s-operators-content-provider SUCCESS in 2h 04m 50s |
|
recheck |
|
Build failed (check pipeline). Post ✔️ openstack-k8s-operators-content-provider SUCCESS in 1h 37m 00s |
|
recheck |
|
Build failed (check pipeline). Post ✔️ openstack-k8s-operators-content-provider SUCCESS in 1h 35m 46s |
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