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:
Lukas Bezdicka 2018-02-24 23:09:37 +01:00
parent d0a03972a6
commit 30382323ce
8 changed files with 124 additions and 20 deletions

View File

@ -53,6 +53,10 @@ parameters:
description: >
Setting this to a unique value will re-run any deployment tasks which
perform configuration on a Heat stack-update.
NovaPassword:
description: The password for the nova service and db account
type: string
hidden: true
conditions:
@ -370,10 +374,22 @@ outputs:
- name: Check if nova-api is deployed
command: systemctl is-enabled --quiet openstack-nova-api
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
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
command: nova-manage db online_data_migrations
when:
@ -426,7 +442,17 @@ outputs:
failed_when: puppet_apply_nova_api_upgrade.rc not in [0,2]
changed_when: puppet_apply_nova_api_upgrade.rc == 2
- 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)
# (owalsh) puppet-nova expects the cell name 'default'
# (owalsh) pass the db uri explicitly to avoid https://bugs.launchpad.net/tripleo/+bug/1662344

View File

@ -235,10 +235,19 @@ outputs:
- name: Check if nova-compute is deployed
command: systemctl is-enabled --quiet openstack-nova-compute
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
service: name=openstack-nova-compute state=stopped
when:
- step|int == 2
- nova_compute_enabled.rc == 0
- step|int == 1
- nova_compute_enabled|bool
- release == 'ocata'

View File

@ -165,10 +165,19 @@ outputs:
- name: Check if nova_conductor is deployed
command: systemctl is-enabled --quiet openstack-nova-conductor
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
service: name=openstack-nova-conductor state=stopped
when:
- step|int == 2
- nova_conductor_enabled.rc == 0
- step|int == 1
- release == 'ocata'
- nova_conductor_enabled|bool

View File

@ -153,10 +153,19 @@ outputs:
- name: Check if nova_consoleauth is deployed
command: systemctl is-active --quiet openstack-nova-consoleauth
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
service: name=openstack-nova-consoleauth state=stopped
when:
- step|int == 2
- nova_consoleauth_enabled.rc == 0
- step|int == 1
- release == 'ocata'
- nova_consoleauth_enabled|bool

View File

@ -150,7 +150,19 @@ outputs:
- name: Check if nova ironic is deployed
command: systemctl is-enabled --quiet openstack-nova-compute
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
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

View File

@ -133,3 +133,24 @@ outputs:
- step|int == 2
- nova_metadata_enabled.rc == 0
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

View File

@ -154,10 +154,19 @@ outputs:
- name: Check if nova_scheduler is deployed
command: systemctl is-enabled --quiet openstack-nova-scheduler
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
service: name=openstack-nova-scheduler state=stopped
when:
- step|int == 2
- nova_scheduler_enabled.rc == 0
- step|int == 1
- release == 'ocata'
- nova_scheduler_enabled|bool

View File

@ -153,10 +153,19 @@ outputs:
- name: Check if nova vncproxy is deployed
command: systemctl is-enabled --quiet openstack-nova-novncproxy
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
service: name=openstack-nova-novncproxy state=stopped
when:
- step|int == 2
- nova_vncproxy_enabled.rc == 0
- step|int == 1
- release == 'ocata'
- nova_vncproxy_enabled|bool