From 60c22c38ccfd253dec3766ad58c4b16d3a74f467 Mon Sep 17 00:00:00 2001 From: Takashi Kajinami Date: Mon, 15 Feb 2021 10:02:23 +0900 Subject: [PATCH] Stop non-pcmk services of manila and cinder during upgrade This change implements missing external_upgrade_tasks for non-pcmk services of manila and cinder, to ensure that we don't have mixed versions of controller services running at the same time during upgrade. These tasks should have been implemented in the initial patch[1], but missed at that time unfortunately. [1] 8529ce60da84d2aa1e1c9e6994303678261b09da Change-Id: I35ea4354a7448a23d6517f9777ed022caa79347a --- .../cinder/cinder-backup-container-puppet.yaml | 15 +++++++++++++++ .../cinder/cinder-volume-container-puppet.yaml | 15 +++++++++++++++ .../manila/manila-api-container-puppet.yaml | 15 +++++++++++++++ .../manila/manila-scheduler-container-puppet.yaml | 15 +++++++++++++++ .../manila/manila-share-container-puppet.yaml | 15 +++++++++++++++ 5 files changed, 75 insertions(+) diff --git a/deployment/cinder/cinder-backup-container-puppet.yaml b/deployment/cinder/cinder-backup-container-puppet.yaml index 6d5a6f58cb..f9435ea39d 100644 --- a/deployment/cinder/cinder-backup-container-puppet.yaml +++ b/deployment/cinder/cinder-backup-container-puppet.yaml @@ -219,3 +219,18 @@ outputs: name: virt_sandbox_use_netlink persistent: yes state: yes + external_upgrade_tasks: + - when: + - step|int == 1 + tags: + - never + - system_upgrade_transfer_data + - system_upgrade_stop_services + block: + - name: Stop cinder backup container + import_role: + name: tripleo_container_stop + vars: + tripleo_containers_to_stop: + - cinder_backup + tripleo_delegate_to: "{{ groups['cinder_backup'] | default([]) }}" diff --git a/deployment/cinder/cinder-volume-container-puppet.yaml b/deployment/cinder/cinder-volume-container-puppet.yaml index 0b64a97baa..ad83bb18f6 100644 --- a/deployment/cinder/cinder-volume-container-puppet.yaml +++ b/deployment/cinder/cinder-volume-container-puppet.yaml @@ -360,3 +360,18 @@ outputs: volumes: {get_attr: [CinderCommon, cinder_volume_volumes]} environment: {get_attr: [CinderCommon, cinder_volume_environment]} host_prep_tasks: {get_attr: [CinderCommon, cinder_volume_host_prep_tasks]} + external_upgrade_tasks: + - when: + - step|int == 1 + tags: + - never + - system_upgrade_transfer_data + - system_upgrade_stop_services + block: + - name: Stop cinder volume container + import_role: + name: tripleo_container_stop + vars: + tripleo_containers_to_stop: + - cinder_volume + tripleo_delegate_to: "{{ groups['cinder_volume'] | default([]) }}" diff --git a/deployment/manila/manila-api-container-puppet.yaml b/deployment/manila/manila-api-container-puppet.yaml index 17774bc80f..e4b4a1874c 100644 --- a/deployment/manila/manila-api-container-puppet.yaml +++ b/deployment/manila/manila-api-container-puppet.yaml @@ -270,3 +270,18 @@ outputs: - { 'path': /var/log/containers/manila, 'setype': container_file_t, 'mode': '0750' } - { 'path': /var/log/containers/httpd/manila-api, 'setype': container_file_t, 'mode': '0750' } upgrade_tasks: [] + external_upgrade_tasks: + - when: + - step|int == 1 + tags: + - never + - system_upgrade_transfer_data + - system_upgrade_stop_services + block: + - name: Stop manila api container + import_role: + name: tripleo_container_stop + vars: + tripleo_containers_to_stop: + - manila_api + tripleo_delegate_to: "{{ groups['manila_api'] | default([]) }}" diff --git a/deployment/manila/manila-scheduler-container-puppet.yaml b/deployment/manila/manila-scheduler-container-puppet.yaml index b6de7071ef..69c5947e89 100644 --- a/deployment/manila/manila-scheduler-container-puppet.yaml +++ b/deployment/manila/manila-scheduler-container-puppet.yaml @@ -117,3 +117,18 @@ outputs: persistent: yes state: yes upgrade_tasks: [] + external_upgrade_tasks: + - when: + - step|int == 1 + tags: + - never + - system_upgrade_transfer_data + - system_upgrade_stop_services + block: + - name: Stop manila scheduler container + import_role: + name: tripleo_container_stop + vars: + tripleo_containers_to_stop: + - manila_scheduler + tripleo_delegate_to: "{{ groups['manila_scheduler'] | default([]) }}" diff --git a/deployment/manila/manila-share-container-puppet.yaml b/deployment/manila/manila-share-container-puppet.yaml index 18bcca75b0..16418e4d65 100644 --- a/deployment/manila/manila-share-container-puppet.yaml +++ b/deployment/manila/manila-share-container-puppet.yaml @@ -196,3 +196,18 @@ outputs: path: {get_param:CephConfigPath} state: directory upgrade_tasks: [] + external_upgrade_tasks: + - when: + - step|int == 1 + tags: + - never + - system_upgrade_transfer_data + - system_upgrade_stop_services + block: + - name: Stop manila share container + import_role: + name: tripleo_container_stop + vars: + tripleo_containers_to_stop: + - manila_share + tripleo_delegate_to: "{{ groups['manila_share'] | default([]) }}"