Skip to content

Commit

Permalink
Merge pull request #372 from jistr/f-rollback-tests
Browse files Browse the repository at this point in the history
Tests for the control plane rollback
  • Loading branch information
jistr authored Apr 3, 2024
2 parents 4a5864b + 1052296 commit 2638b92
Show file tree
Hide file tree
Showing 10 changed files with 340 additions and 39 deletions.
72 changes: 40 additions & 32 deletions docs_user/modules/openstack-rolling_back.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -38,38 +38,44 @@ procedure:

----
ServicesToStart=("tripleo_horizon.service"
"tripleo_keystone.service"
"tripleo_cinder_api.service"
"tripleo_cinder_api_cron.service"
"tripleo_cinder_scheduler.service"
"tripleo_cinder_backup.service"
"tripleo_glance_api.service"
"tripleo_manila_api.service"
"tripleo_manila_api_cron.service"
"tripleo_manila_scheduler.service"
"tripleo_neutron_api.service"
"tripleo_nova_api.service"
"tripleo_placement_api.service"
"tripleo_nova_api_cron.service"
"tripleo_nova_api.service"
"tripleo_nova_conductor.service"
"tripleo_nova_metadata.service"
"tripleo_nova_scheduler.service"
"tripleo_nova_vnc_proxy.service"
"tripleo_aodh_api.service"
"tripleo_aodh_api_cron.service"
"tripleo_aodh_evaluator.service"
"tripleo_aodh_listener.service"
"tripleo_aodh_notifier.service"
"tripleo_ceilometer_agent_central.service"
"tripleo_ceilometer_agent_compute.service"
"tripleo_ceilometer_agent_ipmi.service"
"tripleo_ceilometer_agent_notification.service"
"tripleo_ovn_cluster_northd.service")
PacemakerResourcesToStart=("openstack-cinder-volume"
"openstack-cinder-backup"
"openstack-manila-share")
"tripleo_keystone.service"
"tripleo_barbican_api.service"
"tripleo_barbican_worker.service"
"tripleo_barbican_keystone_listener.service"
"tripleo_cinder_api.service"
"tripleo_cinder_api_cron.service"
"tripleo_cinder_scheduler.service"
"tripleo_cinder_volume.service"
"tripleo_cinder_backup.service"
"tripleo_glance_api.service"
"tripleo_manila_api.service"
"tripleo_manila_api_cron.service"
"tripleo_manila_scheduler.service"
"tripleo_neutron_api.service"
"tripleo_placement_api.service"
"tripleo_nova_api_cron.service"
"tripleo_nova_api.service"
"tripleo_nova_conductor.service"
"tripleo_nova_metadata.service"
"tripleo_nova_scheduler.service"
"tripleo_nova_vnc_proxy.service"
"tripleo_aodh_api.service"
"tripleo_aodh_api_cron.service"
"tripleo_aodh_evaluator.service"
"tripleo_aodh_listener.service"
"tripleo_aodh_notifier.service"
"tripleo_ceilometer_agent_central.service"
"tripleo_ceilometer_agent_compute.service"
"tripleo_ceilometer_agent_ipmi.service"
"tripleo_ceilometer_agent_notification.service"
"tripleo_ovn_cluster_northd.service")
PacemakerResourcesToStart=("galera-bundle"
"haproxy-bundle"
"rabbitmq-bundle"
"openstack-cinder-volume"
"openstack-cinder-backup"
"openstack-manila-share")
echo "Starting systemd OpenStack services"
for service in ${ServicesToStart[*]}; do
Expand Down Expand Up @@ -172,6 +178,8 @@ while oc get pod | grep openstack-galera-0; do
sleep 2
done
oc delete --ignore-not-found=true --wait=false pod mariadb-copy-data
oc delete --ignore-not-found=true --wait=false pvc mariadb-data
oc delete --ignore-not-found=true --wait=false pod ovn-copy-data
oc delete --ignore-not-found=true secret osp-secret
----
Expand Down
1 change: 0 additions & 1 deletion docs_user/modules/openstack-stop_openstack_services.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,6 @@ ServicesToStop=("tripleo_horizon.service"
"tripleo_manila_api_cron.service"
"tripleo_manila_scheduler.service"
"tripleo_neutron_api.service"
"tripleo_nova_api.service"
"tripleo_placement_api.service"
"tripleo_nova_api_cron.service"
"tripleo_nova_api.service"
Expand Down
6 changes: 3 additions & 3 deletions tests/playbooks/test_minimal.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -54,12 +54,12 @@
- role: horizon_adoption
tags:
- horizon_adoption
- role: heat_adoption
tags:
- heat_adoption
- role: stop_remaining_services
tags:
- stop_remaining_services
- role: dataplane_adoption
tags:
- dataplane_adoption
- role: heat_adoption
tags:
- heat_adoption
66 changes: 66 additions & 0 deletions tests/playbooks/test_rollback_minimal.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
- name: Common pre-adoption tasks
import_playbook: _before_adoption.yaml

- name: Control plane adoption and rollback
hosts: local
gather_facts: false
force_handlers: true
module_defaults:
ansible.builtin.shell:
executable: /bin/bash
roles:
- role: development_environment
tags:
- development_environment
- role: backend_services
tags:
- backend_services
- role: pull_openstack_configuration
tags:
- pull_openstack_configuration
- role: stop_openstack_services
tags:
- stop_openstack_services
- role: mariadb_copy
tags:
- mariadb_copy
- role: ovn_adoption
tags:
- ovn_adoption
- role: keystone_adoption
tags:
- keystone_adoption
- role: barbican_adoption
tags:
- barbican_adoption
- role: neutron_adoption
tags:
- neutron_adoption
- role: swift_adoption
tags:
- swift_adoption
- role: glance_adoption
tags:
- glance_adoption
- role: placement_adoption
tags:
- placement_adoption
- role: nova_adoption
tags:
- nova_adoption
- role: cinder_adoption
tags:
- cinder_adoption
- role: horizon_adoption
tags:
- horizon_adoption
- role: heat_adoption
tags:
- heat_adoption
- role: stop_remaining_services
tags:
- stop_remaining_services

- role: control_plane_rollback
tags:
- control_plane_rollback
73 changes: 73 additions & 0 deletions tests/playbooks/test_rollback_with_ceph.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
- name: Common pre-adoption tasks
import_playbook: _before_adoption.yaml

- name: Control plane adoption and rollback
hosts: local
gather_facts: false
vars:
glance_backend: ceph
manila_backend: cephfs
cinder_volume_backend: ceph
cinder_backup_backend: ceph
module_defaults:
ansible.builtin.shell:
executable: /bin/bash
roles:
- role: development_environment
tags:
- development_environment
- role: backend_services
tags:
- backend_services
- role: ceph_backend_configuration
tags:
- ceph_backend_configuration
- role: pull_openstack_configuration
tags:
- pull_openstack_configuration
- role: stop_openstack_services
tags:
- stop_openstack_services
- role: mariadb_copy
tags:
- mariadb_copy
- role: ovn_adoption
tags:
- ovn_adoption
- role: keystone_adoption
tags:
- keystone_adoption
- role: barbican_adoption
tags:
- barbican_adoption
- role: neutron_adoption
tags:
- neutron_adoption
- role: glance_adoption
tags:
- glance_adoption
- role: placement_adoption
tags:
- placement_adoption
- role: nova_adoption
tags:
- nova_adoption
- role: cinder_adoption
tags:
- cinder_adoption
- role: horizon_adoption
tags:
- horizon_adoption
- role: heat_adoption
tags:
- heat_adoption
- role: manila_adoption
tags:
- manila_adoption
- role: stop_remaining_services
tags:
- stop_remaining_services

- role: control_plane_rollback
tags:
- control_plane_rollback
2 changes: 2 additions & 0 deletions tests/roles/control_plane_rollback/defaults/main.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
control_plane_rollback_verify_command: |
$CONTROLLER1_SSH OS_CLOUD=standalone openstack user list
2 changes: 2 additions & 0 deletions tests/roles/control_plane_rollback/meta/main.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
dependencies:
- role: common_defaults
Loading

0 comments on commit 2638b92

Please sign in to comment.