FFU: Fix nova fast forward steps
We need to check the running services only on step 0. We need to provide correct nova_cell0 DB url. Change-Id: I1817f4da5578005c95570b77ce5e85380ac3ecf6
This commit is contained in:
parent
d0a03972a6
commit
30382323ce
@ -53,6 +53,10 @@ parameters:
|
|||||||
description: >
|
description: >
|
||||||
Setting this to a unique value will re-run any deployment tasks which
|
Setting this to a unique value will re-run any deployment tasks which
|
||||||
perform configuration on a Heat stack-update.
|
perform configuration on a Heat stack-update.
|
||||||
|
NovaPassword:
|
||||||
|
description: The password for the nova service and db account
|
||||||
|
type: string
|
||||||
|
hidden: true
|
||||||
|
|
||||||
conditions:
|
conditions:
|
||||||
|
|
||||||
@ -370,10 +374,22 @@ outputs:
|
|||||||
- name: Check if nova-api is deployed
|
- name: Check if nova-api is deployed
|
||||||
command: systemctl is-enabled --quiet openstack-nova-api
|
command: systemctl is-enabled --quiet openstack-nova-api
|
||||||
ignore_errors: True
|
ignore_errors: True
|
||||||
register: nova_api_enabled
|
register: nova_api_enabled_result
|
||||||
|
when:
|
||||||
|
- step|int == 0
|
||||||
|
- release == 'ocata'
|
||||||
|
- name: Set fact nova_api_enabled
|
||||||
|
set_fact:
|
||||||
|
nova_api_enabled: "{{ nova_api_enabled_result.rc == 0 }}"
|
||||||
|
when:
|
||||||
|
- step|int == 0
|
||||||
|
- release == 'ocata'
|
||||||
- name: Stop openstack-nova-api service
|
- name: Stop openstack-nova-api service
|
||||||
service: name=openstack-nova-api state=stopped
|
service: name=openstack-nova-api state=stopped
|
||||||
when: (step|int == 2) and (nova_api_enabled.rc == 0) and (release == 'ocata')
|
when:
|
||||||
|
- step|int == 1
|
||||||
|
- nova_api_enabled|bool
|
||||||
|
- release == 'ocata'
|
||||||
- name: Extra migration for nova tripleo/+bug/1656791
|
- name: Extra migration for nova tripleo/+bug/1656791
|
||||||
command: nova-manage db online_data_migrations
|
command: nova-manage db online_data_migrations
|
||||||
when:
|
when:
|
||||||
@ -426,7 +442,17 @@ outputs:
|
|||||||
failed_when: puppet_apply_nova_api_upgrade.rc not in [0,2]
|
failed_when: puppet_apply_nova_api_upgrade.rc not in [0,2]
|
||||||
changed_when: puppet_apply_nova_api_upgrade.rc == 2
|
changed_when: puppet_apply_nova_api_upgrade.rc == 2
|
||||||
- name: Setup cell_v2 (map cell0)
|
- name: Setup cell_v2 (map cell0)
|
||||||
shell: nova-manage cell_v2 map_cell0 --database_connection=$(hiera nova::cell0_database_connection)
|
shell:
|
||||||
|
str_replace:
|
||||||
|
template: nova-manage cell_v2 map_cell0 --database_connection=CELL
|
||||||
|
params:
|
||||||
|
CELL:
|
||||||
|
make_url:
|
||||||
|
scheme: {get_param: [EndpointMap, MysqlInternal, protocol]}
|
||||||
|
username: nova
|
||||||
|
password: {get_param: NovaPassword}
|
||||||
|
host: {get_param: [EndpointMap, MysqlInternal, host]}
|
||||||
|
path: /nova_cell0
|
||||||
- name: Setup cell_v2 (create default cell)
|
- name: Setup cell_v2 (create default cell)
|
||||||
# (owalsh) puppet-nova expects the cell name 'default'
|
# (owalsh) puppet-nova expects the cell name 'default'
|
||||||
# (owalsh) pass the db uri explicitly to avoid https://bugs.launchpad.net/tripleo/+bug/1662344
|
# (owalsh) pass the db uri explicitly to avoid https://bugs.launchpad.net/tripleo/+bug/1662344
|
||||||
|
@ -235,10 +235,19 @@ outputs:
|
|||||||
- name: Check if nova-compute is deployed
|
- name: Check if nova-compute is deployed
|
||||||
command: systemctl is-enabled --quiet openstack-nova-compute
|
command: systemctl is-enabled --quiet openstack-nova-compute
|
||||||
ignore_errors: True
|
ignore_errors: True
|
||||||
register: nova_compute_enabled
|
register: nova_compute_enabled_result
|
||||||
|
when:
|
||||||
|
- step|int == 0
|
||||||
|
- release == 'ocata'
|
||||||
|
- name: Set fact nova_compute_enabled
|
||||||
|
set_fact:
|
||||||
|
nova_compute_enabled: "{{ nova_compute_enabled_result.rc == 0 }}"
|
||||||
|
when:
|
||||||
|
- step|int == 0
|
||||||
|
- release == 'ocata'
|
||||||
- name: Stop and disable nova-compute service
|
- name: Stop and disable nova-compute service
|
||||||
service: name=openstack-nova-compute state=stopped
|
service: name=openstack-nova-compute state=stopped
|
||||||
when:
|
when:
|
||||||
- step|int == 2
|
- step|int == 1
|
||||||
- nova_compute_enabled.rc == 0
|
- nova_compute_enabled|bool
|
||||||
- release == 'ocata'
|
- release == 'ocata'
|
||||||
|
@ -165,10 +165,19 @@ outputs:
|
|||||||
- name: Check if nova_conductor is deployed
|
- name: Check if nova_conductor is deployed
|
||||||
command: systemctl is-enabled --quiet openstack-nova-conductor
|
command: systemctl is-enabled --quiet openstack-nova-conductor
|
||||||
ignore_errors: True
|
ignore_errors: True
|
||||||
register: nova_conductor_enabled
|
register: nova_conductor_enabled_result
|
||||||
|
when:
|
||||||
|
- step|int == 0
|
||||||
|
- release == 'ocata'
|
||||||
|
- name: Set fact nova_conductor_enabled
|
||||||
|
set_fact:
|
||||||
|
nova_conductor_enabled: "{{ nova_conductor_enabled_result.rc == 0 }}"
|
||||||
|
when:
|
||||||
|
- step|int == 0
|
||||||
|
- release == 'ocata'
|
||||||
- name: Stop and disable nova_conductor service
|
- name: Stop and disable nova_conductor service
|
||||||
service: name=openstack-nova-conductor state=stopped
|
service: name=openstack-nova-conductor state=stopped
|
||||||
when:
|
when:
|
||||||
- step|int == 2
|
- step|int == 1
|
||||||
- nova_conductor_enabled.rc == 0
|
|
||||||
- release == 'ocata'
|
- release == 'ocata'
|
||||||
|
- nova_conductor_enabled|bool
|
||||||
|
@ -153,10 +153,19 @@ outputs:
|
|||||||
- name: Check if nova_consoleauth is deployed
|
- name: Check if nova_consoleauth is deployed
|
||||||
command: systemctl is-active --quiet openstack-nova-consoleauth
|
command: systemctl is-active --quiet openstack-nova-consoleauth
|
||||||
ignore_errors: True
|
ignore_errors: True
|
||||||
register: nova_consoleauth_enabled
|
register: nova_consoleauth_enabled_result
|
||||||
|
when:
|
||||||
|
- step|int == 0
|
||||||
|
- release == 'ocata'
|
||||||
|
- name: Set fact nova_consoleauth_enabled
|
||||||
|
set_fact:
|
||||||
|
nova_consoleauth_enabled: "{{ nova_consoleauth_enabled_result.rc == 0 }}"
|
||||||
|
when:
|
||||||
|
- step|int == 0
|
||||||
|
- release == 'ocata'
|
||||||
- name: Stop and disable nova-consoleauth service
|
- name: Stop and disable nova-consoleauth service
|
||||||
service: name=openstack-nova-consoleauth state=stopped
|
service: name=openstack-nova-consoleauth state=stopped
|
||||||
when:
|
when:
|
||||||
- step|int == 2
|
- step|int == 1
|
||||||
- nova_consoleauth_enabled.rc == 0
|
|
||||||
- release == 'ocata'
|
- release == 'ocata'
|
||||||
|
- nova_consoleauth_enabled|bool
|
||||||
|
@ -150,7 +150,19 @@ outputs:
|
|||||||
- name: Check if nova ironic is deployed
|
- name: Check if nova ironic is deployed
|
||||||
command: systemctl is-enabled --quiet openstack-nova-compute
|
command: systemctl is-enabled --quiet openstack-nova-compute
|
||||||
tags: common
|
tags: common
|
||||||
register: nova_ironic_enabled
|
register: nova_ironic_enabled_result
|
||||||
|
when:
|
||||||
|
- step|int == 0
|
||||||
|
- release == 'ocata'
|
||||||
|
- name: Set fact nova_ironic_enabled
|
||||||
|
set_fact:
|
||||||
|
nova_ironic_enabled: "{{ nova_ironic_enabled_result.rc == 0 }}"
|
||||||
|
when:
|
||||||
|
- step|int == 0
|
||||||
|
- release == 'ocata'
|
||||||
- name: Stop and disable nova-compute service
|
- name: Stop and disable nova-compute service
|
||||||
service: name=openstack-nova-compute state=stopped
|
service: name=openstack-nova-compute state=stopped
|
||||||
when: (step|int == 2) and (nova_ironic_enabled.rc == 0) and (release == 'ocata')
|
when:
|
||||||
|
- step|int == 1
|
||||||
|
- release == 'ocata'
|
||||||
|
- nova_ironic_enabled|bool
|
||||||
|
@ -133,3 +133,24 @@ outputs:
|
|||||||
- step|int == 2
|
- step|int == 2
|
||||||
- nova_metadata_enabled.rc == 0
|
- nova_metadata_enabled.rc == 0
|
||||||
service: name=openstack-nova-api state=stopped enabled=no
|
service: name=openstack-nova-api state=stopped enabled=no
|
||||||
|
fast_forward_upgrade_tasks:
|
||||||
|
- name: Check if nova_api_metadata is deployed
|
||||||
|
command: systemctl is-enabled --quiet openstack-nova-api
|
||||||
|
tags: common
|
||||||
|
ignore_errors: True
|
||||||
|
register: nova_metadata_enabled_result
|
||||||
|
when:
|
||||||
|
- step|int == 0
|
||||||
|
- release == 'ocata'
|
||||||
|
- name: Set fact nova_metadata_enabled
|
||||||
|
set_fact:
|
||||||
|
nova_metadata_enabled: "{{ nova_metadata_enabled_result.rc == 0 }}"
|
||||||
|
when:
|
||||||
|
- step|int == 0
|
||||||
|
- release == 'ocata'
|
||||||
|
- name: Stop and disable nova_api service
|
||||||
|
when:
|
||||||
|
- step|int == 1
|
||||||
|
- release == 'ocata'
|
||||||
|
- nova_metadata_enabled|bool
|
||||||
|
service: name=openstack-nova-api state=stopped enabled=no
|
||||||
|
@ -154,10 +154,19 @@ outputs:
|
|||||||
- name: Check if nova_scheduler is deployed
|
- name: Check if nova_scheduler is deployed
|
||||||
command: systemctl is-enabled --quiet openstack-nova-scheduler
|
command: systemctl is-enabled --quiet openstack-nova-scheduler
|
||||||
ignore_errors: True
|
ignore_errors: True
|
||||||
register: nova_scheduler_enabled
|
register: nova_scheduler_enabled_result
|
||||||
|
when:
|
||||||
|
- step|int == 0
|
||||||
|
- release == 'ocata'
|
||||||
|
- name: Set fact nova_scheduler_enabled
|
||||||
|
set_fact:
|
||||||
|
nova_scheduler_enabled: "{{ nova_scheduler_enabled_result.rc == 0 }}"
|
||||||
|
when:
|
||||||
|
- step|int == 0
|
||||||
|
- release == 'ocata'
|
||||||
- name: Stop and disable nova-scheduler service
|
- name: Stop and disable nova-scheduler service
|
||||||
service: name=openstack-nova-scheduler state=stopped
|
service: name=openstack-nova-scheduler state=stopped
|
||||||
when:
|
when:
|
||||||
- step|int == 2
|
- step|int == 1
|
||||||
- nova_scheduler_enabled.rc == 0
|
|
||||||
- release == 'ocata'
|
- release == 'ocata'
|
||||||
|
- nova_scheduler_enabled|bool
|
||||||
|
@ -153,10 +153,19 @@ outputs:
|
|||||||
- name: Check if nova vncproxy is deployed
|
- name: Check if nova vncproxy is deployed
|
||||||
command: systemctl is-enabled --quiet openstack-nova-novncproxy
|
command: systemctl is-enabled --quiet openstack-nova-novncproxy
|
||||||
ignore_errors: True
|
ignore_errors: True
|
||||||
register: nova_vncproxy_enabled
|
register: nova_vncproxy_enabled_result
|
||||||
|
when:
|
||||||
|
- step|int == 0
|
||||||
|
- release == 'ocata'
|
||||||
|
- name: Set fact nova_vncproxy_enabled
|
||||||
|
set_fact:
|
||||||
|
nova_vncproxy_enabled: "{{ nova_vncproxy_enabled_result.rc == 0 }}"
|
||||||
|
when:
|
||||||
|
- step|int == 0
|
||||||
|
- release == 'ocata'
|
||||||
- name: Stop and disable nova-novncproxy service
|
- name: Stop and disable nova-novncproxy service
|
||||||
service: name=openstack-nova-novncproxy state=stopped
|
service: name=openstack-nova-novncproxy state=stopped
|
||||||
when:
|
when:
|
||||||
- step|int == 2
|
- step|int == 1
|
||||||
- nova_vncproxy_enabled.rc == 0
|
|
||||||
- release == 'ocata'
|
- release == 'ocata'
|
||||||
|
- nova_vncproxy_enabled|bool
|
||||||
|
Loading…
Reference in New Issue
Block a user