upgrade: remove tasks that stop and disable services

We don't need upgrade_tasks that stop systemd services since all
services are now containerized.
However, we decided to keep the tasks that remove the rpms in case some
of deployments didn't cleanup them in previous releases, they can still
do it now.

Change-Id: I6abdc9e37966cd818306f7af473958fd4662ccb5
Related-Bug: #1806733
changes/78/622578/10
Emilien Macchi 4 years ago
parent dbc66fd451
commit e4ee042a2a
  1. 32
      deployment/aodh/aodh-api-container.yaml
  2. 19
      deployment/aodh/aodh-evaluator-container.yaml
  3. 19
      deployment/aodh/aodh-listener-container.yaml
  4. 19
      deployment/aodh/aodh-notifier-container.yaml
  5. 18
      docker/services/barbican-api.yaml
  6. 19
      docker/services/ceilometer-agent-central.yaml
  7. 33
      docker/services/ceilometer-agent-compute.yaml
  8. 19
      docker/services/ceilometer-agent-ipmi.yaml
  9. 19
      docker/services/ceilometer-agent-notification.yaml
  10. 44
      docker/services/cinder-api.yaml
  11. 19
      docker/services/cinder-backup.yaml
  12. 19
      docker/services/cinder-scheduler.yaml
  13. 19
      docker/services/cinder-volume.yaml
  14. 19
      docker/services/congress.yaml
  15. 21
      docker/services/database/mongodb.yaml
  16. 49
      docker/services/database/mysql.yaml
  17. 21
      docker/services/database/redis.yaml
  18. 35
      docker/services/ec2-api.yaml
  19. 21
      docker/services/etcd.yaml
  20. 17
      docker/services/fluentd.yaml
  21. 19
      docker/services/glance-api.yaml
  22. 50
      docker/services/gnocchi-api.yaml
  23. 21
      docker/services/gnocchi-metricd.yaml
  24. 21
      docker/services/gnocchi-statsd.yaml
  25. 19
      docker/services/haproxy.yaml
  26. 47
      docker/services/heat-api-cfn.yaml
  27. 51
      docker/services/heat-api.yaml
  28. 21
      docker/services/heat-engine.yaml
  29. 50
      docker/services/ironic-api.yaml
  30. 19
      docker/services/ironic-conductor.yaml
  31. 22
      docker/services/ironic-inspector.yaml
  32. 21
      docker/services/ironic-neutron-agent.yaml
  33. 35
      docker/services/iscsid.yaml
  34. 19
      docker/services/keepalived.yaml
  35. 34
      docker/services/keystone.yaml
  36. 21
      docker/services/manila-api.yaml
  37. 21
      docker/services/manila-scheduler.yaml
  38. 21
      docker/services/manila-share.yaml
  39. 21
      docker/services/memcached.yaml
  40. 21
      docker/services/messaging/notify-rabbitmq.yaml
  41. 21
      docker/services/messaging/rpc-rabbitmq.yaml
  42. 19
      docker/services/metrics/collectd.yaml
  43. 46
      docker/services/mistral-api.yaml
  44. 19
      docker/services/mistral-engine.yaml
  45. 19
      docker/services/mistral-event-engine.yaml
  46. 19
      docker/services/mistral-executor.yaml
  47. 21
      docker/services/multipathd.yaml
  48. 19
      docker/services/neutron-api.yaml
  49. 21
      docker/services/neutron-dhcp.yaml
  50. 21
      docker/services/neutron-l3.yaml
  51. 21
      docker/services/neutron-metadata.yaml
  52. 20
      docker/services/neutron-ovs-agent.yaml
  53. 21
      docker/services/neutron-sriov-agent.yaml
  54. 51
      docker/services/nova-api.yaml
  55. 32
      docker/services/nova-compute.yaml
  56. 31
      docker/services/nova-conductor.yaml
  57. 19
      docker/services/nova-consoleauth.yaml
  58. 22
      docker/services/nova-ironic.yaml
  59. 21
      docker/services/nova-libvirt.yaml
  60. 30
      docker/services/nova-placement.yaml
  61. 19
      docker/services/nova-scheduler.yaml
  62. 19
      docker/services/nova-vnc-proxy.yaml
  63. 48
      docker/services/octavia-api.yaml
  64. 19
      docker/services/octavia-health-manager.yaml
  65. 21
      docker/services/octavia-housekeeping.yaml
  66. 21
      docker/services/octavia-worker.yaml
  67. 19
      docker/services/opendaylight-api.yaml
  68. 21
      docker/services/ovn-controller.yaml
  69. 21
      docker/services/ovn-dbs.yaml
  70. 21
      docker/services/ovn-metadata.yaml
  71. 23
      docker/services/rabbitmq.yaml
  72. 19
      docker/services/sahara-api.yaml
  73. 19
      docker/services/sahara-engine.yaml
  74. 23
      docker/services/sensu-client.yaml
  75. 24
      docker/services/swift-proxy.yaml
  76. 62
      docker/services/swift-storage.yaml
  77. 22
      docker/services/tacker.yaml
  78. 28
      docker/services/tripleo-ui.yaml
  79. 22
      docker/services/xinetd.yaml
  80. 44
      docker/services/zaqar.yaml
  81. 22
      puppet/services/apache.j2.yaml
  82. 20
      puppet/services/auditd.yaml
  83. 21
      puppet/services/barbican-api.yaml
  84. 18
      puppet/services/ceilometer-agent-central.yaml
  85. 18
      puppet/services/ceilometer-agent-compute.yaml
  86. 25
      puppet/services/ceilometer-agent-ipmi.yaml
  87. 18
      puppet/services/ceilometer-agent-notification.yaml
  88. 31
      puppet/services/cinder-api.yaml
  89. 18
      puppet/services/cinder-scheduler.yaml
  90. 18
      puppet/services/cinder-volume.yaml
  91. 23
      puppet/services/congress.yaml
  92. 28
      puppet/services/database/redis.yaml
  93. 21
      puppet/services/disabled/glance-registry-disabled.yaml
  94. 12
      puppet/services/disabled/heat-api-cloudwatch-disabled.yaml
  95. 25
      puppet/services/ec2-api.yaml
  96. 19
      puppet/services/etcd.yaml
  97. 30
      puppet/services/glance-api.yaml
  98. 18
      puppet/services/gnocchi-metricd.yaml
  99. 18
      puppet/services/gnocchi-statsd.yaml
  100. 23
      puppet/services/haproxy.yaml
  101. Some files were not shown because too many files have changed in this diff Show More

