Browse Source

Merge "Handle undercloud upgrades via host_prep_tasks"

changes/54/558354/17
Zuul 4 years ago committed by Gerrit Code Review
parent
commit
6d0f2f56af
  1. 10
      docker/services/aodh-evaluator.yaml
  2. 10
      docker/services/aodh-listener.yaml
  3. 10
      docker/services/aodh-notifier.yaml
  4. 10
      docker/services/ceilometer-agent-central.yaml
  5. 10
      docker/services/ceilometer-agent-compute.yaml
  6. 10
      docker/services/ceilometer-agent-notification.yaml
  7. 9
      docker/services/cinder-api.yaml
  8. 10
      docker/services/cinder-scheduler.yaml
  9. 10
      docker/services/cinder-volume.yaml
  10. 12
      docker/services/database/mysql.yaml
  11. 10
      docker/services/glance-api.yaml
  12. 10
      docker/services/gnocchi-metricd.yaml
  13. 10
      docker/services/gnocchi-statsd.yaml
  14. 10
      docker/services/haproxy.yaml
  15. 13
      docker/services/heat-api.yaml
  16. 14
      docker/services/heat-engine.yaml
  17. 10
      docker/services/ironic-conductor.yaml
  18. 10
      docker/services/ironic-inspector.yaml
  19. 10
      docker/services/keepalived.yaml
  20. 19
      docker/services/keystone.yaml
  21. 10
      docker/services/memcached.yaml
  22. 10
      docker/services/mistral-engine.yaml
  23. 10
      docker/services/mistral-executor.yaml
  24. 14
      docker/services/neutron-api.yaml
  25. 10
      docker/services/neutron-dhcp.yaml
  26. 10
      docker/services/neutron-l3.yaml
  27. 10
      docker/services/neutron-metadata.yaml
  28. 12
      docker/services/neutron-ovs-agent.yaml
  29. 11
      docker/services/neutron-plugin-ml2.yaml
  30. 13
      docker/services/nova-api.yaml
  31. 10
      docker/services/nova-compute.yaml
  32. 14
      docker/services/nova-conductor.yaml
  33. 14
      docker/services/nova-scheduler.yaml
  34. 10
      docker/services/rabbitmq.yaml
  35. 17
      docker/services/swift-proxy.yaml
  36. 15
      docker/services/swift-storage.yaml
  37. 52
      docker/services/undercloud-upgrade.yaml
  38. 10
      docker/services/zaqar.yaml
  39. 8
      environments/lifecycle/undercloud-upgrade-prepare.yaml
  40. 1
      environments/undercloud.yaml
  41. 1
      overcloud-resource-registry-puppet.j2.yaml
  42. 2
      releasenotes/notes/neutron_db_rename-bbfbce1c58cadc84.yaml
  43. 8
      releasenotes/notes/undercloud_upgrade-b69ed7d5d002d6ae.yaml
  44. 1
      roles/Undercloud.yaml
  45. 1
      roles_data_undercloud.yaml

10
docker/services/aodh-evaluator.yaml

@ -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

10
docker/services/aodh-listener.yaml

@ -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

10
docker/services/aodh-notifier.yaml

@ -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

10
docker/services/ceilometer-agent-central.yaml

@ -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

10
docker/services/ceilometer-agent-compute.yaml

@ -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

10
docker/services/ceilometer-agent-notification.yaml

@ -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

9
docker/services/cinder-api.yaml

@ -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

10
docker/services/cinder-scheduler.yaml

@ -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

10
docker/services/cinder-volume.yaml

@ -65,6 +65,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:
@ -175,6 +179,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

12
docker/services/database/mysql.yaml

@ -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

10
docker/services/glance-api.yaml

@ -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

10
docker/services/gnocchi-metricd.yaml

@ -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

10
docker/services/gnocchi-statsd.yaml

@ -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

10
docker/services/haproxy.yaml

@ -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]

13
docker/services/heat-api.yaml

@ -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

14
docker/services/heat-engine.yaml

@ -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

10
docker/services/ironic-conductor.yaml

@ -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

10
docker/services/ironic-inspector.yaml

@ -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:

10
docker/services/keepalived.yaml

@ -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

19
docker/services/keystone.yaml

@ -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

10
docker/services/memcached.yaml

@ -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

10
docker/services/mistral-engine.yaml

@ -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

10
docker/services/mistral-executor.yaml

@ -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

14
docker/services/neutron-api.yaml

@ -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

10
docker/services/neutron-dhcp.yaml

@ -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:
@ -164,6 +168,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

10
docker/services/neutron-l3.yaml

@ -40,6 +40,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:
@ -131,6 +135,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

10
docker/services/neutron-metadata.yaml

@ -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

12
docker/services/neutron-ovs-agent.yaml

@ -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:
@ -167,7 +171,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]

11
docker/services/neutron-plugin-ml2.yaml

@ -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}

13
docker/services/nova-api.yaml

@ -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

10
docker/services/nova-compute.yaml

@ -73,6 +73,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:
@ -203,6 +207,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

14
docker/services/nova-conductor.yaml

@ -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

14
docker/services/nova-scheduler.yaml

@ -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

10
docker/services/rabbitmq.yaml

@ -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

17
docker/services/swift-proxy.yaml

@ -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 }}"

15
docker/services/swift-storage.yaml

@ -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

@ -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: []

10
docker/services/zaqar.yaml

@ -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

@ -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

1
environments/undercloud.yaml

@ -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.

1
overcloud-resource-registry-puppet.j2.yaml

@ -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

2
releasenotes/notes/neutron_db_rename-bbfbce1c58cadc84.yaml

@ -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.

8
releasenotes/notes/undercloud_upgrade-b69ed7d5d002d6ae.yaml

@ -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.

1
roles/Undercloud.yaml

@ -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

1
roles_data_undercloud.yaml

@ -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…
Cancel
Save