Merge "Fix Newton cinder-manage check used in db-upgrades"
This commit is contained in:
commit
7e2a830976
@ -41,16 +41,20 @@
|
|||||||
hosts: "cinder_all[0]"
|
hosts: "cinder_all[0]"
|
||||||
user: root
|
user: root
|
||||||
tasks:
|
tasks:
|
||||||
|
- name: Check the service list
|
||||||
|
shell: mysql -Be 'select `binary`,`host` from services;' cinder | awk '{if (NR!=1) {print $1, $2}}'
|
||||||
|
args:
|
||||||
|
executable: /bin/bash
|
||||||
|
changed_when: false
|
||||||
|
delegate_to: "{{ groups['utility_all'][0] }}"
|
||||||
|
register: cinder_service_list
|
||||||
- name: Perform a cinder DB sync
|
- name: Perform a cinder DB sync
|
||||||
command: "{{ venv_path }}/bin/cinder-manage db sync"
|
command: "{{ venv_path }}/bin/cinder-manage db sync"
|
||||||
- name: Perform service purge
|
- name: Perform service purge
|
||||||
shell: |
|
shell: "{{ venv_path }}/bin/cinder-manage service remove {{ item }}"
|
||||||
IFS=$'\n'
|
|
||||||
for i in $({{ venv_path }}/bin/cinder-manage service list | awk '/None/ {print $1, $2}'); do
|
|
||||||
eval "{{ venv_path }}/bin/cinder-manage service remove $i"
|
|
||||||
done
|
|
||||||
args:
|
args:
|
||||||
executable: /bin/bash
|
executable: /bin/bash
|
||||||
|
with_items: "{{ cinder_service_list.stdout_lines }}"
|
||||||
|
|
||||||
- name: Nova DB Migrations
|
- name: Nova DB Migrations
|
||||||
hosts: "nova_api_os_compute[0]"
|
hosts: "nova_api_os_compute[0]"
|
||||||
|
Loading…
Reference in New Issue
Block a user