Handle undercloud upgrades via host_prep_tasks
Using host_prep_tasks interface to handle undercloud teardown before we run the undercloud install. The reason of not using upgrade_tasks is because the existing tasks were created for the overcloud upgrade first and there are too much logic right now so we can easily re-use the bits for the undercloud. In the future, we'll probably use upgrade_tasks for both the undercloud and overcloud but right now this is not possible and a simple way to move forward was to implement these tasks that work fine for the undercloud containerization case. Workflow will be: - Services will be stopped and disabled (except mariadb) - Neutron DB will be renamed, then mariadb stopped & disabled - Remove cron jobs - All packages will be upgraded with yum update. Change-Id: I36be7f398dcd91e332687c6222b3ccbb9cd74ad2
This commit is contained in:
parent
9757572d74
commit
d86025593b
@ -40,6 +40,10 @@ parameters:
|
||||
default: false
|
||||
description: Remove package if the service is being disabled during upgrade
|
||||
type: boolean
|
||||
UndercloudUpgrade:
|
||||
type: boolean
|
||||
description: Flag to indicate undercloud upgrade process is being run.
|
||||
default: false
|
||||
|
||||
resources:
|
||||
|
||||
@ -122,6 +126,12 @@ outputs:
|
||||
Log files from aodh containers can be found under
|
||||
/var/log/containers/aodh and /var/log/containers/httpd/aodh-api.
|
||||
ignore_errors: true
|
||||
- name: Stop and disable the aodh-evaluator service
|
||||
service:
|
||||
name: openstack-aodh-evaluator
|
||||
state: stopped
|
||||
enabled: no
|
||||
when: {get_param: UndercloudUpgrade}
|
||||
upgrade_tasks:
|
||||
- name: Check if aodh_evaluator is deployed
|
||||
command: systemctl is-enabled --quiet openstack-aodh-evaluator
|
||||
|
@ -40,6 +40,10 @@ parameters:
|
||||
default: false
|
||||
description: Remove package if the service is being disabled during upgrade
|
||||
type: boolean
|
||||
UndercloudUpgrade:
|
||||
type: boolean
|
||||
description: Flag to indicate undercloud upgrade process is being run.
|
||||
default: false
|
||||
|
||||
resources:
|
||||
|
||||
@ -122,6 +126,12 @@ outputs:
|
||||
Log files from aodh containers can be found under
|
||||
/var/log/containers/aodh and /var/log/containers/httpd/aodh-api.
|
||||
ignore_errors: true
|
||||
- name: Stop and disable the aodh-listener service
|
||||
service:
|
||||
name: openstack-aodh-listener
|
||||
state: stopped
|
||||
enabled: no
|
||||
when: {get_param: UndercloudUpgrade}
|
||||
upgrade_tasks:
|
||||
- name: Check if aodh_listener is deployed
|
||||
command: systemctl is-enabled --quiet openstack-aodh-listener
|
||||
|
@ -40,6 +40,10 @@ parameters:
|
||||
default: false
|
||||
description: Remove package if the service is being disabled during upgrade
|
||||
type: boolean
|
||||
UndercloudUpgrade:
|
||||
type: boolean
|
||||
description: Flag to indicate undercloud upgrade process is being run.
|
||||
default: false
|
||||
|
||||
resources:
|
||||
|
||||
@ -122,6 +126,12 @@ outputs:
|
||||
Log files from aodh containers can be found under
|
||||
/var/log/containers/aodh and /var/log/containers/httpd/aodh-api.
|
||||
ignore_errors: true
|
||||
- name: Stop and disable the aodh-notifier service
|
||||
service:
|
||||
name: openstack-aodh-notifier
|
||||
state: stopped
|
||||
enabled: no
|
||||
when: {get_param: UndercloudUpgrade}
|
||||
upgrade_tasks:
|
||||
- name: Check if aodh_notifier is deployed
|
||||
command: systemctl is-enabled --quiet openstack-aodh-notifier
|
||||
|
@ -40,6 +40,10 @@ parameters:
|
||||
default: false
|
||||
description: Remove package if the service is being disabled during upgrade
|
||||
type: boolean
|
||||
UndercloudUpgrade:
|
||||
type: boolean
|
||||
description: Flag to indicate undercloud upgrade process is being run.
|
||||
default: false
|
||||
|
||||
resources:
|
||||
|
||||
@ -138,6 +142,12 @@ outputs:
|
||||
Log files from ceilometer containers can be found under
|
||||
/var/log/containers/ceilometer.
|
||||
ignore_errors: true
|
||||
- name: Stop and disable the ceilometer-central service
|
||||
service:
|
||||
name: openstack-ceilometer-central
|
||||
state: stopped
|
||||
enabled: no
|
||||
when: {get_param: UndercloudUpgrade}
|
||||
upgrade_tasks:
|
||||
- name: Check if ceilometer_agent_central is deployed
|
||||
command: systemctl is-enabled --quiet openstack-ceilometer-central
|
||||
|
@ -40,6 +40,10 @@ parameters:
|
||||
default: false
|
||||
description: Remove package if the service is being disabled during upgrade
|
||||
type: boolean
|
||||
UndercloudUpgrade:
|
||||
type: boolean
|
||||
description: Flag to indicate undercloud upgrade process is being run.
|
||||
default: false
|
||||
|
||||
resources:
|
||||
|
||||
@ -109,6 +113,12 @@ outputs:
|
||||
Log files from ceilometer containers can be found under
|
||||
/var/log/containers/ceilometer.
|
||||
ignore_errors: true
|
||||
- name: Stop and disable the ceilometer-compute service
|
||||
service:
|
||||
name: openstack-ceilometer-compute
|
||||
state: stopped
|
||||
enabled: no
|
||||
when: {get_param: UndercloudUpgrade}
|
||||
upgrade_tasks:
|
||||
- name: Check if openstack-ceilometer-compute is deployed
|
||||
command: systemctl is-enabled --quiet openstack-ceilometer-compute
|
||||
|
@ -40,6 +40,10 @@ parameters:
|
||||
default: false
|
||||
description: Remove package if the service is being disabled during upgrade
|
||||
type: boolean
|
||||
UndercloudUpgrade:
|
||||
type: boolean
|
||||
description: Flag to indicate undercloud upgrade process is being run.
|
||||
default: false
|
||||
|
||||
resources:
|
||||
|
||||
@ -127,6 +131,12 @@ outputs:
|
||||
Log files from ceilometer containers can be found under
|
||||
/var/log/containers/ceilometer.
|
||||
ignore_errors: true
|
||||
- name: Stop and disable the ceilometer-notification service
|
||||
service:
|
||||
name: openstack-ceilometer-notification
|
||||
state: stopped
|
||||
enabled: no
|
||||
when: {get_param: UndercloudUpgrade}
|
||||
upgrade_tasks:
|
||||
- name: Check if ceilometer_agent_notification is deployed
|
||||
command: systemctl is-enabled --quiet openstack-ceilometer-notification
|
||||
|
@ -43,6 +43,10 @@ parameters:
|
||||
default: false
|
||||
description: Remove package if the service is being disabled during upgrade
|
||||
type: boolean
|
||||
UndercloudUpgrade:
|
||||
type: boolean
|
||||
description: Flag to indicate undercloud upgrade process is being run.
|
||||
default: false
|
||||
|
||||
conditions:
|
||||
|
||||
@ -202,6 +206,11 @@ outputs:
|
||||
Log files from cinder containers can be found under
|
||||
/var/log/containers/cinder and /var/log/containers/httpd/cinder-api.
|
||||
ignore_errors: true
|
||||
- name: remove cinder cron jobs
|
||||
file:
|
||||
path: /var/spool/cron/cinder
|
||||
state: absent
|
||||
when: {get_param: UndercloudUpgrade}
|
||||
upgrade_tasks:
|
||||
- name: Check is cinder_api is deployed
|
||||
command: systemctl is-enabled openstack-cinder-api
|
||||
|
@ -40,6 +40,10 @@ parameters:
|
||||
default: false
|
||||
description: Remove package if the service is being disabled during upgrade
|
||||
type: boolean
|
||||
UndercloudUpgrade:
|
||||
type: boolean
|
||||
description: Flag to indicate undercloud upgrade process is being run.
|
||||
default: false
|
||||
|
||||
resources:
|
||||
|
||||
@ -130,6 +134,12 @@ outputs:
|
||||
Log files from cinder containers can be found under
|
||||
/var/log/containers/cinder and /var/log/containers/httpd/cinder-api.
|
||||
ignore_errors: true
|
||||
- name: Stop and disable the cinder-scheduler service
|
||||
service:
|
||||
name: openstack-cinder-scheduler
|
||||
state: stopped
|
||||
enabled: no
|
||||
when: {get_param: UndercloudUpgrade}
|
||||
upgrade_tasks:
|
||||
- name: Check if cinder_scheduler is deployed
|
||||
command: systemctl is-enabled openstack-cinder-scheduler
|
||||
|
@ -61,6 +61,10 @@ parameters:
|
||||
description: >
|
||||
The Ceph cluster name must be at least 1 character and contain only
|
||||
letters and numbers.
|
||||
UndercloudUpgrade:
|
||||
type: boolean
|
||||
description: Flag to indicate undercloud upgrade process is being run.
|
||||
default: false
|
||||
|
||||
resources:
|
||||
|
||||
@ -170,6 +174,12 @@ outputs:
|
||||
Log files from cinder containers can be found under
|
||||
/var/log/containers/cinder and /var/log/containers/httpd/cinder-api.
|
||||
ignore_errors: true
|
||||
- name: Stop and disable the cinder-volume service
|
||||
service:
|
||||
name: openstack-cinder-volume
|
||||
state: stopped
|
||||
enabled: no
|
||||
when: {get_param: UndercloudUpgrade}
|
||||
- name: ensure ceph configurations exist
|
||||
file:
|
||||
path: /etc/ceph
|
||||
|
@ -48,9 +48,9 @@ parameters:
|
||||
type: string
|
||||
description: Specifies the default CA cert to use if TLS is used for
|
||||
services in the internal network.
|
||||
MigrateLegacyNeutronDb:
|
||||
UndercloudUpgrade:
|
||||
type: boolean
|
||||
description: Used to rename the undercloud database from neutron to ovs_neutron.
|
||||
description: Flag to indicate undercloud upgrade process is being run.
|
||||
default: false
|
||||
|
||||
conditions:
|
||||
@ -249,18 +249,16 @@ outputs:
|
||||
mysql -e "DROP DATABASE \`neutron\`;"
|
||||
fi
|
||||
become: true
|
||||
when: {get_param: MigrateLegacyNeutronDb}
|
||||
register: neutron_db_migration
|
||||
when: {get_param: UndercloudUpgrade}
|
||||
- name: Check if mysql service is deployed
|
||||
command: systemctl is-enabled --quiet mariadb
|
||||
ignore_errors: True
|
||||
register: mariadb_enabled
|
||||
when: {get_param: MigrateLegacyNeutronDb}
|
||||
when: {get_param: UndercloudUpgrade}
|
||||
- name: Stop and disable mysql service when undercloud is containerized
|
||||
when:
|
||||
- {get_param: MigrateLegacyNeutronDb}
|
||||
- {get_param: UndercloudUpgrade}
|
||||
- mariadb_enabled.rc == 0
|
||||
- neutron_db_migration.rc == 0
|
||||
service: name=mariadb state=stopped enabled=no
|
||||
upgrade_tasks:
|
||||
- name: Check if mysql service is deployed
|
||||
|
@ -87,6 +87,10 @@ parameters:
|
||||
description: >
|
||||
The Ceph cluster name must be at least 1 character and contain only
|
||||
letters and numbers.
|
||||
UndercloudUpgrade:
|
||||
type: boolean
|
||||
description: Flag to indicate undercloud upgrade process is being run.
|
||||
default: false
|
||||
|
||||
conditions:
|
||||
|
||||
@ -259,6 +263,12 @@ outputs:
|
||||
file:
|
||||
path: /etc/ceph
|
||||
state: directory
|
||||
- name: Stop and disable the glance-api service
|
||||
service:
|
||||
name: openstack-glance-api
|
||||
state: stopped
|
||||
enabled: no
|
||||
when: {get_param: UndercloudUpgrade}
|
||||
upgrade_tasks:
|
||||
- name: Check if glance_api is deployed
|
||||
command: systemctl is-enabled --quiet openstack-glance-api
|
||||
|
@ -48,6 +48,10 @@ parameters:
|
||||
description: >
|
||||
The Ceph cluster name must be at least 1 character and contain only
|
||||
letters and numbers.
|
||||
UndercloudUpgrade:
|
||||
type: boolean
|
||||
description: Flag to indicate undercloud upgrade process is being run.
|
||||
default: false
|
||||
|
||||
resources:
|
||||
|
||||
@ -145,6 +149,12 @@ outputs:
|
||||
file:
|
||||
path: /etc/ceph
|
||||
state: directory
|
||||
- name: Stop and disable the gnocchi-metricd service
|
||||
service:
|
||||
name: gnocchi-metricd
|
||||
state: stopped
|
||||
enabled: no
|
||||
when: {get_param: UndercloudUpgrade}
|
||||
upgrade_tasks:
|
||||
- name: Check if gnocchi_metricd is deployed
|
||||
command: systemctl is-enabled --quiet openstack-gnocchi-metricd
|
||||
|
@ -48,6 +48,10 @@ parameters:
|
||||
description: >
|
||||
The Ceph cluster name must be at least 1 character and contain only
|
||||
letters and numbers.
|
||||
UndercloudUpgrade:
|
||||
type: boolean
|
||||
description: Flag to indicate undercloud upgrade process is being run.
|
||||
default: false
|
||||
|
||||
resources:
|
||||
|
||||
@ -145,6 +149,12 @@ outputs:
|
||||
file:
|
||||
path: /etc/ceph
|
||||
state: directory
|
||||
- name: Stop and disable the gnocchi-statsd service
|
||||
service:
|
||||
name: gnocchi-statsd
|
||||
state: stopped
|
||||
enabled: no
|
||||
when: {get_param: UndercloudUpgrade}
|
||||
upgrade_tasks:
|
||||
- name: Check if gnocchi_statsd is deployed
|
||||
command: systemctl is-enabled --quiet openstack-gnocchi-statsd
|
||||
|
@ -82,6 +82,10 @@ parameters:
|
||||
default: false
|
||||
description: Whether to run config management (e.g. Puppet) in debug mode.
|
||||
type: boolean
|
||||
UndercloudUpgrade:
|
||||
type: boolean
|
||||
description: Flag to indicate undercloud upgrade process is being run.
|
||||
default: false
|
||||
|
||||
conditions:
|
||||
puppet_debug_enabled: {get_param: ConfigDebug}
|
||||
@ -263,5 +267,11 @@ outputs:
|
||||
Log files from the haproxy containers can be found under
|
||||
/var/log/containers/haproxy.
|
||||
ignore_errors: true
|
||||
- name: Stop and disable the haproxy service
|
||||
service:
|
||||
name: haproxy
|
||||
state: stopped
|
||||
enabled: no
|
||||
when: {get_param: UndercloudUpgrade}
|
||||
metadata_settings:
|
||||
get_attr: [HAProxyBase, role_data, metadata_settings]
|
||||
|
@ -48,6 +48,10 @@ parameters:
|
||||
default: []
|
||||
description: list of optional environment variables
|
||||
type: comma_delimited_list
|
||||
UndercloudUpgrade:
|
||||
type: boolean
|
||||
description: Flag to indicate undercloud upgrade process is being run.
|
||||
default: false
|
||||
|
||||
conditions:
|
||||
|
||||
@ -166,7 +170,14 @@ outputs:
|
||||
- /var/lib/config-data/puppet-generated/heat_api/:/var/lib/kolla/config_files/src:ro
|
||||
environment:
|
||||
- KOLLA_CONFIG_STRATEGY=COPY_ALWAYS
|
||||
host_prep_tasks: {get_attr: [HeatApiLogging, host_prep_tasks]}
|
||||
host_prep_tasks:
|
||||
list_concat:
|
||||
- {get_attr: [HeatApiLogging, host_prep_tasks]}
|
||||
- - name: remove heat cron jobs
|
||||
file:
|
||||
path: /var/spool/cron/heat
|
||||
state: absent
|
||||
when: {get_param: UndercloudUpgrade}
|
||||
upgrade_tasks:
|
||||
- name: Check if heat_api is deployed
|
||||
command: systemctl is-enabled --quiet openstack-heat-api
|
||||
|
@ -36,6 +36,10 @@ parameters:
|
||||
default: {}
|
||||
description: Parameters specific to the role
|
||||
type: json
|
||||
UndercloudUpgrade:
|
||||
type: boolean
|
||||
description: Flag to indicate undercloud upgrade process is being run.
|
||||
default: false
|
||||
|
||||
resources:
|
||||
|
||||
@ -132,7 +136,15 @@ outputs:
|
||||
- /var/lib/config-data/puppet-generated/heat/:/var/lib/kolla/config_files/src:ro
|
||||
environment:
|
||||
- KOLLA_CONFIG_STRATEGY=COPY_ALWAYS
|
||||
host_prep_tasks: {get_attr: [HeatEngineLogging, host_prep_tasks]}
|
||||
host_prep_tasks:
|
||||
list_concat:
|
||||
- {get_attr: [HeatEngineLogging, host_prep_tasks]}
|
||||
- - name: Stop and disable the heat-engine service
|
||||
service:
|
||||
name: openstack-heat-engine
|
||||
state: stopped
|
||||
enabled: no
|
||||
when: {get_param: UndercloudUpgrade}
|
||||
upgrade_tasks:
|
||||
- name: Check if heat_engine is deployed
|
||||
command: systemctl is-enabled --quiet openstack-heat-engine
|
||||
|
@ -36,6 +36,10 @@ parameters:
|
||||
default: {}
|
||||
description: Parameters specific to the role
|
||||
type: json
|
||||
UndercloudUpgrade:
|
||||
type: boolean
|
||||
description: Flag to indicate undercloud upgrade process is being run.
|
||||
default: false
|
||||
|
||||
resources:
|
||||
|
||||
@ -138,6 +142,12 @@ outputs:
|
||||
Log files from ironic containers can be found under
|
||||
/var/log/containers/ironic and /var/log/containers/httpd/ironic-*.
|
||||
ignore_errors: true
|
||||
- name: Stop and disable the ironic-conductor service
|
||||
service:
|
||||
name: openstack-ironic-conductor
|
||||
state: stopped
|
||||
enabled: no
|
||||
when: {get_param: UndercloudUpgrade}
|
||||
- name: stat /httpboot
|
||||
stat: path=/httpboot
|
||||
register: stat_httpboot
|
||||
|
@ -36,6 +36,10 @@ parameters:
|
||||
default: {}
|
||||
description: Parameters specific to the role
|
||||
type: json
|
||||
UndercloudUpgrade:
|
||||
type: boolean
|
||||
description: Flag to indicate undercloud upgrade process is being run.
|
||||
default: false
|
||||
|
||||
resources:
|
||||
|
||||
@ -173,6 +177,12 @@ outputs:
|
||||
Log files from ironic-inspector container can be found under
|
||||
/var/log/containers/ironic-inspector.
|
||||
ignore_errors: true
|
||||
- name: Stop and disable the ironic-inspector service
|
||||
service:
|
||||
name: openstack-ironic-inspector
|
||||
state: stopped
|
||||
enabled: no
|
||||
when: {get_param: UndercloudUpgrade}
|
||||
upgrade_tasks:
|
||||
- when: step|int == 2
|
||||
block:
|
||||
|
@ -36,6 +36,10 @@ parameters:
|
||||
default: {}
|
||||
description: Parameters specific to the role
|
||||
type: json
|
||||
UndercloudUpgrade:
|
||||
type: boolean
|
||||
description: Flag to indicate undercloud upgrade process is being run.
|
||||
default: false
|
||||
|
||||
resources:
|
||||
|
||||
@ -113,6 +117,12 @@ outputs:
|
||||
Log files from keepalived containers can be found under
|
||||
/var/log/containers/keepalived.
|
||||
ignore_errors: true
|
||||
- name: Stop and disable the keepalived service
|
||||
service:
|
||||
name: keepalived
|
||||
state: stopped
|
||||
enabled: no
|
||||
when: {get_param: UndercloudUpgrade}
|
||||
upgrade_tasks:
|
||||
- name: Check if keepalived is deployed
|
||||
command: systemctl is-enabled --quiet keepalived
|
||||
|
@ -49,6 +49,10 @@ parameters:
|
||||
EnableInternalTLS:
|
||||
type: boolean
|
||||
default: false
|
||||
UndercloudUpgrade:
|
||||
type: boolean
|
||||
description: Flag to indicate undercloud upgrade process is being run.
|
||||
default: false
|
||||
|
||||
resources:
|
||||
|
||||
@ -207,7 +211,20 @@ outputs:
|
||||
puppet_tags: 'keystone_config,keystone_domain_config,keystone_endpoint,keystone_identity_provider,keystone_paste_ini,keystone_role,keystone_service,keystone_tenant,keystone_user,keystone_user_role,keystone_domain'
|
||||
step_config: 'include ::tripleo::profile::base::keystone'
|
||||
config_image: *keystone_config_image
|
||||
host_prep_tasks: {get_attr: [KeystoneLogging, host_prep_tasks]}
|
||||
host_prep_tasks:
|
||||
list_concat:
|
||||
- {get_attr: [KeystoneLogging, host_prep_tasks]}
|
||||
- - name: Stop and disable the httpd service
|
||||
service:
|
||||
name: httpd
|
||||
state: stopped
|
||||
enabled: no
|
||||
when: {get_param: UndercloudUpgrade}
|
||||
- name: remove keystone cron jobs
|
||||
file:
|
||||
path: /var/spool/cron/keystone
|
||||
state: absent
|
||||
when: {get_param: UndercloudUpgrade}
|
||||
upgrade_tasks:
|
||||
- name: Check for keystone running under apache
|
||||
tags: common
|
||||
|
@ -36,6 +36,10 @@ parameters:
|
||||
default: {}
|
||||
description: Parameters specific to the role
|
||||
type: json
|
||||
UndercloudUpgrade:
|
||||
type: boolean
|
||||
description: Flag to indicate undercloud upgrade process is being run.
|
||||
default: false
|
||||
|
||||
resources:
|
||||
|
||||
@ -116,6 +120,12 @@ outputs:
|
||||
Log files from memcached containers can be found under
|
||||
/var/log/containers/memcached.
|
||||
ignore_errors: true
|
||||
- name: Stop and disable the memcached service
|
||||
service:
|
||||
name: memcached
|
||||
state: stopped
|
||||
enabled: no
|
||||
when: {get_param: UndercloudUpgrade}
|
||||
upgrade_tasks:
|
||||
- name: Check if memcached is deployed
|
||||
command: systemctl is-enabled --quiet memcached
|
||||
|
@ -36,6 +36,10 @@ parameters:
|
||||
default: {}
|
||||
description: Parameters specific to the role
|
||||
type: json
|
||||
UndercloudUpgrade:
|
||||
type: boolean
|
||||
description: Flag to indicate undercloud upgrade process is being run.
|
||||
default: false
|
||||
|
||||
|
||||
resources:
|
||||
@ -120,6 +124,12 @@ outputs:
|
||||
Log files from mistral containers can be found under
|
||||
/var/log/containers/mistral.
|
||||
ignore_errors: true
|
||||
- name: Stop and disable the mistral-engine service
|
||||
service:
|
||||
name: openstack-mistral-engine
|
||||
state: stopped
|
||||
enabled: no
|
||||
when: {get_param: UndercloudUpgrade}
|
||||
upgrade_tasks:
|
||||
- name: Check if mistral engine is deployed
|
||||
command: systemctl is-enabled --quiet openstack-mistral-engine
|
||||
|
@ -36,6 +36,10 @@ parameters:
|
||||
default: {}
|
||||
description: Parameters specific to the role
|
||||
type: json
|
||||
UndercloudUpgrade:
|
||||
type: boolean
|
||||
description: Flag to indicate undercloud upgrade process is being run.
|
||||
default: false
|
||||
|
||||
|
||||
resources:
|
||||
@ -128,6 +132,12 @@ outputs:
|
||||
Log files from mistral containers can be found under
|
||||
/var/log/containers/mistral.
|
||||
ignore_errors: true
|
||||
- name: Stop and disable the mistral-executor service
|
||||
service:
|
||||
name: openstack-mistral-executor
|
||||
state: stopped
|
||||
enabled: no
|
||||
when: {get_param: UndercloudUpgrade}
|
||||
upgrade_tasks:
|
||||
- name: Check if mistral executor is deployed
|
||||
command: systemctl is-enabled --quiet openstack-mistral-executor
|
||||
|
@ -51,6 +51,10 @@ parameters:
|
||||
default: []
|
||||
description: list of optional environment variables
|
||||
type: comma_delimited_list
|
||||
UndercloudUpgrade:
|
||||
type: boolean
|
||||
description: Flag to indicate undercloud upgrade process is being run.
|
||||
default: false
|
||||
|
||||
conditions:
|
||||
|
||||
@ -187,7 +191,15 @@ outputs:
|
||||
environment:
|
||||
- KOLLA_CONFIG_STRATEGY=COPY_ALWAYS
|
||||
- {}
|
||||
host_prep_tasks: {get_attr: [NeutronLogging, host_prep_tasks]}
|
||||
host_prep_tasks:
|
||||
list_concat:
|
||||
- {get_attr: [NeutronLogging, host_prep_tasks]}
|
||||
- - name: Stop and disable the neutron-server service
|
||||
service:
|
||||
name: neutron-server
|
||||
state: stopped
|
||||
enabled: no
|
||||
when: {get_param: UndercloudUpgrade}
|
||||
upgrade_tasks:
|
||||
- name: Check if neutron_server is deployed
|
||||
command: systemctl is-enabled --quiet neutron-server
|
||||
|
@ -44,6 +44,10 @@ parameters:
|
||||
type: string
|
||||
description: Specifies the default CA cert to use if TLS is used for
|
||||
services in the internal network.
|
||||
UndercloudUpgrade:
|
||||
type: boolean
|
||||
description: Flag to indicate undercloud upgrade process is being run.
|
||||
default: false
|
||||
|
||||
conditions:
|
||||
|
||||
@ -160,6 +164,12 @@ outputs:
|
||||
file:
|
||||
path: /var/lib/neutron
|
||||
state: directory
|
||||
- name: Stop and disable the neutron-dhcp-agent service
|
||||
service:
|
||||
name: neutron-dhcp-agent
|
||||
state: stopped
|
||||
enabled: no
|
||||
when: {get_param: UndercloudUpgrade}
|
||||
upgrade_tasks:
|
||||
- name: Check if neutron_dhcp_agent is deployed
|
||||
command: systemctl is-enabled --quiet neutron-dhcp-agent
|
||||
|
@ -36,6 +36,10 @@ parameters:
|
||||
description: Mapping of service endpoint -> protocol. Typically set
|
||||
via parameter_defaults in the resource registry.
|
||||
type: json
|
||||
UndercloudUpgrade:
|
||||
type: boolean
|
||||
description: Flag to indicate undercloud upgrade process is being run.
|
||||
default: false
|
||||
|
||||
resources:
|
||||
|
||||
@ -127,6 +131,12 @@ outputs:
|
||||
file:
|
||||
path: /var/lib/neutron
|
||||
state: directory
|
||||
- name: Stop and disable the neutron-l3-agent service
|
||||
service:
|
||||
name: neutron-l3-agent
|
||||
state: stopped
|
||||
enabled: no
|
||||
when: {get_param: UndercloudUpgrade}
|
||||
upgrade_tasks:
|
||||
- name: Check if neutron_l3_agent is deployed
|
||||
command: systemctl is-enabled --quiet neutron-l3-agent
|
||||
|
@ -36,6 +36,10 @@ parameters:
|
||||
default: {}
|
||||
description: Parameters specific to the role
|
||||
type: json
|
||||
UndercloudUpgrade:
|
||||
type: boolean
|
||||
description: Flag to indicate undercloud upgrade process is being run.
|
||||
default: false
|
||||
|
||||
resources:
|
||||
|
||||
@ -124,6 +128,12 @@ outputs:
|
||||
file:
|
||||
path: /var/lib/neutron
|
||||
state: directory
|
||||
- name: Stop and disable the neutron-metadata-agent service
|
||||
service:
|
||||
name: neutron-metadata-agent
|
||||
state: stopped
|
||||
enabled: no
|
||||
when: {get_param: UndercloudUpgrade}
|
||||
upgrade_tasks:
|
||||
- name: Check if neutron_metadata_agent is deployed
|
||||
command: systemctl is-enabled --quiet neutron-metadata-agent
|
||||
|
@ -40,6 +40,10 @@ parameters:
|
||||
default: false
|
||||
description: Remove package if the service is being disabled during upgrade
|
||||
type: boolean
|
||||
UndercloudUpgrade:
|
||||
type: boolean
|
||||
description: Flag to indicate undercloud upgrade process is being run.
|
||||
default: false
|
||||
|
||||
resources:
|
||||
|
||||
@ -163,7 +167,13 @@ outputs:
|
||||
- KOLLA_CONFIG_STRATEGY=COPY_ALWAYS
|
||||
metadata_settings:
|
||||
get_attr: [NeutronOvsAgentBase, role_data, metadata_settings]
|
||||
host_prep_tasks: {get_attr: [NeutronLogging, host_prep_tasks]}
|
||||
host_prep_tasks:
|
||||
- name: Stop and disable the neutron-ovs-agent service
|
||||
service:
|
||||
name: neutron-openvswitch-agent
|
||||
state: stopped
|
||||
enabled: no
|
||||
when: {get_param: UndercloudUpgrade}
|
||||
upgrade_tasks:
|
||||
list_concat:
|
||||
- get_attr: [NeutronOvsAgentBase, role_data, ovs_upgrade_tasks]
|
||||
|
@ -32,6 +32,10 @@ parameters:
|
||||
default: {}
|
||||
description: Parameters specific to the role
|
||||
type: json
|
||||
UndercloudUpgrade:
|
||||
type: boolean
|
||||
description: Flag to indicate undercloud upgrade process is being run.
|
||||
default: false
|
||||
|
||||
resources:
|
||||
|
||||
@ -67,3 +71,10 @@ outputs:
|
||||
config_image: {get_param: DockerNeutronConfigImage}
|
||||
kolla_config: {}
|
||||
docker_config: {}
|
||||
host_prep_tasks:
|
||||
- name: Stop and disable the ironic-neutron-agent service
|
||||
service:
|
||||
name: ironic-neutron-agent
|
||||
state: stopped
|
||||
enabled: no
|
||||
when: {get_param: UndercloudUpgrade}
|
||||
|
@ -57,6 +57,10 @@ parameters:
|
||||
description: The password for the nova service and db account
|
||||
type: string
|
||||
hidden: true
|
||||
UndercloudUpgrade:
|
||||
type: boolean
|
||||
description: Flag to indicate undercloud upgrade process is being run.
|
||||
default: false
|
||||
|
||||
conditions:
|
||||
|
||||
@ -312,7 +316,14 @@ outputs:
|
||||
- {get_param: DeployIdentifier}
|
||||
metadata_settings:
|
||||
get_attr: [NovaApiBase, role_data, metadata_settings]
|
||||
host_prep_tasks: {get_attr: [NovaApiLogging, host_prep_tasks]}
|
||||
host_prep_tasks:
|
||||
list_concat:
|
||||
- {get_attr: [NovaApiLogging, host_prep_tasks]}
|
||||
- - name: remove nova cron jobs
|
||||
file:
|
||||
path: /var/spool/cron/nova
|
||||
state: absent
|
||||
when: {get_param: UndercloudUpgrade}
|
||||
upgrade_tasks:
|
||||
- name: Check if nova_api is deployed
|
||||
command: systemctl is-enabled --quiet openstack-nova-api
|
||||
|
@ -69,6 +69,10 @@ parameters:
|
||||
default: []
|
||||
description: list of optional en
|
||||
type: comma_delimited_list
|
||||
UndercloudUpgrade:
|
||||
type: boolean
|
||||
description: Flag to indicate undercloud upgrade process is being run.
|
||||
default: false
|
||||
|
||||
resources:
|
||||
|
||||
@ -198,6 +202,12 @@ outputs:
|
||||
file:
|
||||
path: /etc/ceph
|
||||
state: directory
|
||||
- name: Stop and disable the nova-compute service
|
||||
service:
|
||||
name: openstack-nova-compute
|
||||
state: stopped
|
||||
enabled: no
|
||||
when: {get_param: UndercloudUpgrade}
|
||||
upgrade_tasks:
|
||||
- name: Check if nova_compute is deployed
|
||||
command: systemctl is-enabled --quiet openstack-nova-compute
|
||||
|
@ -44,6 +44,10 @@ parameters:
|
||||
default: false
|
||||
description: Remove package if the service is being disabled during upgrade
|
||||
type: boolean
|
||||
UndercloudUpgrade:
|
||||
type: boolean
|
||||
description: Flag to indicate undercloud upgrade process is being run.
|
||||
default: false
|
||||
|
||||
|
||||
resources:
|
||||
@ -126,7 +130,15 @@ outputs:
|
||||
- /var/lib/config-data/puppet-generated/nova/:/var/lib/kolla/config_files/src:ro
|
||||
environment:
|
||||
- KOLLA_CONFIG_STRATEGY=COPY_ALWAYS
|
||||
host_prep_tasks: {get_attr: [NovaLogging, host_prep_tasks]}
|
||||
host_prep_tasks:
|
||||
list_concat:
|
||||
- {get_attr: [NovaLogging, host_prep_tasks]}
|
||||
- - name: Stop and disable the nova-conductor service
|
||||
service:
|
||||
name: openstack-nova-conductor
|
||||
state: stopped
|
||||
enabled: no
|
||||
when: {get_param: UndercloudUpgrade}
|
||||
upgrade_tasks:
|
||||
- name: Check if nova_conductor is deployed
|
||||
command: systemctl is-enabled --quiet openstack-nova-conductor
|
||||
|
@ -40,6 +40,10 @@ parameters:
|
||||
default: false
|
||||
description: Remove package if the service is being disabled during upgrade
|
||||
type: boolean
|
||||
UndercloudUpgrade:
|
||||
type: boolean
|
||||
description: Flag to indicate undercloud upgrade process is being run.
|
||||
default: false
|
||||
|
||||
resources:
|
||||
|
||||
@ -122,7 +126,15 @@ outputs:
|
||||
- /run:/run
|
||||
environment:
|
||||
- KOLLA_CONFIG_STRATEGY=COPY_ALWAYS
|
||||
host_prep_tasks: {get_attr: [NovaLogging, host_prep_tasks]}
|
||||
host_prep_tasks:
|
||||
list_concat:
|
||||
- {get_attr: [NovaLogging, host_prep_tasks]}
|
||||
- - name: Stop and disable the nova-scheduler service
|
||||
service:
|
||||
name: openstack-nova-scheduler
|
||||
state: stopped
|
||||
enabled: no
|
||||
when: {get_param: UndercloudUpgrade}
|
||||
upgrade_tasks:
|
||||
- name: Check if nova_scheduler is deployed
|
||||
command: systemctl is-enabled --quiet openstack-nova-scheduler
|
||||
|
@ -48,6 +48,10 @@ parameters:
|
||||
type: string
|
||||
description: Specifies the default CA cert to use if TLS is used for
|
||||
services in the internal network.
|
||||
UndercloudUpgrade:
|
||||
type: boolean
|
||||
description: Flag to indicate undercloud upgrade process is being run.
|
||||
default: false
|
||||
|
||||
conditions:
|
||||
|
||||
@ -224,6 +228,12 @@ outputs:
|
||||
Log files from rabbitmq containers can be found under
|
||||
/var/log/containers/rabbitmq.
|
||||
ignore_errors: true
|
||||
- name: Stop and disable the rabbitmq-server service
|
||||
service:
|
||||
name: rabbitmq-server
|
||||
state: stopped
|
||||
enabled: no
|
||||
when: {get_param: UndercloudUpgrade}
|
||||
upgrade_tasks:
|
||||
- name: Check if rabbitmq server is deployed
|
||||
command: systemctl is-enabled --quiet rabbitmq-server
|
||||
|
@ -47,6 +47,10 @@ parameters:
|
||||
default: false
|
||||
description: Remove package if the service is being disabled during upgrade
|
||||
type: boolean
|
||||
UndercloudUpgrade:
|
||||
type: boolean
|
||||
description: Flag to indicate undercloud upgrade process is being run.
|
||||
default: false
|
||||
|
||||
conditions:
|
||||
|
||||
@ -240,6 +244,19 @@ outputs:
|
||||
src: /var/log/swift
|
||||
dest: /var/log/containers/swift
|
||||
state: link
|
||||
- name: Stop and disable the swift proxy services
|
||||
service:
|
||||
name: "{{ item }}"
|
||||
state: stopped
|
||||
enabled: no
|
||||
when: {get_param: UndercloudUpgrade}
|
||||
with_items:
|
||||
- openstack-swift-account
|
||||
- openstack-swift-account-reaper
|
||||
- openstack-swift-container
|
||||
- openstack-swift-container-sync
|
||||
- openstack-swift-container-updater
|
||||
- openstack-swift-proxy
|
||||
upgrade_tasks:
|
||||
- name: Check if swift-proxy or swift-object-expirer are deployed
|
||||
command: systemctl is-enabled --quiet "{{ item }}"
|
||||
|
@ -57,6 +57,10 @@ parameters:
|
||||
default: false
|
||||
description: Remove package if the service is being disabled during upgrade
|
||||
type: boolean
|
||||
UndercloudUpgrade:
|
||||
type: boolean
|
||||
description: Flag to indicate undercloud upgrade process is being run.
|
||||
default: false
|
||||
|
||||
resources:
|
||||
|
||||
@ -481,6 +485,17 @@ outputs:
|
||||
template: 'DEVICE'
|
||||
for_each:
|
||||
DEVICE: {get_param: SwiftRawDisks}
|
||||
- name: Stop and disable the swift storage services
|
||||
service:
|
||||
name: "{{ item }}"
|
||||
state: stopped
|
||||
enabled: no
|
||||
when: {get_param: UndercloudUpgrade}
|
||||
with_items:
|
||||
- openstack-swift-object
|
||||
- openstack-swift-object-expirer
|
||||
- openstack-swift-object-reconstructor
|
||||
- openstack-swift-object-updater
|
||||
upgrade_tasks:
|
||||
- name: Check if swift storage services are deployed
|
||||
command: systemctl is-enabled --quiet "{{ item }}"
|
||||
|
52
docker/services/undercloud-upgrade.yaml
Normal file
52
docker/services/undercloud-upgrade.yaml
Normal file
@ -0,0 +1,52 @@
|
||||
heat_template_version: queens
|
||||
|
||||
description: >
|
||||
Upgrade a non-containerized undercloud to a containerized undercloud.
|
||||
|
||||
parameters:
|
||||
ServiceData:
|
||||
default: {}
|
||||
description: Dictionary packing service data
|
||||
type: json
|
||||
ServiceNetMap:
|
||||
default: {}
|
||||
description: Mapping of service_name -> network name. Typically set
|
||||
via parameter_defaults in the resource registry. This
|
||||
mapping overrides those in ServiceNetMapDefaults.
|
||||
type: json
|
||||
DefaultPasswords:
|
||||
default: {}
|
||||
type: json
|
||||
RoleName:
|
||||
default: ''
|
||||
description: Role name on which the service is applied
|
||||
type: string
|
||||
RoleParameters:
|
||||
default: {}
|
||||
description: Parameters specific to the role
|
||||
type: json
|
||||
EndpointMap:
|
||||
default: {}
|
||||
description: Mapping of service endpoint -> protocol. Typically set
|
||||
via parameter_defaults in the resource registry.
|
||||
type: json
|
||||
|
||||
outputs:
|
||||
role_data:
|
||||
description: Role data for the TripleO Undercloud Upgrade service.
|
||||
value:
|
||||
service_name: undercloud_upgrade
|
||||
config_settings: {}
|
||||
external_deploy_tasks:
|
||||
- name: upgrade all packages
|
||||
yum:
|
||||
name: '*'
|
||||
state: latest
|
||||
when: step|int == 1
|
||||
docker_config: {}
|
||||
kolla_config: {}
|
||||
puppet_config:
|
||||
config_volume: ''
|
||||
step_config: ''
|
||||
config_image: ''
|
||||
upgrade_tasks: []
|
@ -43,6 +43,10 @@ parameters:
|
||||
EnableInternalTLS:
|
||||
type: boolean
|
||||
default: false
|
||||
UndercloudUpgrade:
|
||||
type: boolean
|
||||
description: Flag to indicate undercloud upgrade process is being run.
|
||||
default: false
|
||||
|
||||
conditions:
|
||||
zaqar_management_store_sqlalchemy: {equals : [{get_param: ZaqarManagementStore}, 'sqlalchemy']}
|
||||
@ -194,6 +198,12 @@ outputs:
|
||||
Log files from zaqar containers can be found under
|
||||
/var/log/containers/zaqar and /var/log/containers/httpd/zaqar.
|
||||
ignore_errors: true
|
||||
- name: Stop and disable the zaqar-server service
|
||||
service:
|
||||
name: openstack-zaqar@1
|
||||
state: stopped
|
||||
enabled: no
|
||||
when: {get_param: UndercloudUpgrade}
|
||||
upgrade_tasks:
|
||||
- name: Check for zaqar running under apache
|
||||
tags: common
|
||||
|
8
environments/lifecycle/undercloud-upgrade-prepare.yaml
Normal file
8
environments/lifecycle/undercloud-upgrade-prepare.yaml
Normal file
@ -0,0 +1,8 @@
|
||||
# A Heat environment file that can be used to upgrade a non-containerized undercloud
|
||||
# to a containerized undercloud.
|
||||
|
||||
resource_registry:
|
||||
OS::TripleO::Services::UndercloudUpgrade: ../../docker/services/undercloud-upgrade.yaml
|
||||
|
||||
parameter_defaults:
|
||||
UndercloudUpgrade: true
|
@ -83,7 +83,6 @@ parameter_defaults:
|
||||
NeutronTypeDrivers: ['local','flat','vlan','gre','vxlan']
|
||||
NeutronVniRanges: '10:100'
|
||||
NeutronPortQuota: '-1'
|
||||
MigrateLegacyNeutronDb: true
|
||||
SwiftCorsAllowedOrigin: '*'
|
||||
# A list of static routes for the control plane network. Ensure traffic to
|
||||
# nodes on remote control plane networks use the correct network path.
|
||||
|
@ -242,6 +242,7 @@ resource_registry:
|
||||
OS::TripleO::Services::Ipsec: OS::Heat::None
|
||||
OS::TripleO::Services::Rhsm: OS::Heat::None
|
||||
OS::TripleO::Services::MasqueradeNetworks: OS::Heat::None
|
||||
OS::TripleO::Services::UndercloudUpgrade: OS::Heat::None
|
||||
OS::TripleO::Services::Collectd: OS::Heat::None
|
||||
OS::TripleO::LoggingConfiguration: puppet/services/logging/fluentd-config.yaml
|
||||
OS::TripleO::Services::ManilaApi: OS::Heat::None
|
||||
|
@ -3,5 +3,3 @@ upgrade:
|
||||
- |
|
||||
When the undercloud was not containerized, the neutron database name was called neutron.
|
||||
When we upgrade to a containerized undercloud, the database name is called ovs_neutron.
|
||||
We introduced MigrateLegacyNeutronDb (false by default in the service but true when
|
||||
the undercloud is containerized) that will rename the database during host_prep_tasks.
|
||||
|
@ -0,0 +1,8 @@
|
||||
---
|
||||
upgrade:
|
||||
- |
|
||||
The Undercloud upgrade is now done via host_prep_tasks in the docker services, driven
|
||||
by tripleoclient when containerizing the Undercloud.
|
||||
Note that the crontabs that were not managed by Puppet (e.g. custom crontabs) for the
|
||||
openstack services (cinder, heat, keystone and nova) will be removed and need to be
|
||||
containerized or re-added manually after the upgrade.
|
@ -74,5 +74,6 @@
|
||||
- OS::TripleO::Services::UndercloudRedis
|
||||
- OS::TripleO::Services::UndercloudHAProxy
|
||||
- OS::TripleO::Services::UndercloudKeepalived
|
||||
- OS::TripleO::Services::UndercloudUpgrade
|
||||
- OS::TripleO::Services::Zaqar
|
||||
- OS::TripleO::Services::Tempest
|
||||
|
@ -77,6 +77,7 @@
|
||||
- OS::TripleO::Services::UndercloudRedis
|
||||
- OS::TripleO::Services::UndercloudHAProxy
|
||||
- OS::TripleO::Services::UndercloudKeepalived
|
||||
- OS::TripleO::Services::UndercloudUpgrade
|
||||
- OS::TripleO::Services::Zaqar
|
||||
- OS::TripleO::Services::Tempest
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user