@ -229,38 +229,6 @@ outputs:
/var/log/containers/aodh and /var/log/containers/httpd/aodh-api.
ignore_errors: true
upgrade_tasks:
- when: step|int == 0
tags: common
block:
- name: Check for aodh api service running under apache
shell: "httpd -t -D DUMP_VHOSTS | grep -q aodh"
ignore_errors: True
register: aodh_httpd_enabled_result
- name: Set fact aodh_httpd_enabled
set_fact:
aodh_httpd_enabled: "{{ aodh_httpd_enabled_result.rc == 0 }}"
- name: Check if httpd is running
command: systemctl is-active --quiet httpd
ignore_errors: True
register: httpd_running_result
when: httpd_running is undefined
- name: Set fact httpd_running
set_fact:
httpd_running: "{{ httpd_running_result.rc == 0 }}"
when: httpd_running is undefined
- name: "PreUpgrade step0,validation: Check if aodh api is running"
shell: systemctl status 'httpd' | grep -q aodh
tags: validation
when:
- aodh_httpd_enabled|bool
- httpd_running|bool
- when: step|int == 2
block:
- name: Stop and disable aodh service (running under httpd)
when:
- aodh_httpd_enabled|bool
- httpd_running|bool
service: name=httpd state=stopped enabled=no
- when: step|int == 3
block:
- name: Set fact for removal of openstack-aodh-api package

@ -125,25 +125,6 @@ outputs:
/var/log/containers/aodh and /var/log/containers/httpd/aodh-api.
ignore_errors: true
upgrade_tasks:
- when: step|int == 0
tags: common
block:
- name: Check if aodh_evaluator is deployed
command: systemctl is-enabled --quiet openstack-aodh-evaluator
ignore_errors: True
register: aodh_evaluator_enabled_result
- name: Set fact aodh_evaluator_enabled
set_fact:
aodh_evaluator_enabled: "{{ aodh_evaluator_enabled_result.rc == 0 }}"
- name: "PreUpgrade step0,validation: Check service openstack-aodh-evaluator is running"
command: systemctl is-active --quiet openstack-aodh-evaluator
tags: validation
when: aodh_evaluator_enabled|bool
- when: step|int == 2
block:
- name: Stop and disable openstack-aodh-evaluator service
when: aodh_evaluator_enabled|bool
service: name=openstack-aodh-evaluator.service state=stopped enabled=no
- when: step|int == 3
block:
- name: Set fact for removal of openstack-aodh-evaluator package

@ -133,25 +133,6 @@ outputs:
/var/log/containers/aodh and /var/log/containers/httpd/aodh-api.
ignore_errors: true
upgrade_tasks:
- when: step|int == 0
tags: common
block:
- name: Check if aodh_listener is deployed
command: systemctl is-enabled --quiet openstack-aodh-listener
ignore_errors: True
register: aodh_listener_enabled_result
- name: Set fact aodh_listener_enabled
set_fact:
aodh_listener_enabled: "{{ aodh_listener_enabled_result.rc == 0 }}"
- name: "PreUpgrade step0,validation: Check service openstack-aodh-listener is running"
command: systemctl is-active --quiet openstack-aodh-listener
when: aodh_listener_enabled|bool
tags: validation
- when: step|int == 2
block:
- name: Stop and disable openstack-aodh-listener service
when: aodh_listener_enabled|bool
service: name=openstack-aodh-listener.service state=stopped enabled=no
- when: step|int == 3
block:
- name: Set fact for removal of openstack-aodh-listener package

@ -133,25 +133,6 @@ outputs:
/var/log/containers/aodh and /var/log/containers/httpd/aodh-api.
ignore_errors: true
upgrade_tasks:
- when: step|int == 0
tags: common
block:
- name: Check if aodh_notifier is deployed
command: systemctl is-enabled --quiet openstack-aodh-notifier
ignore_errors: True
register: aodh_notifier_enabled_result
- name: Set fact aodh_notifier_enabled
set_fact:
aodh_notifier_enabled: "{{ aodh_notifier_enabled_result.rc == 0 }}"
- name: "PreUpgrade step0,validation: Check service openstack-aodh-notifier is running"
command: systemctl is-active --quiet openstack-aodh-notifier
when: aodh_notifier_enabled|bool
tags: validation
- when: step|int == 2
block:
- name: Stop and disable openstack-aodh-notifier service
when: aodh_notifier_enabled|bool
service: name=openstack-aodh-notifier.service state=stopped enabled=no
- when: step|int == 3
block:
- name: Set fact for removal of openstack-aodh-notifier package

@ -243,24 +243,6 @@ outputs:
environment: *kolla_env
host_prep_tasks: {get_attr: [BarbicanApiLogging, host_prep_tasks]}
upgrade_tasks:
- when: step|int == 0
tags: common
block:
- name: Check if openstack-barbican-api is deployed
command: systemctl is-enabled --quiet openstack-barbican-api
ignore_errors: True
register: barbican_enabled_result
- name: Set fact barbican_enabled
set_fact:
barbican_enabled: "{{ barbican_enabled_result.rc == 0 }}"
- name: "PreUpgrade step0,validation: Check service barbican-api is running"
command: systemctl is-active --quiet openstack-barbican-api
when: barbican_enabled|bool
- when: step|int == 2
block:
- name: Stop and disable barbican_api service
when: barbican_enabled|bool
service: name=openstack-barbican-api state=stopped enabled=no
- when: step|int == 3
block:
- name: Set fact for removal of openstack-barbican-api package

@ -150,25 +150,6 @@ outputs:
/var/log/containers/ceilometer.
ignore_errors: true
upgrade_tasks:
- when: step|int == 0
tags: common
block:
- name: Check if ceilometer_agent_central is deployed
command: systemctl is-enabled --quiet openstack-ceilometer-central
ignore_errors: True
register: ceilometer_agent_central_enabled_result
- name: Set fact ceilometer_agent_central_enabled
set_fact:
ceilometer_agent_central_enabled: "{{ ceilometer_agent_central_enabled_result.rc == 0 }}"
- name: "PreUpgrade step0,validation: Check service openstack-ceilometer-central is running"
command: systemctl is-active --quiet openstack-ceilometer-central
when: ceilometer_agent_central_enabled|bool
tags: validation
- when: step|int == 2
block:
- name: Stop and disable ceilometer agent central service
service: name=openstack-ceilometer-central state=stopped enabled=no
when: ceilometer_agent_central_enabled|bool
- when: step|int == 3
block:
- name: Set fact for removal of openstack-ceilometer-central package

