diff --git a/docker/services/nova-api.yaml b/docker/services/nova-api.yaml index dc2fffb1a9..bdea96f4df 100644 --- a/docker/services/nova-api.yaml +++ b/docker/services/nova-api.yaml @@ -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 diff --git a/docker/services/nova-compute.yaml b/docker/services/nova-compute.yaml index 18a373fdf8..f627fdc8e4 100644 --- a/docker/services/nova-compute.yaml +++ b/docker/services/nova-compute.yaml @@ -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' diff --git a/docker/services/nova-conductor.yaml b/docker/services/nova-conductor.yaml index 2881812499..61ad10c694 100644 --- a/docker/services/nova-conductor.yaml +++ b/docker/services/nova-conductor.yaml @@ -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 diff --git a/docker/services/nova-consoleauth.yaml b/docker/services/nova-consoleauth.yaml index a07f8dabb5..ece069b06e 100644 --- a/docker/services/nova-consoleauth.yaml +++ b/docker/services/nova-consoleauth.yaml @@ -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 diff --git a/docker/services/nova-ironic.yaml b/docker/services/nova-ironic.yaml index 61db77d3ff..eb89851ee7 100644 --- a/docker/services/nova-ironic.yaml +++ b/docker/services/nova-ironic.yaml @@ -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 diff --git a/docker/services/nova-metadata.yaml b/docker/services/nova-metadata.yaml index 061e0e2820..a01c02ce94 100644 --- a/docker/services/nova-metadata.yaml +++ b/docker/services/nova-metadata.yaml @@ -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 diff --git a/docker/services/nova-scheduler.yaml b/docker/services/nova-scheduler.yaml index e341ad2528..2895e58b40 100644 --- a/docker/services/nova-scheduler.yaml +++ b/docker/services/nova-scheduler.yaml @@ -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 diff --git a/docker/services/nova-vnc-proxy.yaml b/docker/services/nova-vnc-proxy.yaml index be678c4ffb..14a81b19cf 100644 --- a/docker/services/nova-vnc-proxy.yaml +++ b/docker/services/nova-vnc-proxy.yaml @@ -210,10 +210,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