diff options
author | Lucas Alvares Gomes <lucasagomes@gmail.com> | 2021-02-18 10:56:46 +0000 |
---|---|---|
committer | Lucas Alvares Gomes <lucasagomes@gmail.com> | 2021-03-15 09:41:03 +0000 |
commit | 20a7c98eff6592c3131360ad9d6eb12367dd11f6 (patch) | |
tree | c153f0701d63a43a26999adfa20c34944441d855 /roles | |
parent | 8a92bf8115d4ba08028158b0db431111c8e89512 (diff) | |
download | nova-20a7c98eff6592c3131360ad9d6eb12367dd11f6.tar.gz |
[OVN] Adapt the live-migration job scripts to work with OVN
There's no q-agt service in an OVN deployment.
Change-Id: Ia25c966c70542bcd02f5540b5b94896c17e49888
Signed-off-by: Lucas Alvares Gomes <lucasagomes@gmail.com>
Diffstat (limited to 'roles')
-rw-r--r-- | roles/run-evacuate-hook/tasks/main.yaml | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/roles/run-evacuate-hook/tasks/main.yaml b/roles/run-evacuate-hook/tasks/main.yaml index 184b9d18f9..9ca444a867 100644 --- a/roles/run-evacuate-hook/tasks/main.yaml +++ b/roles/run-evacuate-hook/tasks/main.yaml @@ -5,15 +5,25 @@ environment: SUBNODE_HOSTNAME: "{{ hostvars['compute1']['ansible_hostname'] }}" -- name: Fence subnode by stopping q-agt and n-cpu +- name: Fence subnode by stopping n-cpu delegate_to: compute1 become: true systemd: - name: "{{ item }}" + name: devstack@n-cpu state: stopped - with_items: - - devstack@q-agt - - devstack@n-cpu + +- name: Check if q-agt exists + shell: sudo systemctl status devstack@q-agt + ignore_errors: true + register: qagtstatus + +- name: Fence subnode by stopping q-agt (if exists) + delegate_to: compute1 + become: true + systemd: + name: devstack@q-agt + state: stopped + when: qagtstatus.rc | int == 0 - name: Register running domains on subnode delegate_to: compute1 |