@ -118,39 +118,6 @@ outputs:
/var/log/containers/ceilometer.
ignore_errors: true
upgrade_tasks:
- when: step|int == 0
tags: common
block:
- name: Check if openstack-ceilometer-compute is deployed
command: systemctl is-enabled --quiet openstack-ceilometer-compute
ignore_errors: True
register: openstack_ceilometer_compute_enabled_result
- name: Set fact openstack_ceilometer_compute_enabled
set_fact:
openstack_ceilometer_compute_enabled: "{{ openstack_ceilometer_compute_enabled_result.rc == 0 }}"
- name: Check if openstack-ceilometer-polling is deployed
command: systemctl is-enabled --quiet openstack-ceilometer-polling
ignore_errors: True
register: openstack_ceilometer_polling_enabled_result
- name: Set fact openstack_ceilometer_polling_enabled
set_fact:
openstack_ceilometer_polling_enabled: "{{ openstack_ceilometer_polling_enabled_result.rc == 0 }}"
- name: "PreUpgrade step0,validation: Check service openstack-ceilometer-compute is running"
command: systemctl is-active --quiet openstack-ceilometer-compute
when: openstack_ceilometer_compute_enabled|bool
tags: validation
- name: "PreUpgrade step0,validation: Check service openstack-ceilometer-polling is running"
command: systemctl is-active --quiet openstack-ceilometer-polling
when: openstack_ceilometer_polling_enabled|bool
tags: validation
- when: step|int == 2
block:
- name: Stop and disable ceilometer compute agent
service: name=openstack-ceilometer-compute state=stopped enabled=no
when: openstack_ceilometer_compute_enabled|bool
- name: Stop and disable ceilometer polling agent
service: name=openstack-ceilometer-polling state=stopped enabled=no
when: openstack_ceilometer_polling_enabled|bool
- when: step|int == 3
block:
- name: Set fact for removal of openstack-ceilometer-compute and polling package

@ -129,25 +129,6 @@ outputs:
/var/log/containers/ceilometer.
ignore_errors: true
upgrade_tasks:
- when: step|int == 0
tags: common
block:
- name: Check if ceilometer-agent-ipmi is deployed
command: systemctl is-enabled --quiet openstack-ceilometer-ipmi
ignore_errors: True
register: ceilometer_ipmi_enabled_result
- name: Set fact ceilometer_ipmi_enabled
set_fact:
ceilometer_ipmi_enabled: "{{ ceilometer_ipmi_enabled_result.rc == 0 }}"
- name: "PreUpgrade step0,validation: Check if openstack-ceilometer-ipmi is running"
command: systemctl is-active --quiet openstack-ceilometer-ipmi
when: ceilometer_ipmi_enabled|bool
tags: validation
- when: step|int == 2
block:
- name: Stop and disable ceilometer agent ipmi service
service: name=openstack-ceilometer-agent-ipmi state=stopped enabled=no
when: ceilometer_ipmi_enabled|bool
- when: step|int == 3
block:
- name: Set fact for removal of openstack-ceilometer-ipmi package

@ -146,25 +146,6 @@ outputs:
/var/log/containers/ceilometer.
ignore_errors: true
upgrade_tasks:
- when: step|int == 0
tags: common
block:
- name: Check if ceilometer_agent_notification is deployed
command: systemctl is-enabled --quiet openstack-ceilometer-notification
ignore_errors: True
register: ceilometer_agent_notification_enabled_result
- name: Set fact ceilometer_agent_notification_enabled
set_fact:
ceilometer_agent_notification_enabled: "{{ ceilometer_agent_notification_enabled_result.rc == 0 }}"
- name: "PreUpgrade step0,validation: Check service openstack-ceilometer-notification is running"
command: systemctl is-active --quiet openstack-ceilometer-notification
when: ceilometer_agent_notification_enabled|bool
tags: validation
- when: step|int == 2
block:
- name: Stop and disable ceilometer agent notification service
service: name=openstack-ceilometer-notification state=stopped enabled=no
when: ceilometer_agent_notification_enabled|bool
- when: step|int == 3
block:
- name: Set fact for removal of openstack-ceilometer-notification package

@ -230,33 +230,6 @@ outputs:
block:
- name: set is_bootstrap_node fact
set_fact: is_bootstrap_node={{cinder_api_short_bootstrap_node_name|lower == ansible_hostname|lower}}
- name: Check is cinder_api is deployed
command: systemctl is-enabled openstack-cinder-api
ignore_errors: True
register: cinder_api_enabled_result
- name: Set fact cinder_api_enabled
set_fact:
cinder_api_enabled: "{{ cinder_api_enabled_result.rc == 0 }}"
- name: Check if httpd service is running
command: systemctl is-active --quiet httpd
ignore_errors: True
register: httpd_running_result
when: httpd_running is undefined
- name: Set fact httpd_running
set_fact:
httpd_running: "{{ httpd_running_result.rc == 0 }}"
when: httpd_running is undefined
- name: check for cinder_api running under apache (post upgrade)
shell: "httpd -t -D DUMP_VHOSTS | grep -q cinder"
register: cinder_api_apache
ignore_errors: true
- name: Set fact cinder_api_apache (upgrade)
set_fact:
cinder_api_apache: "{{ cinder_api_apache.rc == 0 }}"
- name: "PreUpgrade step0,validation: Check service openstack-cinder-api is running"
shell: systemctl is-active --quiet openstack-cinder-api
when: cinder_api_enabled|bool
tags: validation
- name: Ensure all online data migrations for Cinder have been applied
shell: |
if {{ container_cli }} ps | grep cinder_api; then
@ -267,24 +240,9 @@ outputs:
docker exec cinder_api cinder-manage db online_data_migrations
fi
tags: pre-upgrade
when:
- is_bootstrap_node|bool
- not (cinder_api_apache|bool and httpd_running|bool)
- not cinder_api_enabled|bool
- when: step|int == 2
block:
- name: Stop and disable cinder_api service (pre-upgrade not under httpd)
service: name=openstack-cinder-api state=stopped enabled=no
when: cinder_api_enabled|bool
- name: Stop and disable cinder_api service
service: name=httpd state=stopped enabled=no
when: cinder_api_apache|bool
when: is_bootstrap_node|bool
- when: step|int == 3
block:
- name: remove old cinder cron jobs
file:
path: /var/spool/cron/cinder
state: absent
- name: Set fact for removal of httpd package
set_fact:
remove_httpd_package: {get_param: UpgradeRemoveUnusedPackages}

