From 1d8627b360a8a26c9c82538629378b134651c22b Mon Sep 17 00:00:00 2001 From: Dmitriy Rabotyagov Date: Thu, 13 Jan 2022 14:05:35 +0200 Subject: [PATCH] Setup db/mq/service during scheduler run According to our playbook, role runs against api last, after scheduler, volume and backup services are already setup. It makes difference only when cinder-scheduler and cinder-api are deployed to different targets. Change-Id: I18f68b5cb9dd60d9cf72850e840d0459e1245b76 --- tasks/main.yml | 2 +- vars/main.yml | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/tasks/main.yml b/tasks/main.yml index c76457a2..555fd47a 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -134,7 +134,7 @@ - import_tasks: cinder_db_sync.yml when: - - _cinder_is_first_play_host + - _cinder_is_first_api_play_host tags: - cinder-config diff --git a/vars/main.yml b/vars/main.yml index 9338fc8a..4ea16605 100644 --- a/vars/main.yml +++ b/vars/main.yml @@ -13,7 +13,8 @@ # See the License for the specific language governing permissions and # limitations under the License. -_cinder_is_first_play_host: "{{ (cinder_services['cinder-api']['group'] in group_names and inventory_hostname == (groups[cinder_services['cinder-api']['group']] | intersect(ansible_play_hosts)) | first) | bool }}" +_cinder_is_first_api_play_host: "{{ (cinder_services['cinder-api']['group'] in group_names and inventory_hostname == (groups[cinder_services['cinder-api']['group']] | intersect(ansible_play_hosts)) | first) | bool }}" +_cinder_is_first_play_host: "{{ (cinder_services['cinder-scheduler']['group'] in group_names and inventory_hostname == (groups[cinder_services['cinder-scheduler']['group']] | intersect(ansible_play_hosts)) | first) | bool }}" _cinder_is_last_play_host: "{{ (cinder_services['cinder-api']['group'] in group_names and inventory_hostname == (groups[cinder_services['cinder-api']['group']] | intersect(ansible_play_hosts)) | last) | bool }}" _cinder_rootwrap_conf_overrides: