From fa66d68c081d98f8de1b2d5a0574263f0a7679b0 Mon Sep 17 00:00:00 2001 From: marios Date: Wed, 3 Jan 2018 17:15:24 +0200 Subject: [PATCH] Adds fast_forward_upgrade_tasks for Heat services Adds ffu tasks for the heat services -api, -api-cfn, -api-cloudwatch and -engine under systemd are stopped and also disabled (e.g. to be containerized, migrated httpd etc). Services stopped step 1, package update step 6, dbsync step8. Change-Id: Ida0b4cb7f6f0a9d966e2a79dd05460565d98aaf9 --- docker/services/heat-api-cfn.yaml | 20 +++++++++++++ docker/services/heat-api.yaml | 30 +++++++++++++++++++ docker/services/heat-engine.yaml | 20 +++++++++++++ .../heat-api-cloudwatch-disabled.yaml | 26 ++++++++++++++++ roles/Controller.yaml | 1 + roles/ControllerAllNovaStandalone.yaml | 1 + roles/ControllerNoCeph.yaml | 1 + roles/ControllerNovaStandalone.yaml | 1 + roles/ControllerOpenstack.yaml | 1 + roles/ControllerStorageNfs.yaml | 1 + roles_data.yaml | 1 + 11 files changed, 103 insertions(+) diff --git a/docker/services/heat-api-cfn.yaml b/docker/services/heat-api-cfn.yaml index 3c87277e37..702dee9ac7 100644 --- a/docker/services/heat-api-cfn.yaml +++ b/docker/services/heat-api-cfn.yaml @@ -173,3 +173,23 @@ outputs: - httpd_running.rc == 0 metadata_settings: get_attr: [HeatBase, role_data, metadata_settings] + fast_forward_upgrade_tasks: + - name: FFU check if openstack-heat-api-cfn service is enabled + command: systemctl is-enabled openstack-heat-api-cfn + ignore_errors: True + register: heat_api_cfn_enabled_result + when: + - step|int == 0 + - release == 'ocata' + - name: Set fact heat_api_cfn_enabled + set_fact: + heat_api_cfn_enabled: "{{ heat_api_cfn_enabled_result.rc == 0 }}" + when: + - step|int == 0 + - release == 'ocata' + - name: FFU stop and disable openstack-heat-api-cfn service + when: + - step|int == 1 + - release == 'ocata' + - heat_api_cfn_enabled|bool + service: name=openstack-heat-api-cfn state=stopped enabled=no diff --git a/docker/services/heat-api.yaml b/docker/services/heat-api.yaml index 1ebd010d6b..8e8845b937 100644 --- a/docker/services/heat-api.yaml +++ b/docker/services/heat-api.yaml @@ -216,3 +216,33 @@ outputs: state: absent metadata_settings: get_attr: [HeatBase, role_data, metadata_settings] + fast_forward_upgrade_tasks: + - name: FFU check openstack-heat-api is enabled + command: systemctl is-enabled openstack-heat-api + ignore_errors: True + register: heat_api_enabled_result + when: + - step|int == 0 + - release == 'ocata' + - name: Set fact heat_api_enabled + set_fact: + heat_api_enabled: "{{ heat_api_enabled_result.rc == 0 }}" + when: + - step|int == 0 + - release == 'ocata' + - name: FFU stop and disable openstack-heat-api + service: name=openstack-heat-api state=stopped enabled=no + when: + - step|int == 1 + - release == 'ocata' + - heat_api_enabled|bool + - name: FFU Heat package update + yum: name=openstack-heat* state=latest + when: + - step|int == 6 + - is_bootstrap_node|bool + - name: FFU Heat db-sync + command: heat-manage db_sync + when: + - step|int == 8 + - is_bootstrap_node|bool diff --git a/docker/services/heat-engine.yaml b/docker/services/heat-engine.yaml index 578fd59265..3c8c7335d2 100644 --- a/docker/services/heat-engine.yaml +++ b/docker/services/heat-engine.yaml @@ -150,3 +150,23 @@ outputs: - step|int == 2 - heat_engine_enabled.rc == 0 service: name=openstack-heat-engine state=stopped enabled=no + fast_forward_upgrade_tasks: + - name: FFU check if openstack-heat-engine is enabled + command: systemctl is-enabled --quiet openstack-heat-engine + ignore_errors: True + register: heat_engine_enabled_result + when: + - step|int == 0 + - release == 'ocata' + - name: Set fact heat_engine_enabled + set_fact: + heat_engine_enabled: "{{ heat_engine_enabled_result.rc == 0 }}" + when: + - step|int == 0 + - release == 'ocata' + - name: FFU stop and disable openstack-heat-engine service + when: + - step|int == 1 + - release == 'ocata' + - heat_engine_enabled|bool + service: name=openstack-heat-engine state=stopped enabled=no diff --git a/puppet/services/disabled/heat-api-cloudwatch-disabled.yaml b/puppet/services/disabled/heat-api-cloudwatch-disabled.yaml index 5065dde4be..808e7b5890 100644 --- a/puppet/services/disabled/heat-api-cloudwatch-disabled.yaml +++ b/puppet/services/disabled/heat-api-cloudwatch-disabled.yaml @@ -47,3 +47,29 @@ outputs: - step|int == 1 - heat_api_cloudwatch_enabled.rc == 0 service: name=openstack-heat-api-cloudwatch state=stopped enabled=no + fast_forward_upgrade_tasks: + - name: FFU check if heat_api_cloudwatch is deployed + command: systemctl is-enabled openstack-heat-api-cloudwatch + ignore_errors: True + register: heat_api_cloudwatch_enabled_result + when: + - step|int == 0 + - release == 'ocata' + - name: Set fact heat_api_cloudwatch_enabled + set_fact: + heat_api_cloudwatch_enabled: "{{ heat_api_cloudwatch_enabled_result.rc == 0 }}" + when: + - step|int == 0 + - release == 'ocata' + - name: FFU stop and disable the heat-api-cloudwatch service. + service: name=openstack-heat-api-cloudwatch state=stopped enabled=no + when: + - step|int == 1 + - release == 'ocata' + - heat_api_cloudwatch_enabled|bool + - name: Remove heat_api_cloudwatch package + yum: name=openstack-heat-api-cloudwatch state=removed + ignore_errors: True + when: + - step|int == 2 + - release == 'ocata' diff --git a/roles/Controller.yaml b/roles/Controller.yaml index 8f2185aa61..9f028da823 100644 --- a/roles/Controller.yaml +++ b/roles/Controller.yaml @@ -78,6 +78,7 @@ - OS::TripleO::Services::GnocchiStatsd - OS::TripleO::Services::HAproxy - OS::TripleO::Services::HeatApi + - OS::TripleO::Services::HeatApiCloudwatch - OS::TripleO::Services::HeatApiCfn - OS::TripleO::Services::HeatEngine - OS::TripleO::Services::Horizon diff --git a/roles/ControllerAllNovaStandalone.yaml b/roles/ControllerAllNovaStandalone.yaml index 8da711fee7..6d98773169 100644 --- a/roles/ControllerAllNovaStandalone.yaml +++ b/roles/ControllerAllNovaStandalone.yaml @@ -55,6 +55,7 @@ - OS::TripleO::Services::GnocchiStatsd - OS::TripleO::Services::HAproxy - OS::TripleO::Services::HeatApi + - OS::TripleO::Services::HeatApiCloudwatch - OS::TripleO::Services::HeatApiCfn - OS::TripleO::Services::HeatEngine - OS::TripleO::Services::Horizon diff --git a/roles/ControllerNoCeph.yaml b/roles/ControllerNoCeph.yaml index adf19eaf58..dc3b139a4f 100644 --- a/roles/ControllerNoCeph.yaml +++ b/roles/ControllerNoCeph.yaml @@ -71,6 +71,7 @@ - OS::TripleO::Services::GnocchiStatsd - OS::TripleO::Services::HAproxy - OS::TripleO::Services::HeatApi + - OS::TripleO::Services::HeatApiCloudwatch - OS::TripleO::Services::HeatApiCfn - OS::TripleO::Services::HeatEngine - OS::TripleO::Services::Horizon diff --git a/roles/ControllerNovaStandalone.yaml b/roles/ControllerNovaStandalone.yaml index 7d1a97bece..48e65e7af6 100644 --- a/roles/ControllerNovaStandalone.yaml +++ b/roles/ControllerNovaStandalone.yaml @@ -63,6 +63,7 @@ - OS::TripleO::Services::GnocchiStatsd - OS::TripleO::Services::HAproxy - OS::TripleO::Services::HeatApi + - OS::TripleO::Services::HeatApiCloudwatch - OS::TripleO::Services::HeatApiCfn - OS::TripleO::Services::HeatEngine - OS::TripleO::Services::Horizon diff --git a/roles/ControllerOpenstack.yaml b/roles/ControllerOpenstack.yaml index bbf21e87ae..917a31bbef 100644 --- a/roles/ControllerOpenstack.yaml +++ b/roles/ControllerOpenstack.yaml @@ -60,6 +60,7 @@ - OS::TripleO::Services::GnocchiStatsd - OS::TripleO::Services::HAproxy - OS::TripleO::Services::HeatApi + - OS::TripleO::Services::HeatApiCloudwatch - OS::TripleO::Services::HeatApiCfn - OS::TripleO::Services::HeatEngine - OS::TripleO::Services::Horizon diff --git a/roles/ControllerStorageNfs.yaml b/roles/ControllerStorageNfs.yaml index d398c0382e..48b96115b5 100644 --- a/roles/ControllerStorageNfs.yaml +++ b/roles/ControllerStorageNfs.yaml @@ -72,6 +72,7 @@ - OS::TripleO::Services::GnocchiStatsd - OS::TripleO::Services::HAproxy - OS::TripleO::Services::HeatApi + - OS::TripleO::Services::HeatApiCloudwatch - OS::TripleO::Services::HeatApiCfn - OS::TripleO::Services::HeatEngine - OS::TripleO::Services::Horizon diff --git a/roles_data.yaml b/roles_data.yaml index 307c24a0b8..9491c1e0a4 100644 --- a/roles_data.yaml +++ b/roles_data.yaml @@ -81,6 +81,7 @@ - OS::TripleO::Services::GnocchiStatsd - OS::TripleO::Services::HAproxy - OS::TripleO::Services::HeatApi + - OS::TripleO::Services::HeatApiCloudwatch - OS::TripleO::Services::HeatApiCfn - OS::TripleO::Services::HeatEngine - OS::TripleO::Services::Horizon