@ -189,25 +189,6 @@ outputs:
containers_to_rm:
- cinder_backup
upgrade_tasks:
- when: step|int == 0
tags: common
block:
- name: Check if cinder_backup is deployed
command: systemctl is-enabled openstack-cinder-backup
ignore_errors: True
register: cinder_backup_enabled_result
- name: Set fact cinder_backup_enabled
set_fact:
cinder_backup_enabled: "{{ cinder_backup_enabled_result.rc == 0 }}"
- name: "PreUpgrade step0,validation: Check service openstack-cinder-backup is running"
shell: systemctl is-active --quiet openstack-cinder-backup
when: cinder_backup_enabled|bool
tags: validation
- when: step|int == 2
block:
- name: Stop and disable cinder_backup service
when: cinder_backup_enabled|bool
service: name=openstack-cinder-backup state=stopped enabled=no
- when: step|int == 3
block:
- name: Set fact for removal of openstack-cinder package

@ -149,25 +149,6 @@ outputs:
/var/log/containers/cinder and /var/log/containers/httpd/cinder-api.
ignore_errors: true
upgrade_tasks:
- when: step|int == 0
tags: common
block:
- name: Check if cinder_scheduler is deployed
command: systemctl is-enabled openstack-cinder-scheduler
ignore_errors: True
register: cinder_scheduler_enabled_result
- name: Set fact cinder_scheduler_enabled
set_fact:
cinder_scheduler_enabled: "{{ cinder_scheduler_enabled_result.rc == 0 }}"
- name: "PreUpgrade step0,validation: Check service openstack-cinder-scheduler is running"
shell: systemctl is-active --quiet openstack-cinder-scheduler
when: cinder_scheduler_enabled|bool
tags: validation
- when: step|int == 2
block:
- name: Stop and disable cinder_scheduler service
when: cinder_scheduler_enabled|bool
service: name=openstack-cinder-scheduler state=stopped enabled=no
- when: step|int == 3
block:
- name: Set fact for removal of openstack-cinder package

@ -170,25 +170,6 @@ outputs:
environment: {get_attr: [CinderCommon, cinder_volume_environment]}
host_prep_tasks: {get_attr: [CinderCommon, cinder_volume_host_prep_tasks]}
upgrade_tasks:
- when: step|int == 0
tags: common
block:
- name: Check if cinder_volume is deployed
command: systemctl is-enabled openstack-cinder-volume
ignore_errors: True
register: cinder_volume_enabled_result
- name: Set fact cinder_volume_enabled
set_fact:
cinder_volume_enabled: "{{ cinder_volume_enabled_result.rc == 0 }}"
- name: "PreUpgrade step0,validation: Check service openstack-cinder-volume is running"
shell: systemctl is-active --quiet openstack-cinder-volume
when: cinder_volume_enabled|bool
tags: validation
- when: step|int == 2
block:
- name: Stop and disable cinder_volume service
when: cinder_volume_enabled|bool
service: name=openstack-cinder-volume state=stopped enabled=no
- when: step|int == 3
block:
- name: Set fact for removal of openstack-cinder package

@ -154,25 +154,6 @@ outputs:
containers_to_rm:
- congress_api
upgrade_tasks:
- when: step|int == 0
tags: common
block:
- name: Check if congress is deployed
command: systemctl is-enabled --quiet openstack-congress-server
ignore_errors: True
register: congress_enabled_result
- name: Set fact congress_enabled
set_fact:
congress_enabled: "{{ congress_enabled_result.rc == 0 }}"
- name: "PreUpgrade step0,validation: Check service openstack-congress-server is running"
command: systemctl is-active --quiet openstack-congress-server
when: congress_enabled|bool
tags: validation
- when: step|int == 2
block:
- name: Stop and disable congress_api service
when: congress_enabled|bool
service: name=openstack-congress-server state=stopped enabled=no
- when: step|int == 3
block:
- name: Set fact for removal of openstack-congress package

@ -163,26 +163,7 @@ outputs:
ignore_errors: true
metadata_settings:
get_attr: [MongodbPuppetBase, role_data, metadata_settings]
upgrade_tasks:
- when: step|int == 0
tags: common
block:
- name: Check for mongodb service
command: systemctl is-enabled --quiet mongod
ignore_errors: True
register: mongod_enabled_result
- name: Set fact mongod_enabled
set_fact:
mongod_enabled: "{{ mongod_enabled_result.rc == 0 }}"
- name: "PreUpgrade step0,validation: Check if mongod is running"
command: systemctl is-active --quiet mongod
when: mongod_enabled|bool
tags: validation
- when: step|int == 2
block:
- name: Stop and disable mongodb service
when: mongod_enabled|bool
service: name=mongod state=stopped enabled=no
upgrade_tasks: []
fast_forward_upgrade_tasks:
- when:
- step|int == 0

