c79c5d1f36
This patchset apply Nova rolling upgrade logic [1] [1] https://docs.openstack.org/nova/latest/user/upgrade.html Implements: blueprint apply-service-upgrade-procedure Co-Authored-By: Ha Manh Dong <donghm@vn.fujitsu.com> Depends-On: https://review.openstack.org/#/c/558765/ Change-Id: I20531a25dc7f5b05dc70ba771cf4c4222ade33e3
22 lines
735 B
YAML
22 lines
735 B
YAML
---
|
|
- name: Check nova upgrade status
|
|
become: true
|
|
command: docker exec -t nova_api nova-status upgrade check
|
|
register: nova_upgrade_check_stdout
|
|
when: inventory_hostname == groups['nova-api'][0]
|
|
|
|
- name: Upgrade status check result
|
|
fail:
|
|
msg:
|
|
- "There was an upgrade status check warning or failure!"
|
|
- "See the detail at https://docs.openstack.org/nova/latest/cli/nova-status.html#nova-status-checks"
|
|
vars:
|
|
first_nova_api_host: "{{ groups['nova-api'][0] }}"
|
|
when: hostvars[first_nova_api_host]['nova_upgrade_check_stdout']['rc'] != 0
|
|
|
|
- include_tasks: legacy_upgrade.yml
|
|
when: not nova_enable_rolling_upgrade | bool
|
|
|
|
- include_tasks: rolling_upgrade.yml
|
|
when: nova_enable_rolling_upgrade | bool
|