@ -48,10 +48,6 @@ 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
MySQLServerOptions:
type: json
default: {}
@ -244,50 +240,7 @@ outputs:
Log files from mysql containers can be found under
/var/log/containers/mysql.
ignore_errors: true
upgrade_tasks:
- when: step|int == 0
tags: common
block:
- name: Check if mysql service is deployed
command: systemctl is-enabled --quiet mariadb
ignore_errors: True
register: mariadb_enabled_result
- name: Set fact mariadb_enabled
set_fact:
mariadb_enabled: "{{ mariadb_enabled_result.rc == 0 }}"
- name: "PreUpgrade step0,validation: Check if mysql service is running"
command: systemctl is-active --quiet mariadb
when: mariadb_enabled|bool
tags: validation
- when: step|int == 2
block:
# https://bugs.launchpad.net/tripleo/+bug/1753247
- name: Rename old neutron database to ovs_neutron
shell: >
if [ -d /var/lib/mysql/neutron ] ; then
mysql -e "CREATE DATABASE IF NOT EXISTS \`ovs_neutron\`;"
for table in `mysql -B -N -e "SHOW TABLES;" neutron`
do
mysql -e "RENAME TABLE \`neutron\`.\`$table\` to \`ovs_neutron\`.\`$table\`"
done
mysql -e "DROP DATABASE \`neutron\`;"
fi
become: true
when:
- {get_param: UndercloudUpgrade}
- mariadb_enabled|bool
# https://bugs.launchpad.net/tripleo/+bug/1776570
- name: Manage mysql user for healthcheck and revoke grant
shell: |
mysql -e "CREATE USER IF NOT EXISTS \`mysql\`@\`localhost\`;"
mysql -e "REVOKE ALL PRIVILEGES, GRANT OPTION FROM \`mysql\`@\`localhost\`;"
become: true
when:
- {get_param: UndercloudUpgrade}
- mariadb_enabled|bool
- name: Stop and disable mysql service
when: mariadb_enabled|bool
service: name=mariadb state=stopped enabled=no
upgrade_tasks: []
post_upgrade_tasks:
- when: step|int == 1
import_role:

@ -165,26 +165,7 @@ outputs:
Log files from redis containers can be found under
/var/log/containers/redis.
ignore_errors: true
upgrade_tasks:
- when: step|int == 0
tags: common
block:
- name: Check if redis is deployed
command: systemctl is-enabled --quiet redis
ignore_errors: True
register: redis_enabled_result
- name: Set fact redis_enabled
set_fact:
redis_enabled: "{{ redis_enabled_result.rc == 0 }}"
- name: "PreUpgrade step0,validation: Check if redis is running"
command: systemctl is-active --quiet redis
when: redis_enabled|bool
tags: validation
- when: step|int == 2
block:
- name: Stop and disable redis service
when: redis_enabled|bool
service: name=redis state=stopped enabled=no
upgrade_tasks: []
post_upgrade_tasks:
- when: step|int == 1
import_role:

@ -215,40 +215,7 @@ outputs:
- ec2api
- ec2api-metadata
ignore_errors: true
upgrade_tasks:
- when: step|int == 0
tags: common
block:
- name: Check if EC2-API is deployed
command: systemctl is-enabled --quiet openstack-ec2-api
ignore_errors: True
register: ec2_api_enabled_result
- name: Set fact ec2_api_enabled
set_fact:
ec2_api_enabled: "{{ ec2_api_enabled_result.rc == 0 }}"
- name: Check if EC2-API-METADATA are deployed
command: systemctl is-enabled --quiet openstack-ec2-api-metadata
ignore_errors: True
register: ec2_api_metadata_enabled_result
- name: Set fact ec2_api_metadata_enabled
set_fact:
ec2_api_metadata_enabled: "{{ ec2_api_metadata_enabled_result.rc == 0 }}"
- name: "PreUpgrade step0,validation: Check if openstack-ec2-api is running"
command: systemctl is-active --quiet openstack-ec2-api
when: ec2_api_enabled|bool
tags: validation
- name: "PreUpgrade step0,validation: Check if openstack-ec2-metadata-api is running"
command: systemctl is-active --quiet openstack-ec2-api-metadata
when: ec2_api_metadata_enabled|bool
tags: validation
- when: step|int == 2
block:
- name: Stop and disable EC2-API service
when: ec2_api_enabled|bool
service: name=openstack-ec2-api state=stopped enabled=no
- name: Stop and disable EC2-API-METADATA service
when: ec2_api_metadata_enabled|bool
service: name=openstack-ec2-api-metadata state=stopped enabled=no
upgrade_tasks: []
post_upgrade_tasks:
- when: step|int == 1
import_role:

@ -114,26 +114,7 @@ outputs:
file:
path: /var/lib/etcd
state: directory
upgrade_tasks:
- when: step|int == 0
tags: common
block:
- name: Check if etcd is deployed
command: systemctl is-enabled --quiet etcd
ignore_errors: True
register: etcd_enabled_result
- name: Set fact etcd_enabled
set_fact:
etcd_enabled: "{{ etcd_enabled_result.rc == 0 }}"
- name: "PreUpgrade step0,validation: Check if etcd is running"
command: systemctl is-active --quiet etcd
when: etcd_enabled|bool
tags: validation
- when: step|int == 2
block:
- name: Stop and disable etcd service
when: etcd_enabled|bool
service: name=etcd state=stopped enabled=no
upgrade_tasks: []
post_upgrade_tasks:
- when: step|int == 1
import_role:

@ -124,22 +124,7 @@ outputs:
path: /var/cache/containers/fluentd
state: directory
setype: svirt_sandbox_file_t
upgrade_tasks:
- when: step|int == 0
tags: common
block:
- name: Check if fluent.service is deployed
command: systemctl is-enabled --quiet fluentd.service
ignore_errors: True
register: fluentd_enabled_result
- name: Set fact fluentd_enabled
set_fact:
fluentd_enabled: "{{ fluentd_enabled_result.rc == 0 }}"
- when: step|int == 2
block:
- name: Stop and disable fluentd service
service: name=fluentd.service state=stopped enabled=no
when: fluentd_enabled|bool
upgrade_tasks: []
post_upgrade_tasks:
- when: step|int == 1
import_role:

@ -235,25 +235,6 @@ outputs:
state: directory
setype: svirt_sandbox_file_t
upgrade_tasks:
- when: step|int == 0
tags: common
block:
- name: Check if glance_api is deployed
command: systemctl is-enabled --quiet openstack-glance-api
ignore_errors: True
register: glance_api_enabled_result
- name: Set fact glance_api_enabled
set_fact:
glance_api_enabled: "{{ glance_api_enabled_result.rc == 0 }}"
- name: "PreUpgrade step0,validation: Check service openstack-glance-api is running"
command: systemctl is-active --quiet openstack-glance-api
tags: validation
when: glance_api_enabled|bool
- when: step|int == 2
block:
- name: Stop and disable glance_api service
when: glance_api_enabled|bool
service: name=openstack-glance-api state=stopped enabled=no
- when: step|int == 3
block:
- name: Set fact for removal of openstack-glance package

@ -246,55 +246,7 @@ outputs:
file:
path: /etc/ceph
state: directory
upgrade_tasks:
- when: step|int == 0
tags: common
block:
- name: Check if gnocchi_api is deployed
command: systemctl is-enabled --quiet openstack-gnocchi-api
ignore_errors: True
register: gnocchi_api_enabled_result
- name: Set fact gnocchi_api_enabled
set_fact:
gnocchi_api_enabled: "{{ gnocchi_api_enabled_result.rc == 0 }}"
- name: "PreUpgrade step0,validation: Check service openstack-gnocchi-api is running"
command: systemctl is-active --quiet openstack-gnocchi-api
when:
- gnocchi_api_enabled|bool
tags: validation
- name: Check if httpd service is running
command: systemctl is-active --quiet httpd
ignore_errors: True
register: httpd_running_result
when: httpd_running is undefined
- name: Set fact httpd_running
set_fact:
httpd_running: "{{ httpd_running_result.rc == 0 }}"
when: httpd_running is undefined
- name: Check for gnocchi_api running under apache
shell: "httpd -t -D DUMP_VHOSTS | grep -q gnocchi"
ignore_errors: True
register: gnocchi_httpd_enabled_result
- name: set fact gnocchi_httpd_enabled
set_fact:
gnocchi_httpd_enabled: "{{ gnocchi_httpd_enabled_result.rc == 0 }}"
- name: "PreUpgrade step0,validation: Check if gnocchi_api_wsgi is running"
shell: systemctl status 'httpd' | grep -q gnocchi
tags: validation
when:
- gnocchi_httpd_enabled|bool
- httpd_running|bool
- when: step|int == 2
block:
- name: Stop and disable gnocchi_api service
service: name=openstack-gnocchi-api state=stopped enabled=no
when:
- gnocchi_api_enabled|bool
- name: Stop and disable httpd service
when:
- gnocchi_httpd_enabled|bool
- httpd_running|bool
service: name=httpd state=stopped enabled=no
upgrade_tasks: []
metadata_settings:
get_attr: [GnocchiApiPuppetBase, role_data, metadata_settings]
post_upgrade_tasks:

@ -158,26 +158,7 @@ outputs:
file:
path: /etc/ceph
state: directory
upgrade_tasks:
- when: step|int == 0
tags: common
block:
- name: Check if gnocchi_metricd is deployed
command: systemctl is-enabled --quiet openstack-gnocchi-metricd
ignore_errors: True
register: gnocchi_metricd_enabled_result
- name: Set fact gnocchi_metricd_enabled
set_fact:
gnocchi_metricd_enabled: "{{ gnocchi_metricd_enabled_result.rc == 0 }}"
- name: "PreUpgrade step0,validation: Check service openstack-gnocchi-metricd is running"
command: systemctl is-active --quiet openstack-gnocchi-metricd
when: gnocchi_metricd_enabled|bool
tags: validation
- when: step|int == 2
block:
- name: Stop and disable openstack-gnocchi-metricd service
when: gnocchi_metricd_enabled|bool
service: name=openstack-gnocchi-metricd.service state=stopped enabled=no
upgrade_tasks: []
post_upgrade_tasks:
- when: step|int == 1
import_role:

@ -158,26 +158,7 @@ outputs:
file:
path: /etc/ceph
state: directory
upgrade_tasks:
- when: step|int == 0
tags: common
block:
- name: Check if gnocchi_statsd is deployed
command: systemctl is-enabled --quiet openstack-gnocchi-statsd
ignore_errors: True
register: gnocchi_statsd_enabled_result
- name: Set fact gnocchi_statsd_enabled
set_fact:
gnocchi_statsd_enabled: "{{ gnocchi_statsd_enabled_result.rc == 0 }}"
- name: "PreUpgrade step0,validation: Check service openstack-gnocchi-statsd is running"
command: systemctl is-active --quiet openstack-gnocchi-statsd
when: gnocchi_statsd_enabled|bool
tags: validation
- when: step|int == 2
block:
- name: Stop and disable openstack-gnocchi-statsd service
when: gnocchi_statsd_enabled|bool
service: name=openstack-gnocchi-statsd.service state=stopped enabled=no
upgrade_tasks: []
post_upgrade_tasks:
- when: step|int == 1
import_role:

@ -261,25 +261,6 @@ outputs:
environment:
- KOLLA_CONFIG_STRATEGY=COPY_ALWAYS
upgrade_tasks:
- when: step|int == 0
tags: common
block:
- name: Check if HAproxy is deployed
command: systemctl is-enabled --quiet haproxy
ignore_errors: True
register: haproxy_enabled_result
- name: Set fact haproxy_enabled
set_fact:
haproxy_enabled: "{{ haproxy_enabled_result.rc == 0 }}"
- name: "PreUpgrade step0,validation: Check service HAproxy is running"
command: systemctl is-active --quiet haproxy
tags: validation
when: haproxy_enabled|bool
- when: step|int == 2
block:
- name: Stop and disable haproxy service
when: haproxy_enabled|bool
service: name=haproxy state=stopped enabled=no
- when: step|int == 3
block:
- name: Set fact for removal of HAproxy package

@ -139,52 +139,7 @@ outputs:
environment:
- KOLLA_CONFIG_STRATEGY=COPY_ALWAYS
host_prep_tasks: {get_attr: [HeatApiCfnLogging, host_prep_tasks]}
upgrade_tasks:
- when: step|int == 0
tags: common
block:
- name: Check if heat_api_cfn is deployed
command: systemctl is-enabled --quiet openstack-heat-api-cfn
ignore_errors: True
register: heat_api_cfn_enabled_result
- set_fact:
heat_api_cfn_enabled: heat_api_cfn_enabled_result|bool
- name: Check for heat_api_cfn running under apache
shell: "httpd -t -D DUMP_VHOSTS | grep -q heat_api_cfn"
ignore_errors: True
register: heat_api_cfn_httpd_enabled_result
- set_fact:
heat_api_cfn_httpd_enabled: "{{ heat_api_cfn_httpd_enabled_result.rc == 0 }}"
- name: "PreUpgrade step0,validation: Check service openstack-heat-api-cfn is running"
command: systemctl is-active --quiet openstack-heat-api-cfn
when:
- heat_api_cfn_enabled|bool
tags: validation
- name: Check if httpd service is running
command: systemctl is-active --quiet httpd
ignore_errors: True
register: httpd_running_result
when: httpd_running is undefined
- set_fact:
httpd_running: "{{ httpd_running_result.rc == 0 }}"
when: httpd_running is undefined
- name: "PreUpgrade step0,validation: Check if heat_api_cfn_wsgi is running"
tags: validation
shell: systemctl status 'httpd' | grep -q heat_api_cfn
when:
- heat_api_cfn_httpd_enabled|bool
- httpd_running|bool
- when: step|int == 2
block:
- name: Stop and disable heat_api_cfn service (pre-upgrade not under httpd)
service: name=openstack-heat-api-cfn state=stopped enabled=no
when:
- heat_api_cfn_enabled|bool
- name: Stop heat_api_cfn service (running under httpd)
service: name=httpd state=stopped enabled=no
when:
- heat_api_cfn_httpd_enabled|bool
- httpd_running|bool
upgrade_tasks: []
metadata_settings:
get_attr: [HeatBase, role_data, metadata_settings]
post_upgrade_tasks:

@ -177,56 +177,7 @@ outputs:
environment:
- KOLLA_CONFIG_STRATEGY=COPY_ALWAYS
host_prep_tasks: {get_attr: [HeatApiLogging, host_prep_tasks]}
upgrade_tasks:
- when: step|int == 0
tags: common
block:
- name: Check if heat_api is deployed
command: systemctl is-enabled --quiet openstack-heat-api
ignore_errors: True
register: heat_api_enabled_result
- set_fact:
heat_api_enabled: "{{ heat_api_enabled_result.rc == 0 }}"
- name: Check for heat_api running under apache
shell: "httpd -t -D DUMP_VHOSTS | grep -q heat_api_wsgi"
ignore_errors: True
register: heat_api_httpd_enabled_result
- set_fact:
heat_api_httpd_enabled: "{{ heat_api_httpd_enabled_result.rc == 0 }}"
- name: "PreUpgrade step0,validation: Check service openstack-heat-api is running"
command: systemctl is-active --quiet openstack-heat-api
when:
- heat_api_enabled|bool
tags: validation
- name: Check if httpd is running
command: systemctl is-active --quiet httpd
ignore_errors: True
register: httpd_running_result
when: httpd_running is undefined
- set_fact:
httpd_running: "{{ httpd_running_result.rc == 0 }}"
when: httpd_running is undefined
- name: "PreUpgrade step0,validation: Check if heat_api_wsgi is running"
shell: systemctl status 'httpd' | grep -q heat_api_wsgi
tags: validation
when:
- heat_api_httpd_enabled|bool
- httpd_running|bool
- when: step|int == 2
block:
- name: Stop and disable heat_api service (pre-upgrade not under httpd)
service: name=openstack-heat-api state=stopped enabled=no
when:
- heat_api_enabled|bool
- name: Stop heat_api service (running under httpd)
service: name=httpd state=stopped
when:
- heat_api_httpd_enabled|bool
- httpd_running|bool
- name: remove old heat cron jobs
file:
path: /var/spool/cron/heat
state: absent
upgrade_tasks: []
metadata_settings:
get_attr: [HeatBase, role_data, metadata_settings]
post_upgrade_tasks:

@ -162,26 +162,7 @@ outputs:
-
- KOLLA_CONFIG_STRATEGY=COPY_ALWAYS
host_prep_tasks: {get_attr: [HeatEngineLogging, host_prep_tasks]}
upgrade_tasks:
- when: step|int == 0
tags: common
block:
- name: Check if heat_engine is deployed
command: systemctl is-enabled --quiet openstack-heat-engine
ignore_errors: True
register: heat_engine_enabled_result
- name: Set fact heat_engine_enabled
set_fact:
heat_engine_enabled: "{{ heat_engine_enabled_result.rc == 0 }}"
- name: "PreUpgrade step0,validation: Check service openstack-heat-engine is running"
command: systemctl is-active --quiet openstack-heat-engine
when: heat_engine_enabled|bool
tags: validation
- when: step|int == 2
block:
- name: Stop and disable heat_engine service
when: heat_engine_enabled|bool
service: name=openstack-heat-engine state=stopped enabled=no
upgrade_tasks: []
post_upgrade_tasks:
- when: step|int == 1
import_role:

@ -159,40 +159,6 @@ outputs:
block:
- name: set is_bootstrap_node fact
set_fact: is_bootstrap_node={{ironic_api_short_bootstrap_node_name|lower == ansible_hostname|lower}}
- name: Check if ironic_api is deployed
command: systemctl is-enabled --quiet openstack-ironic-api
ignore_errors: True
register: ironic_api_enabled_result
- name: Set fact ironic_api_enabled
set_fact:
ironic_api_enabled: "{{ ironic_api_enabled_result.rc == 0 }}"
- name: Check for ironic_api running under apache
shell: "httpd -t -D DUMP_VHOSTS | grep -q ironic"
ignore_errors: True
register: ironic_httpd_enabled_result
- name: Set fact ironic_httpd_enabled
set_fact:
ironic_httpd_enabled: "{{ ironic_httpd_enabled_result.rc == 0 }}"
- name: "PreUpgrade step0,validation: Check service openstack-ironic-api is running"
command: systemctl is-active --quiet openstack-ironic-api
when:
- ironic_api_enabled|bool
tags: validation
- name: Check if httpd service is running
command: systemctl is-active --quiet httpd
ignore_errors: True
register: httpd_running_result
when: httpd_running is undefined
- name: Set fact httpd_running
set_fact:
httpd_running: "{{ httpd_running_result.rc == 0 }}"
when: httpd_running is undefined
- name: "PreUpgrade step0,validation: Check if ironic_api_wsgi is running"
shell: systemctl status 'httpd' | grep -q ironic
tags: validation
when:
- ironic_httpd_enabled|bool
- httpd_running|bool
- name: Ensure all online data migrations for Ironic have been applied
shell: |
if {{ container_cli }} ps | grep ironic_api; then
@ -203,21 +169,7 @@ outputs:
docker exec ironic_api ironic-dbsync --config-file /etc/ironic/ironic.conf online_data_migrations
fi
tags: pre-upgrade
when:
- is_bootstrap_node|bool
- not (ironic_httpd_enabled|bool and httpd_running|bool)
- not ironic_api_enabled|bool
- when: step|int == 2
block:
- name: Stop and disable ironic_api service
when:
- ironic_api_enabled|bool
service: name=openstack-ironic-api state=stopped enabled=no
- name: Stop ironic_api service (running under httpd)
when:
- ironic_httpd_enabled|bool
- httpd_running|bool
service: name=httpd state=stopped enabled=no
when: is_bootstrap_node|bool
- when: step|int == 3
block:
- name: Set fact for removal of openstack-ironic-api package

@ -244,25 +244,6 @@ outputs:
- httpboot
- tftpboot
upgrade_tasks:
- when: step|int == 0
tags: common
block:
- name: Check if ironic_conductor is deployed
command: systemctl is-enabled --quiet openstack-ironic-conductor
ignore_errors: True
register: ironic_conductor_enabled_result
- name: Set fact ironic_conductor_enabled
set_fact:
ironic_conductor_enabled: "{{ ironic_conductor_enabled_result.rc == 0 }}"
- name: "PreUpgrade step0,validation: Check service openstack-ironic-conductor is running"
command: systemctl is-active --quiet openstack-ironic-conductor
tags: validation
when: ironic_conductor_enabled|bool
- when: step|int == 2
block:
- name: Stop and disable ironic_conductor service
when: ironic_conductor_enabled|bool
service: name=openstack-ironic-conductor state=stopped enabled=no
- when: step|int == 3
block:
- name: Set fact for removal of openstack-ironic-conductor package

@ -238,28 +238,6 @@ outputs:
state: directory
setype: svirt_sandbox_file_t
upgrade_tasks:
- when: step|int == 0
tags: common
block:
- name: Check if ironic_inspector is deployed
command: systemctl is-enabled --quiet openstack-ironic-inspector
ignore_errors: True
register: ironic_inspector_enabled_result
- name: Set fact ironic_inspector_enabled
set_fact:
ironic_inspector_enabled: "{{ ironic_inspector_enabled_result.rc == 0 }}"
- name: "PreUpgrade step0,validation: Check service openstack-ironic-inspector is running"
command: systemctl is-active --quiet openstack-ironic-inspector
tags: validation
when: ironic_inspector_enabled|bool
- when: step|int == 2
block:
- name: Stop and disable ironic_inspector service
service: name=openstack-ironic-inspector state=stopped enabled=no
when: ironic_inspector_enabled|bool
- name: Stop and disable ironic_inspector dnsmasq service
service: name=openstack-ironic-inspector-dnsmasq state=stopped enabled=no
when: ironic_inspector_enabled|bool
- when: step|int == 3
block:
- name: Set fact for removal of openstack-ironic-inspector package

@ -103,26 +103,7 @@ outputs:
environment:
- KOLLA_CONFIG_STRATEGY=COPY_ALWAYS
host_prep_tasks: {get_attr: [NeutronLogging, host_prep_tasks]}
upgrade_tasks:
- when: step|int == 0
tags: common
block:
- name: Check if ironic-neutron-agent is deployed
command: systemctl is-enabled --quiet ironic-neutron-agent
ignore_errors: True
register: ironic_neutron_agent_enabled_result
- name: Set fact ironic_neutron_agent_enabled
set_fact:
ironic_neutron_agent_enabled: "{{ ironic_neutron_agent_enabled_result.rc == 0 }}"
- name: "PreUpgrade step0,validation: Check service ironic-neutron-agent is running"
command: systemctl is-active --quiet ironic-neutron-agent
when: ironic_neutron_agent_enabled|bool
tags: validation
- when: step|int == 2
block:
- name: Stop and disable ironic-neutron-agent service
when: ironic_neutron_agent_enabled|bool
service: name=ironic-neutron-agent state=stopped enabled=no
upgrade_tasks: []
post_upgrade_tasks:
- when: step|int == 1
import_role:

@ -114,40 +114,7 @@ outputs:
- name: Stop and disable iscsid.socket service
service: name=iscsid.socket state=stopped enabled=no
when: stat_iscsid_socket.stat.exists
upgrade_tasks:
- when: step|int == 0
tags: common
block:
- name: Check if iscsid service is deployed
ignore_errors: True
command: systemctl is-enabled --quiet iscsid
register: iscsid_enabled_result
- name: Set fact iscsid_enabled
set_fact:
iscsid_enabled: "{{ iscsid_enabled_result.rc == 0 }}"
- name: "PreUpgrade step0,validation: Check if iscsid is running"
command: systemctl is-active --quiet iscsid
when: iscsid_enabled|bool
tags: validation
- name: Check if iscsid.socket service is deployed
command: systemctl is-enabled --quiet iscsid.socket
ignore_errors: True
register: iscsid_socket_enabled_result
- name: Set fact iscsid_socket_enabled
set_fact:
iscsid_socket_enabled: "{{ iscsid_socket_enabled_result.rc == 0 }}"
- name: "PreUpgrade step0,validation: Check if iscsid.socket is running"
command: systemctl is-active --quiet iscsid.socket
when: iscsid_socket_enabled|bool
tags: validation
- when: step|int == 2
block:
- name: Stop and disable iscsid service
when: iscsid_enabled|bool
service: name=iscsid state=stopped enabled=no
- name: Stop and disable iscsid.socket service
when: iscsid_socket_enabled|bool
service: name=iscsid.socket state=stopped enabled=no
upgrade_tasks: []
post_upgrade_tasks:
- when: step|int == 1
import_role:

@ -123,25 +123,6 @@ outputs:
/var/log/containers/keepalived.
ignore_errors: true
upgrade_tasks:
- when: step|int == 0
tags: common
block:
- name: Check if keepalived is deployed
command: systemctl is-enabled --quiet keepalived
ignore_errors: True
register: keepalived_enabled_result
- name: Set fact keepalived_enabled
set_fact:
keepalived_enabled: "{{ keepalived_enabled_result.rc == 0 }}"
- name: "PreUpgrade step0,validation: Check service keepalived is running"
command: systemctl is-active --quiet keepalived
when: keepalived_enabled|bool
tags: validation