Browse Source

Convert tags to when statements for Q major upgrade workflow

This converts "tags: stepN" to "when: step|int == N" for the direct
execution as an ansible playbook, with a loop variable 'step'.
The tasks all include the explicit cast |int.

This also adds a set_fact task for handling of the package removal
with the UpgradeRemovePackages parameter (no change to the interface)

The yaml-validate also now checks for duplicate 'when:' statements

Q upgrade spec @ Ibde21e6efae3a7d311bee526d63c5692c4e27b28
Related Blueprint: major-upgrade-workflow
[0]: 394a92f761/tripleo_common/utils/config.py (L141)
Change-Id: I6adc5619a28099f4e241351b63377f1e96933810
changes/02/510902/26
marios 4 years ago
parent
commit
dec003def8
  1. 14
      docker/services/aodh-api.yaml
  2. 14
      docker/services/aodh-evaluator.yaml
  3. 14
      docker/services/aodh-listener.yaml
  4. 16
      docker/services/aodh-notifier.yaml
  5. 13
      docker/services/barbican-api.yaml
  6. 14
      docker/services/ceilometer-agent-central.yaml
  7. 24
      docker/services/ceilometer-agent-compute.yaml
  8. 14
      docker/services/ceilometer-agent-ipmi.yaml
  9. 14
      docker/services/ceilometer-agent-notification.yaml
  10. 21
      docker/services/cinder-api.yaml
  11. 9
      docker/services/cinder-backup.yaml
  12. 14
      docker/services/cinder-scheduler.yaml
  13. 14
      docker/services/cinder-volume.yaml
  14. 14
      docker/services/collectd.yaml
  15. 14
      docker/services/congress.yaml
  16. 7
      docker/services/database/mongodb.yaml
  17. 7
      docker/services/database/mysql.yaml
  18. 7
      docker/services/database/redis.yaml
  19. 14
      docker/services/ec2-api.yaml
  20. 7
      docker/services/etcd.yaml
  21. 2
      docker/services/fluentd.yaml
  22. 14
      docker/services/glance-api.yaml
  23. 14
      docker/services/gnocchi-api.yaml
  24. 7
      docker/services/gnocchi-metricd.yaml
  25. 7
      docker/services/gnocchi-statsd.yaml
  26. 14
      docker/services/heat-api-cfn.yaml
  27. 16
      docker/services/heat-api.yaml
  28. 7
      docker/services/heat-engine.yaml
  29. 7
      docker/services/horizon.yaml
  30. 14
      docker/services/ironic-api.yaml
  31. 7
      docker/services/ironic-conductor.yaml
  32. 12
      docker/services/ironic-inspector.yaml
  33. 14
      docker/services/iscsid.yaml
  34. 9
      docker/services/keystone.yaml
  35. 7
      docker/services/manila-api.yaml
  36. 7
      docker/services/manila-scheduler.yaml
  37. 7
      docker/services/manila-share.yaml
  38. 7
      docker/services/memcached.yaml
  39. 14
      docker/services/mistral-api.yaml
  40. 7
      docker/services/mistral-engine.yaml
  41. 7
      docker/services/mistral-event-engine.yaml
  42. 7
      docker/services/mistral-executor.yaml
  43. 7
      docker/services/multipathd.yaml
  44. 14
      docker/services/neutron-api.yaml
  45. 7
      docker/services/neutron-dhcp.yaml
  46. 7
      docker/services/neutron-l3.yaml
  47. 7
      docker/services/neutron-metadata.yaml
  48. 14
      docker/services/neutron-ovs-agent.yaml
  49. 7
      docker/services/neutron-sriov-agent.yaml
  50. 23
      docker/services/nova-api.yaml
  51. 16
      docker/services/nova-compute.yaml
  52. 16
      docker/services/nova-conductor.yaml
  53. 14
      docker/services/nova-consoleauth.yaml
  54. 7
      docker/services/nova-ironic.yaml
  55. 7
      docker/services/nova-libvirt.yaml
  56. 7
      docker/services/nova-metadata.yaml
  57. 14
      docker/services/nova-placement.yaml
  58. 14
      docker/services/nova-scheduler.yaml
  59. 14
      docker/services/nova-vnc-proxy.yaml
  60. 2
      docker/services/octavia-api.yaml
  61. 9
      docker/services/octavia-health-manager.yaml
  62. 2
      docker/services/octavia-housekeeping.yaml
  63. 2
      docker/services/octavia-worker.yaml
  64. 7
      docker/services/opendaylight-api.yaml
  65. 7
      docker/services/ovn-controller.yaml
  66. 7
      docker/services/ovn-dbs.yaml
  67. 48
      docker/services/pacemaker/cinder-backup.yaml
  68. 48
      docker/services/pacemaker/cinder-volume.yaml
  69. 55
      docker/services/pacemaker/database/mysql.yaml
  70. 50
      docker/services/pacemaker/database/redis.yaml
  71. 48
      docker/services/pacemaker/haproxy.yaml
  72. 10
      docker/services/pacemaker/manila-share.yaml
  73. 2
      docker/services/pacemaker/ovn-dbs.yaml
  74. 50
      docker/services/pacemaker/rabbitmq.yaml
  75. 7
      docker/services/rabbitmq.yaml
  76. 14
      docker/services/sahara-api.yaml
  77. 14
      docker/services/sahara-engine.yaml
  78. 7
      docker/services/sensu-client.yaml
  79. 14
      docker/services/swift-proxy.yaml
  80. 18
      docker/services/swift-storage.yaml
  81. 7
      docker/services/tacker.yaml
  82. 7
      docker/services/zaqar.yaml
  83. 4
      extraconfig/services/kubernetes-master.yaml
  84. 32
      puppet/services/README.rst
  85. 2
      puppet/services/aodh-api.yaml
  86. 7
      puppet/services/aodh-evaluator.yaml
  87. 7
      puppet/services/aodh-listener.yaml
  88. 7
      puppet/services/aodh-notifier.yaml
  89. 6
      puppet/services/apache.yaml
  90. 7
      puppet/services/auditd.yaml
  91. 7
      puppet/services/barbican-api.yaml
  92. 7
      puppet/services/ceilometer-agent-central.yaml
  93. 7
      puppet/services/ceilometer-agent-compute.yaml
  94. 10
      puppet/services/ceilometer-agent-ipmi.yaml
  95. 7
      puppet/services/ceilometer-agent-notification.yaml
  96. 61
      puppet/services/ceph-mon.yaml
  97. 117
      puppet/services/ceph-osd.yaml
  98. 7
      puppet/services/ceph-rgw.yaml
  99. 12
      puppet/services/cinder-api.yaml
  100. 7
      puppet/services/cinder-scheduler.yaml

14
docker/services/aodh-api.yaml

@ -179,16 +179,18 @@ outputs:
register: httpd_running
- name: "PreUpgrade step0,validation: Check if aodh api is running"
shell: systemctl status 'httpd' | grep -q aodh
tags: step0,validation
when: httpd_enabled.rc == 0 and httpd_running.rc == 0
tags: validation
when: (httpd_enabled.rc == 0) and (httpd_running.rc == 0) and (step|int == 0)
- name: Stop and disable aodh service (running under httpd)
tags: step2
when: httpd_enabled.rc == 0 and httpd_running.rc == 0
when: (httpd_enabled.rc == 0) and (httpd_running.rc == 0) and (step|int == 2)
service: name=httpd state=stopped enabled=no
- name: Set fact for removal of openstack-aodh-api package
when: step|int == 2
set_fact:
remove_aodh_api_package: {get_param: UpgradeRemoveUnusedPackages}
- name: Remove openstack-aodh-api package if operator requests it
yum: name=openstack-aodh-api state=removed
tags: step2
ignore_errors: True
when: {get_param: UpgradeRemoveUnusedPackages}
when: (remove_aodh_api_package|bool) and (step|int == 2)
metadata_settings:
get_attr: [AodhApiPuppetBase, role_data, metadata_settings]

14
docker/services/aodh-evaluator.yaml

@ -130,14 +130,16 @@ outputs:
register: aodh_evaluator_enabled
- name: "PreUpgrade step0,validation: Check service openstack-aodh-evaluator is running"
command: systemctl is-active --quiet openstack-aodh-evaluator
when: aodh_evaluator_enabled.rc == 0
tags: step0,validation
when: (aodh_evaluator_enabled.rc == 0) and (step|int == 0)
tags: validation
- name: Stop and disable openstack-aodh-evaluator service
tags: step2
when: aodh_evaluator_enabled.rc == 0
when: (aodh_evaluator_enabled.rc == 0) and (step|int == 2)
service: name=openstack-aodh-evaluator.service state=stopped enabled=no
- name: Set fact for removal of openstack-aodh-evaluator package
when: step|int == 2
set_fact:
remove_aodh_evaluator_package: {get_param: UpgradeRemoveUnusedPackages}
- name: Remove openstack-aodh-evaluator package if operator requests it
yum: name=openstack-aodh-evaluator state=removed
tags: step2
ignore_errors: True
when: {get_param: UpgradeRemoveUnusedPackages}
when: (remove_aodh_evaluator_package|bool) and (step|int == 2)

14
docker/services/aodh-listener.yaml

@ -130,14 +130,16 @@ outputs:
register: aodh_listener_enabled
- name: "PreUpgrade step0,validation: Check service openstack-aodh-listener is running"
command: systemctl is-active --quiet openstack-aodh-listener
when: aodh_listener_enabled.rc == 0
tags: step0,validation
when: (aodh_listener_enabled.rc == 0) and (step|int == 0)
tags: validation
- name: Stop and disable openstack-aodh-listener service
tags: step2
when: aodh_listener_enabled.rc == 0
when: (aodh_listener_enabled.rc == 0) and (step|int == 2)
service: name=openstack-aodh-listener.service state=stopped enabled=no
- name: Set fact for removal of openstack-aodh-listener package
when: step|int == 2
set_fact:
remove_aodh_listener_package: {get_param: UpgradeRemoveUnusedPackages}
- name: Remove openstack-aodh-listener package if operator requests it
yum: name=openstack-aodh-listener state=removed
tags: step2
ignore_errors: True
when: {get_param: UpgradeRemoveUnusedPackages}
when: (remove_aodh_listener_package|bool) and (step|int == 2)

16
docker/services/aodh-notifier.yaml

@ -130,14 +130,16 @@ outputs:
register: aodh_notifier_enabled
- name: "PreUpgrade step0,validation: Check service openstack-aodh-notifier is running"
command: systemctl is-active --quiet openstack-aodh-notifier
when: aodh_notifier_enabled.rc == 0
tags: step0,validation
when: (aodh_notifier_enabled.rc == 0) and (step|int == 0)
tags: validation
- name: Stop and disable openstack-aodh-notifier service
tags: step2
when: aodh_notifier_enabled.rc == 0
service: name=openstack-aodh-notifier state=stopped enabled=no
when: (aodh_notifier_enabled.rc == 0) and (step|int == 2)
service: name=openstack-aodh-notifier.service state=stopped enabled=no
- name: Set fact for removal of openstack-aodh-notifier package
when: step|int == 2
set_fact:
remove_aodh_notifier_package: {get_param: UpgradeRemoveUnusedPackages}
- name: Remove openstack-aodh-notifier package if operator requests it
yum: name=openstack-aodh-notifier state=removed
tags: step2
ignore_errors: True
when: {get_param: UpgradeRemoveUnusedPackages}
when: (remove_aodh_notifier_package|bool) and (step|int == 2)

13
docker/services/barbican-api.yaml

@ -214,16 +214,17 @@ outputs:
register: barbican_enabled
- name: "PreUpgrade step0,validation: Check service barbican-api is running"
command: systemctl is-active --quiet openstack-barbican-api
when: barbican_enabled.rc == 0
tags: step0,validation
when: (barbican_enabled.rc == 0) and (step|int == 0)
- name: Stop and disable barbican_api service
tags: step2
when: barbican_enabled.rc == 0
when: (barbican_enabled.rc == 0) and (step|int == 2)
service: name=openstack-barbican-api state=stopped enabled=no
- name: Set fact for removal of openstack-barbican-api package
when: step|int == 2
set_fact:
remove_barbican_api_package: {get_param: UpgradeRemoveUnusedPackages}
- name: Remove openstack-barbican-api package if operator requests it
yum: name=openstack-barbican-api state=removed
tags: step2
ignore_errors: True
when: {get_param: UpgradeRemoveUnusedPackages}
when: (remove_barbican_api_package|bool) and (step|int == 2)
metadata_settings:
get_attr: [BarbicanApiBase, role_data, metadata_settings]

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

@ -143,14 +143,16 @@ outputs:
register: ceilometer_agent_central_enabled
- name: "PreUpgrade step0,validation: Check service openstack-ceilometer-central is running"
command: systemctl is-active --quiet openstack-ceilometer-central
when: ceilometer_agent_central_enabled.rc == 0
tags: step0,validation
when: (ceilometer_agent_central_enabled.rc == 0) and (step|int == 0)
tags: validation
- name: Stop and disable ceilometer agent central service
tags: step2
service: name=openstack-ceilometer-central state=stopped enabled=no
when: ceilometer_agent_central_enabled.rc == 0
when: (ceilometer_agent_central_enabled.rc == 0) and (step|int == 2)
- name: Set fact for removal of openstack-ceilometer-central package
when: step|int == 2
set_fact:
remove_ceilometer_central_package: {get_param: UpgradeRemoveUnusedPackages}
- name: Remove openstack-ceilometer-central package if operator requests it
yum: name=openstack-ceilometer-central state=removed
tags: step2
ignore_errors: True
when: {get_param: UpgradeRemoveUnusedPackages}
when: (remove_ceilometer_central_package|bool) and (step|int == 2)

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

@ -122,27 +122,27 @@ outputs:
register: openstack_ceilometer_polling_enabled
- name: "PreUpgrade step0,validation: Check service openstack-ceilometer-compute is running"
command: systemctl is-active --quiet openstack-ceilometer-compute
when: openstack_ceilometer_compute_enabled.rc == 0
tags: step0,validation
when: (openstack_ceilometer_compute_enabled.rc == 0) and (step|int == 0)
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.rc == 0
tags: step0,validation
when: (openstack_ceilometer_polling_enabled.rc == 0) and (step|int == 0)
tags: validation
- name: Stop and disable ceilometer compute agent
tags: step2
service: name=openstack-ceilometer-compute state=stopped enabled=no
when: openstack_ceilometer_compute_enabled.rc|default('') == 0
when: (openstack_ceilometer_compute_enabled.rc|default('') == 0) and (step|int == 2)
- name: Stop and disable ceilometer polling agent
tags: step2
service: name=openstack-ceilometer-polling state=stopped enabled=no
when: openstack_ceilometer_polling_enabled.rc|default('') == 0
when: (openstack_ceilometer_polling_enabled.rc|default('') == 0) and (step|int == 2)
- name: Set fact for removal of openstack-ceilometer-compute and polling package
when: step|int == 2
set_fact:
remove_ceilometer_compute_polling_package: {get_param: UpgradeRemoveUnusedPackages}
- name: Remove openstack-ceilometer-compute package if operator requests it
yum: name=openstack-ceilometer-compute state=removed
tags: step2
ignore_errors: True
when: {get_param: UpgradeRemoveUnusedPackages}
when: (remove_ceilometer_compute_polling_package|bool) and (step|int == 2)
- name: Remove openstack-ceilometer-polling package if operator requests it
yum: name=openstack-ceilometer-polling state=removed
tags: step2
ignore_errors: True
when: {get_param: UpgradeRemoveUnusedPackages}
when: (remove_ceilometer_compute_polling_package|bool) and (step|int == 2)

14
docker/services/ceilometer-agent-ipmi.yaml

@ -125,14 +125,16 @@ outputs:
register: ceilometer_ipmi_enabled
- name: "PreUpgrade step0,validation: Check if openstack-ceilometer-ipmi is running"
command: systemctl is-active --quiet openstack-ceilometer-ipmi
when: ceilometer_ipmi_enabled.rc == 0
tags: step0,validation
when: (ceilometer_ipmi_enabled.rc == 0) and (step|int == 0)
tags: validation
- name: Stop and disable ceilometer agent ipmi service
tags: step2
service: name=openstack-ceilometer-agent-ipmi state=stopped enabled=no
when: ceilometer_ipmi_enabled.rc == 0
when: (ceilometer_ipmi_enabled.rc == 0) and (step|int == 2)
- name: Set fact for removal of openstack-ceilometer-ipmi package
when: step|int == 2
set_fact:
remove_ceilometer_ipmi_package: {get_param: UpgradeRemoveUnusedPackages}
- name: Remove openstack-ceilometer-ipmi package if operator requests it
yum: name=openstack-ceilometer-ipmi state=removed
tags: step2
ignore_errors: True
when: {get_param: UpgradeRemoveUnusedPackages}
when: (remove_ceilometer_ipmi_package|bool) and (step|int == 2)

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

@ -135,14 +135,16 @@ outputs:
register: ceilometer_agent_notification_enabled
- name: "PreUpgrade step0,validation: Check service openstack-ceilometer-notification is running"
command: systemctl is-active --quiet openstack-ceilometer-notification
when: ceilometer_agent_notification_enabled.rc == 0
tags: step0,validation
when: (ceilometer_agent_notification_enabled.rc == 0) and (step|int == 0)
tags: validation
- name: Stop and disable ceilometer agent notification service
tags: step2
service: name=openstack-ceilometer-notification state=stopped enabled=no
when: ceilometer_agent_notification_enabled.rc == 0
when: (ceilometer_agent_notification_enabled.rc == 0) and (step|int == 2)
- name: Set fact for removal of openstack-ceilometer-notification package
when: step|int == 2
set_fact:
remove_ceilometer_notification_package: {get_param: UpgradeRemoveUnusedPackages}
- name: Remove openstack-ceilometer-notification package if operator requests it
yum: name=openstack-ceilometer-notification state=removed
tags: step2
ignore_errors: True
when: {get_param: UpgradeRemoveUnusedPackages}
when: (remove_ceilometer_notification_package|bool) and (step|int == 2)

21
docker/services/cinder-api.yaml

@ -207,28 +207,29 @@ outputs:
register: cinder_api_enabled
- name: "PreUpgrade step0,validation: Check service openstack-cinder-api is running"
shell: systemctl is-active --quiet openstack-cinder-api
when: cinder_api_enabled.rc == 0
tags: step0,validation
when: (cinder_api_enabled.rc == 0) and (step|int == 0)
tags: validation
- name: Stop and disable cinder_api service (pre-upgrade not under httpd)
tags: step2
service: name=openstack-cinder-api state=stopped enabled=no
when: cinder_api_enabled.rc == 0
when: (cinder_api_enabled.rc == 0) and (step|int == 2)
- name: check for cinder_api running under apache (post upgrade)
tags: step2
shell: "httpd -t -D DUMP_VHOSTS | grep -q cinder"
register: cinder_api_apache
ignore_errors: true
when: step|int == 2
- name: Stop and disable cinder_api service
tags: step2
service: name=httpd state=stopped enabled=no
when: cinder_api_apache.rc == 0
when: (cinder_api_apache.rc == 0) and (step|int == 2)
- name: remove old cinder cron jobs
tags: step2
when: step|int == 2
file:
path: /var/spool/cron/cinder
state: absent
- name: Set fact for removal of httpd package
when: step|int == 2
set_fact:
remove_httpd_package: {get_param: UpgradeRemoveUnusedPackages}
- name: Remove httpd package if operator requests it
yum: name=httpd state=removed
tags: step2
ignore_errors: True
when: {get_param: UpgradeRemoveUnusedPackages}
when: (remove_httpd_package|bool) and (step|int == 2)

9
docker/services/cinder-backup.yaml

@ -166,10 +166,13 @@ outputs:
state: directory
upgrade_tasks:
- name: Stop and disable cinder_backup service
tags: step2
when: step|int == 2
service: name=openstack-cinder-backup state=stopped enabled=no
- name: Set fact for removal of openstack-cinder package
when: step|int == 2
set_fact:
remove_cinder_package: {get_param: UpgradeRemoveUnusedPackages}
- name: Remove openstack-cinder package if operator requests it
yum: name=openstack-cinder state=removed
tags: step2
ignore_errors: True
when: {get_param: UpgradeRemoveUnusedPackages}
when: (remove_cinder_package|bool) and (step|int == 2)

14
docker/services/cinder-scheduler.yaml

@ -138,14 +138,16 @@ outputs:
register: cinder_scheduler_enabled
- name: "PreUpgrade step0,validation: Check service openstack-cinder-scheduler is running"
shell: systemctl is-active --quiet openstack-cinder-scheduler
when: cinder_scheduler_enabled.rc == 0
tags: step0,validation
when: (cinder_scheduler_enabled.rc == 0) and (step|int == 0)
tags: validation
- name: Stop and disable cinder_scheduler service
tags: step2
when: cinder_scheduler_enabled.rc == 0
when: (cinder_scheduler_enabled.rc == 0) and (step|int == 2)
service: name=openstack-cinder-scheduler state=stopped enabled=no
- name: Set fact for removal of openstack-cinder package
when: step|int == 2
set_fact:
remove_cinder_package: {get_param: UpgradeRemoveUnusedPackages}
- name: Remove openstack-cinder package if operator requests it
yum: name=openstack-cinder state=removed
tags: step2
ignore_errors: True
when: {get_param: UpgradeRemoveUnusedPackages}
when: (remove_cinder_package|bool) and (step|int == 2)

14
docker/services/cinder-volume.yaml

@ -214,14 +214,16 @@ outputs:
register: cinder_volume_enabled
- name: "PreUpgrade step0,validation: Check service openstack-cinder-volume is running"
shell: systemctl is-active --quiet openstack-cinder-volume
when: cinder_volume_enabled.rc == 0
tags: step0,validation
when: (cinder_volume_enabled.rc == 0) and (step|int == 0)
tags: validation
- name: Stop and disable cinder_volume service
tags: step2
when: cinder_volume_enabled.rc == 0
when: (cinder_volume_enabled.rc == 0) and (step|int == 2)
service: name=openstack-cinder-volume state=stopped enabled=no
- name: Set fact for removal of openstack-cinder package
when: step|int == 2
set_fact:
remove_cinder_package: {get_param: UpgradeRemoveUnusedPackages}
- name: Remove openstack-cinder package if operator requests it
yum: name=openstack-cinder state=removed
tags: step2
ignore_errors: True
when: {get_param: UpgradeRemoveUnusedPackages}
when: (remove_cinder_package|bool) and (step|int == 2)

14
docker/services/collectd.yaml

@ -126,14 +126,16 @@ outputs:
register: collectd_enabled
- name: "PreUpgrade step0,validation: Check service collectd service is running"
command: systemctl is-active --quiet collectd
when: collectd_enabled.rc == 0
tags: step0,validation
when: (collectd_enabled.rc == 0) and (step|int == 0)
tags: validation
- name: Stop and disable collectd service
tags: step2
when: collectd_enabled.rc == 0
when: (collectd_enabled.rc == 0) and (step|int == 2)
service: name=collectd.service state=stopped enabled=no
- name: Set fact for removal of collectd package
when: step|int == 2
set_fact:
remove_collectd_package: {get_param: UpgradeRemoveUnusedPackages}
- name: Remove collectd package if operator requests it
yum: name=collectd state=removed
tags: step2
ignore_errors: True
when: {get_param: UpgradeRemoveUnusedPackages}
when: (remove_collectd_package|bool) and (step|int == 2)

14
docker/services/congress.yaml

@ -155,14 +155,16 @@ outputs:
register: congress_enabled
- name: "PreUpgrade step0,validation: Check service openstack-congress-server is running"
command: systemctl is-active --quiet openstack-congress-server
when: congress_enabled.rc == 0
tags: step0,validation
when: (congress_enabled.rc == 0) and (step|int == 0)
tags: validation
- name: Stop and disable congress_api service
tags: step2
when: congress_enabled.rc == 0
when: (congress_enabled.rc == 0) and (step|int == 2)
service: name=openstack-congress-server state=stopped enabled=no
- name: Set fact for removal of openstack-congress package
when: step|int == 2
set_fact:
remove_congress_package: {get_param: UpgradeRemoveUnusedPackages}
- name: Remove openstack-congress package if operator requests it
yum: name=openstack-congress state=removed
tags: step2
ignore_errors: True
when: {get_param: UpgradeRemoveUnusedPackages}
when: (remove_congress_package|bool) and (step|int == 2)

7
docker/services/database/mongodb.yaml

@ -172,9 +172,8 @@ outputs:
register: mongod_enabled
- name: "PreUpgrade step0,validation: Check if mongod is running"
command: systemctl is-active --quiet mongod
when: mongod_enabled.rc == 0
tags: step0,validation
when: (mongod_enabled.rc == 0) and (step|int == 0)
tags: validation
- name: Stop and disable mongodb service
tags: step2
when: mongod_enabled.rc == 0
when: (mongod_enabled.rc == 0) and (step|int == 2)
service: name=mongod state=stopped enabled=no

7
docker/services/database/mysql.yaml

@ -243,9 +243,8 @@ outputs:
register: mariadb_enabled
- name: "PreUpgrade step0,validation: Check if mysql service is running"
command: systemctl is-active --quiet mariadb
when: mariadb_enabled.rc == 0
tags: step0,validation
when: (mariadb_enabled.rc == 0) and (step|int == 0)
tags: validation
- name: Stop and disable mysql service
tags: step2
when: mariadb_enabled.rc == 0
when: (mariadb_enabled.rc == 0) and (step|int == 2)
service: name=mariadb state=stopped enabled=no

7
docker/services/database/redis.yaml

@ -129,9 +129,8 @@ outputs:
register: redis_enabled
- name: "PreUpgrade step0,validation: Check if redis is running"
command: systemctl is-active --quiet redis
when: redis_enabled.rc == 0
tags: step0,validation
when: (redis_enabled.rc == 0) and (step|int == 0)
tags: validation
- name: Stop and disable redis service
tags: step2
when: redis_enabled.rc == 0
when: (redis_enabled.rc == 0) and (step|int == 2)
service: name=redis state=stopped enabled=no

14
docker/services/ec2-api.yaml

@ -217,19 +217,17 @@ outputs:
register: ec2_api_metadata_enabled
- name: "PreUpgrade step0,validation: Check if openstack-ec2-api is running"
command: systemctl is-active --quiet openstack-ec2-api
when: ec2_api_enabled.rc == 0
tags: step0,validation
when: (ec2_api_enabled.rc == 0) and (step|int == 0)
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.rc == 0
tags: step0,validation
when: (ec2_api_metadata_enabled.rc == 0) and (step|int == 0)
tags: validation
- name: Stop and disable EC2-API service
tags: step2
when: ec2_api_enabled.rc == 0
when: (ec2_api_enabled.rc == 0) and (step|int == 2)
service: name=openstack-ec2-api state=stopped enabled=no
- name: Stop and disable EC2-API-METADATA service
tags: step2
when: ec2_api_metadata_enabled.rc == 0
when: (ec2_api_metadata_enabled.rc == 0) and (step|int == 2)
service: name=openstack-ec2-api-metadata state=stopped enabled=no
metadata_settings:
get_attr: [Ec2ApiPuppetBase, role_data, metadata_settings]

7
docker/services/etcd.yaml

@ -122,9 +122,8 @@ outputs:
register: etcd_enabled
- name: "PreUpgrade step0,validation: Check if etcd is running"
command: systemctl is-active --quiet etcd
when: etcd_enabled.rc == 0
tags: step0,validation
when: (etcd_enabled.rc == 0) and (step|int == 0)
tags: validation
- name: Stop and disable etcd service
tags: step2
when: etcd_enabled.rc == 0
when: (etcd_enabled.rc == 0) and (step|int == 2)
service: name=etcd state=stopped enabled=no

2
docker/services/fluentd.yaml

@ -122,6 +122,6 @@ outputs:
state: directory
upgrade_tasks:
- name: Stop and disable fluentd service
tags: step2
when: step|int == 2
service: name=fluentd.service state=stopped enabled=no

14
docker/services/glance-api.yaml

@ -240,16 +240,18 @@ outputs:
register: glance_api_enabled
- name: "PreUpgrade step0,validation: Check service openstack-glance-api is running"
command: systemctl is-active --quiet openstack-glance-api
tags: step0,validation
when: glance_api_enabled.rc == 0
tags: validation
when: (glance_api_enabled.rc == 0) and (step|int == 0)
- name: Stop and disable glance_api service
tags: step2
when: glance_api_enabled.rc == 0
when: (glance_api_enabled.rc == 0) and (step|int == 2)
service: name=openstack-glance-api state=stopped enabled=no
- name: Set fact for removal of openstack-glance package
when: step|int == 2
set_fact:
remove_glance_package: {get_param: UpgradeRemoveUnusedPackages}
- name: Remove openstack-glance package if operator requests it
yum: name=openstack-glance state=removed
tags: step2
ignore_errors: True
when: {get_param: UpgradeRemoveUnusedPackages}
when: (remove_glance_package|bool) and (step|int == 2)
metadata_settings:
get_attr: [GlanceApiPuppetBase, role_data, metadata_settings]

14
docker/services/gnocchi-api.yaml

@ -202,12 +202,11 @@ outputs:
register: httpd_enabled
- name: "PreUpgrade step0,validation: Check service openstack-gnocchi-api is running"
command: systemctl is-active --quiet openstack-gnocchi-api
when: gnocchi_api_enabled.rc == 0 and httpd_enabled.rc != 0
tags: step0,validation
when: (gnocchi_api_enabled.rc == 0) and (httpd_enabled.rc != 0) and (step|int == 0)
tags: validation
- name: Stop and disable gnocchi_api service
tags: step2
service: name=openstack-gnocchi-api state=stopped enabled=no
when: gnocchi_api_enabled.rc == 0 and httpd_enabled.rc != 0
when: (gnocchi_api_enabled.rc == 0) and (httpd_enabled.rc != 0) and (step|int == 2)
- name: Check if httpd service is running
command: systemctl is-active --quiet httpd
tags: common
@ -215,11 +214,10 @@ outputs:
register: httpd_running
- name: "PreUpgrade step0,validation: Check if gnocchi_api_wsgi is running"
shell: systemctl status 'httpd' | grep -q gnocchi
tags: step0,validation
when: httpd_enabled.rc == 0 and httpd_running.rc == 0
tags: validation
when: (httpd_enabled.rc == 0) and (httpd_running.rc == 0) and (step|int == 0)
- name: Stop and disable httpd service
tags: step2
when: httpd_enabled.rc == 0 and httpd_running.rc == 0
when: (httpd_enabled.rc == 0) and (httpd_running.rc == 0) and (step|int == 2)
service: name=httpd state=stopped enabled=no
metadata_settings:
get_attr: [GnocchiApiPuppetBase, role_data, metadata_settings]

7
docker/services/gnocchi-metricd.yaml

@ -141,9 +141,8 @@ outputs:
register: gnocchi_metricd_enabled
- name: "PreUpgrade step0,validation: Check service openstack-gnocchi-metricd is running"
command: systemctl is-active --quiet openstack-gnocchi-metricd
when: gnocchi_metricd_enabled.rc == 0
tags: step0,validation
when: (gnocchi_metricd_enabled.rc == 0) and (step|int == 0)
tags: validation
- name: Stop and disable openstack-gnocchi-metricd service
tags: step2
when: gnocchi_metricd_enabled.rc == 0
when: (gnocchi_metricd_enabled.rc == 0) and (step|int == 2)
service: name=openstack-gnocchi-metricd.service state=stopped enabled=no

7
docker/services/gnocchi-statsd.yaml

@ -141,9 +141,8 @@ outputs:
register: gnocchi_statsd_enabled
- name: "PreUpgrade step0,validation: Check service openstack-gnocchi-statsd is running"
command: systemctl is-active --quiet openstack-gnocchi-statsd
when: gnocchi_statsd_enabled.rc == 0
tags: step0,validation
when: (gnocchi_statsd_enabled.rc == 0) and (step|int == 0)
tags: validation
- name: Stop and disable openstack-gnocchi-statsd service
tags: step2
when: gnocchi_statsd_enabled.rc == 0
when: (gnocchi_statsd_enabled.rc == 0) and (step|int == 2)
service: name=openstack-gnocchi-statsd.service state=stopped enabled=no

14
docker/services/heat-api-cfn.yaml

@ -142,24 +142,22 @@ outputs:
register: httpd_enabled
- 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.rc == 0 and httpd_enabled.rc != 0
tags: step0,validation
when: (heat_api_cfn_enabled.rc == 0) and (httpd_enabled.rc != 0) and (step|int == 0)
tags: validation
- name: Stop and disable heat_api_cfn service (pre-upgrade not under httpd)
tags: step2
service: name=openstack-heat-api-cfn state=stopped enabled=no
when: heat_api_cfn_enabled.rc == 0 and httpd_enabled.rc != 0
when: (heat_api_cfn_enabled.rc == 0) and (httpd_enabled.rc != 0) and (step|int == 2)
- name: Check if httpd service is running
command: systemctl is-active --quiet httpd
tags: common
ignore_errors: True
register: httpd_running
- name: "PreUpgrade step0,validation: Check if heat_api_cfn_wsgi is running"
tags: step0,validation
tags: validation
shell: systemctl status 'httpd' | grep -q heat_api_cfn_wsgi
when: httpd_enabled.rc == 0 and httpd_running.rc == 0
when: (httpd_enabled.rc == 0) and (httpd_running.rc == 0) and (step|int == 0)
- name: Stop heat_api_cfn service (running under httpd)
tags: step2
service: name=httpd state=stopped
when: httpd_enabled.rc == 0 and httpd_running.rc == 0
when: (httpd_enabled.rc == 0) and (httpd_running.rc == 0) and (step|int == 2)
metadata_settings:
get_attr: [HeatBase, role_data, metadata_settings]

16
docker/services/heat-api.yaml

@ -168,12 +168,11 @@ outputs:
register: httpd_enabled
- name: "PreUpgrade step0,validation: Check service openstack-heat-api is running"
command: systemctl is-active --quiet openstack-heat-api
when: heat_api_enabled.rc == 0 and httpd_enabled.rc != 0
tags: step0,validation
when: (heat_api_enabled.rc == 0) and (httpd_enabled.rc != 0) and (step|int == 0)
tags: validation
- name: Stop and disable heat_api service (pre-upgrade not under httpd)
tags: step2
service: name=openstack-heat-api state=stopped enabled=no
when: heat_api_enabled.rc == 0 and httpd_enabled.rc != 0
when: (heat_api_enabled.rc == 0) and (httpd_enabled.rc != 0) and (step|int == 2)
- name: Check if httpd is running
tags: common
command: systemctl is-active --quiet httpd
@ -181,14 +180,13 @@ outputs:
register: httpd_running
- name: "PreUpgrade step0,validation: Check if heat_api_wsgi is running"
shell: systemctl status 'httpd' | grep -q heat_api_wsgi
tags: step0,validation
when: httpd_enabled.rc == 0 and httpd_running.rc == 0
tags: validation
when: (httpd_enabled.rc == 0) and (httpd_running.rc == 0) and (step|int == 0)
- name: Stop heat_api service (running under httpd)
tags: step2
service: name=httpd state=stopped
when: httpd_enabled.rc == 0 and httpd_running.rc == 0
when: (httpd_enabled.rc == 0) and (httpd_running.rc == 0) and (step|int == 2)
- name: remove old heat cron jobs
tags: step2
when: step|int == 2
file:
path: /var/spool/cron/heat
state: absent

7
docker/services/heat-engine.yaml

@ -141,9 +141,8 @@ outputs:
register: heat_engine_enabled
- name: "PreUpgrade step0,validation: Check service openstack-heat-engine is running"
command: systemctl is-active --quiet openstack-heat-engine
when: heat_engine_enabled.rc == 0
tags: step0,validation
when: (heat_engine_enabled.rc == 0) and (step|int == 0)
tags: validation
- name: Stop and disable heat_engine service
tags: step2
when: heat_engine_enabled.rc == 0
when: (heat_engine_enabled.rc == 0) and (step|int == 2)
service: name=openstack-heat-engine state=stopped enabled=no

7
docker/services/horizon.yaml

@ -194,11 +194,10 @@ outputs:
register: httpd_enabled
- name: "PreUpgrade step0,validation: Check if horizon is running"
shell: systemctl is-active --quiet httpd
when: httpd_enabled.rc == 0
tags: step0,validation
when: (httpd_enabled.rc == 0) and (step|int == 0)
tags: validation
- name: Stop and disable horizon service (running under httpd)
tags: step2
when: httpd_enabled.rc == 0
when: (httpd_enabled.rc == 0) and (step|int == 2)
service: name=httpd state=stopped enabled=no
metadata_settings:
get_attr: [HorizonBase, role_data, metadata_settings]

14
docker/services/ironic-api.yaml

@ -163,11 +163,10 @@ outputs:
register: httpd_enabled
- name: "PreUpgrade step0,validation: Check service openstack-ironic-api is running"
command: systemctl is-active --quiet openstack-ironic-api
when: ironic_api_enabled.rc == 0 and httpd_enabled.rc != 0
tags: step0,validation
when: (ironic_api_enabled.rc == 0) and (httpd_enabled.rc != 0) and (step|int == 0)
tags: validation
- name: Stop and disable ironic_api service
tags: step2
when: ironic_api_enabled.rc == 0 and httpd_enabled.rc != 0
when: (ironic_api_enabled.rc == 0) and (httpd_enabled.rc != 0) and (step|int == 2)
service: name=openstack-ironic-api state=stopped enabled=no
- name: Check if httpd service is running
command: systemctl is-active --quiet httpd
@ -176,9 +175,8 @@ outputs:
register: httpd_running
- name: "PreUpgrade step0,validation: Check if ironic_api_wsgi is running"
shell: systemctl status 'httpd' | grep -q ironic
tags: step0,validation
when: httpd_enabled.rc == 0 and httpd_running.rc == 0
tags: validation
when: (httpd_enabled.rc == 0) and (httpd_running.rc == 0) and (step|int == 0)
- name: Stop ironic_api service (running under httpd)
tags: step2
when: httpd_enabled.rc == 0 and httpd_running.rc == 0
when: (httpd_enabled.rc == 0) and (httpd_running.rc == 0) and (step|int == 2)
service: name=httpd state=stopped enabled=no

7
docker/services/ironic-conductor.yaml

@ -174,9 +174,8 @@ outputs:
register: ironic_conductor_enabled
- name: "PreUpgrade step0,validation: Check service openstack-ironic-conductor is running"
command: systemctl is-active --quiet openstack-ironic-conductor
tags: step0,validation
when: ironic_conductor_enabled.rc == 0
tags: validation
when: (ironic_conductor_enabled.rc == 0) and (step|int == 0)
- name: Stop and disable ironic_conductor service
tags: step2
when: ironic_conductor_enabled.rc == 0
when: (ironic_conductor_enabled.rc == 0) and (step|int == 2)
service: name=openstack-ironic-conductor state=stopped enabled=no

12
docker/services/ironic-inspector.yaml

@ -171,9 +171,9 @@ outputs:
/var/log/containers/ironic-inspector.
ignore_errors: true
upgrade_tasks:
- name: Stop and disable ironic_inspector service
tags: step2
service: name=openstack-ironic-inspector state=stopped enabled=no
- name: Stop and disable ironic_inspector dnsmasq service
tags: step2
service: name=openstack-ironic-inspector-dnsmasq state=stopped enabled=no
- when: step|int ==2
block:
- name: Stop and disable ironic_inspector service
service: name=openstack-ironic-inspector state=stopped enabled=no
- name: Stop and disable ironic_inspector dnsmasq service
service: name=openstack-ironic-inspector-dnsmasq state=stopped enabled=no

14
docker/services/iscsid.yaml

@ -117,11 +117,10 @@ outputs:
register: iscsid_enabled
- name: "PreUpgrade step0,validation: Check if iscsid is running"
command: systemctl is-active --quiet iscsid
when: iscsid_enabled.rc == 0
tags: step0,validation
when: (iscsid_enabled.rc == 0) and (step|int == 0)
tags: validation
- name: Stop and disable iscsid service
tags: step2
when: iscsid_enabled.rc == 0
when: (iscsid_enabled.rc == 0) and (step|int == 2)
service: name=iscsid state=stopped enabled=no
- name: Check if iscsid.socket service is deployed
tags: common
@ -130,9 +129,8 @@ outputs:
register: iscsid_socket_enabled
- name: "PreUpgrade step0,validation: Check if iscsid.socket is running"
command: systemctl is-active --quiet iscsid.socket
when: iscsid_socket_enabled.rc == 0
tags: step0,validation
when: (iscsid_socket_enabled.rc == 0) and (step|int == 0)
tags: validation
- name: Stop and disable iscsid.socket service
tags: step2
when: iscsid_socket_enabled.rc == 0
when: (iscsid_socket_enabled.rc == 0) and (step|int == 2)
service: name=iscsid.socket state=stopped enabled=no

9
docker/services/keystone.yaml

@ -209,14 +209,13 @@ outputs:
register: httpd_running
- name: "PreUpgrade step0,validation: Check if keystone_wsgi is running under httpd"
shell: systemctl status 'httpd' | grep -q keystone
tags: step0,validation
when: httpd_enabled.rc == 0 and httpd_running.rc == 0
tags: validation
when: (httpd_enabled.rc == 0) and (httpd_running.rc == 0) and (step|int == 0)
- name: Stop and disable keystone service (running under httpd)
tags: step2
when: httpd_enabled.rc == 0 and httpd_running.rc == 0
when: (httpd_enabled.rc == 0) and (httpd_running.rc == 0) and (step|int == 2)
service: name=httpd state=stopped enabled=no
- name: remove old keystone cron jobs
tags: step2
when: step|int == 2
file:
path: /var/spool/cron/keystone
state: absent

7
docker/services/manila-api.yaml

@ -145,9 +145,8 @@ outputs:
register: manila_api_enabled
- name: "PreUpgrade step0,validation: Check service openstack-manila-api is running"
command: systemctl is-active --quiet openstack-manila-api
when: manila_api_enabled.rc == 0
tags: step0,validation
when: (manila_api_enabled.rc == 0) and (step|int == 0)
tags: validation
- name: Stop and disable manila_api service
tags: step2
when: manila_api_enabled.rc == 0
when: (manila_api_enabled.rc == 0) and (step|int == 2)
service: name=openstack-manila-api state=stopped enabled=no

7
docker/services/manila-scheduler.yaml

@ -121,9 +121,8 @@ outputs:
register: manila_scheduler_enabled
- name: "PreUpgrade step0,validation: Check service openstack-manila-scheduler is running"
command: systemctl is-active --quiet openstack-manila-scheduler
when: manila_scheduler_enabled.rc == 0
tags: step0,validation
when: (manila_scheduler_enabled.rc == 0) and (step|int == 0)
tags: validation
- name: Stop and disable manila_scheduler service
tags: step2
when: manila_scheduler_enabled.rc == 0
when: (manila_scheduler_enabled.rc == 0) and (step|int == 2)
service: name=openstack-manila-scheduler state=stopped enabled=no

7
docker/services/manila-share.yaml

@ -140,9 +140,8 @@ outputs:
register: manila_share_enabled
- name: "PreUpgrade step0,validation: Check service openstack-manila-share is running"
command: systemctl is-active --quiet openstack-manila-share
when: manila_share_enabled.rc == 0
tags: step0,validation
when: (manila_share_enabled.rc == 0) and (step|int == 0)
tags: validation
- name: Stop and disable manila_share service
tags: step2
when: manila_share_enabled.rc == 0
when: (manila_share_enabled.rc == 0) and (step|int == 2)
service: name=openstack-manila-share state=stopped enabled=no

7
docker/services/memcached.yaml

@ -122,9 +122,8 @@ outputs:
register: memcached_enabled
- name: "PreUpgrade step0,validation: Check service memcached is running"
command: systemctl is-active --quiet memcached
when: memcached_enabled.rc == 0
tags: step0,validation
when: (memcached_enabled.rc == 0) and (step|int == 0)
tags: validation
- name: Stop and disable memcached service
tags: step2
when: memcached_enabled.rc == 0
when: (memcached_enabled.rc == 0) and (step|int == 2)
service: name=memcached state=stopped enabled=no

14
docker/services/mistral-api.yaml

@ -205,11 +205,10 @@ outputs:
register: httpd_enabled
- name: "PreUpgrade step0,validation: Check if openstack-mistral-api is running"
command: systemctl is-active --quiet openstack-mistral-api
when: mistral_api_enabled.rc == 0 and httpd_enabled.rc != 0
tags: step0,validation
when: (mistral_api_enabled.rc == 0) and (httpd_enabled.rc != 0) and (step|int == 0)
tags: validation
- name: Stop and disable mistral_api service (pre-upgrade not under httpd)
tags: step2
when: mistral_api_enabled.rc == 0 and httpd_enabled.rc != 0
when: (mistral_api_enabled.rc == 0) and (httpd_enabled.rc != 0) and (step|int == 2)
service: name=openstack-mistral-api state=stopped enabled=no
- name: Check if httpd service is running
command: systemctl is-active --quiet httpd
@ -218,9 +217,8 @@ outputs:
register: httpd_running
- name: "PreUpgrade step0,validation: Check if mistral_api_wsgi is running"
shell: systemctl status 'httpd' | grep -q mistral
tags: step0,validation
when: httpd_enabled.rc == 0 and httpd_running.rc == 0
tags: validation
when: (httpd_enabled.rc == 0) and (httpd_running.rc == 0) and (step|int == 0)
- name: Stop mistral_api service (running under httpd)
tags: step2
service: name=httpd state=stopped enabled=no
when: httpd_enabled.rc == 0 and httpd_running.rc == 0
when: (httpd_enabled.rc == 0) and (httpd_running.rc == 0) and (step|int == 2)

7
docker/services/mistral-engine.yaml

@ -128,9 +128,8 @@ outputs:
register: mistral_engine_enabled
- name: "PreUpgrade step0,validation: Check if openstack-mistral-engine is running"
command: systemctl is-active --quiet openstack-mistral-engine
when: mistral_engine_enabled.rc == 0
tags: step0,validation
when: (mistral_engine_enabled.rc == 0) and (step|int == 0)
tags: validation
- name: Stop and disable mistral_engine service
tags: step2
when: mistral_engine_enabled.rc == 0
when: (mistral_engine_enabled.rc == 0) and (step|int == 2)
service: name=openstack-mistral-engine state=stopped enabled=no

7
docker/services/mistral-event-engine.yaml

@ -126,9 +126,8 @@ outputs:
register: mistral_event_engine_enabled
- name: "PreUpgrade step0,validation: Check if openstack-mistral-event-engine is running"
command: systemctl is-active --quiet openstack-mistral-event-engine
when: mistral_event_engine_enabled.rc == 0
tags: step0,validation
when: (mistral_event_engine_enabled.rc == 0) and (step|int == 0)
tags: validation
- name: Stop and disable mistral_event_engine service
tags: step2
when: mistral_event_engine_enabled.rc == 0
when: (mistral_event_engine_enabled.rc == 0) and (step|int == 2)
service: name=openstack-mistral-event-engine state=stopped enabled=no

7
docker/services/mistral-executor.yaml

@ -132,9 +132,8 @@ outputs:
register: mistral_executor_enabled
- name: "PreUpgrade step0,validation: Check if openstack-mistral-executor is running"
command: systemctl is-active --quiet openstack-mistral-executor
when: mistral_executor_enabled.rc == 0
tags: step0,validation
when: (mistral_executor_enabled.rc == 0) and (step|int == 0)
tags: validation
- name: Stop and disable mistral_executor service
tags: step2
when: mistral_executor_enabled.rc == 0
when: (mistral_executor_enabled.rc == 0) and (step|int == 2)
service: name=openstack-mistral-executor state=stopped enabled=no

7
docker/services/multipathd.yaml

@ -93,9 +93,8 @@ outputs:
register: multipathd_enabled
- name: "PreUpgrade step0,validation: Check service multipathd is running"
command: systemctl is-active --quiet multipathd
when: multipathd_enabled.rc == 0
tags: step0,validation
when: (multipathd_enabled.rc == 0) and (step|int == 0)
tags: validation
- name: Stop and disable multipathd service
tags: step2
when: multipathd_enabled.rc == 0
when: (multipathd_enabled.rc == 0) and (step|int == 2)
service: name=multipathd state=stopped enabled=no

14
docker/services/neutron-api.yaml

@ -176,16 +176,18 @@ outputs:
register: neutron_server_enabled
- name: "PreUpgrade step0,validation: Check service neutron-server is running"
command: systemctl is-active --quiet neutron-server
when: neutron_server_enabled.rc == 0
tags: step0,validation
when: (neutron_server_enabled.rc == 0) and (step|int == 0)
tags: validation
- name: Stop and disable neutron_api service
tags: step2
when: neutron_server_enabled.rc == 0
when: (neutron_server_enabled.rc == 0) and (step|int == 2)
service: name=neutron-server state=stopped enabled=no
- name: Set fact for removal of openstack-neutron package
when: step|int == 2
set_fact:
remove_neutron_package: {get_param: UpgradeRemoveUnusedPackages}
- name: Remove openstack-neutron package if operator requests it
yum: name=openstack-neutron state=removed
tags: step2
ignore_errors: True
when: {get_param: UpgradeRemoveUnusedPackages}
when: (remove_neutron_package|bool) and (step|int == 2)
metadata_settings:
get_attr: [NeutronBase, role_data, metadata_settings]

7
docker/services/neutron-dhcp.yaml

@ -127,9 +127,8 @@ outputs:
register: neutron_dhcp_agent_enabled
- name: "PreUpgrade step0,validation: Check service neutron-dhcp-agent is running"
command: systemctl is-active --quiet neutron-dhcp-agent
when: neutron_dhcp_agent_enabled.rc == 0
tags: step0,validation
when: (neutron_dhcp_agent_enabled.rc == 0) and (step|int == 0)
tags: validation
- name: Stop and disable neutron_dhcp service
tags: step2
when: neutron_dhcp_agent_enabled.rc == 0
when: (neutron_dhcp_agent_enabled.rc == 0) and (step|int == 2)
service: name=neutron-dhcp-agent state=stopped enabled=no

7
docker/services/neutron-l3.yaml

@ -125,9 +125,8 @@ outputs:
register: neutron_l3_agent_enabled
- name: "PreUpgrade step0,validation: Check service neutron-l3-agent is running"
command: systemctl is-active --quiet neutron-l3-agent
when: neutron_l3_agent_enabled.rc == 0
tags: step0,validation
when: (neutron_l3_agent_enabled.rc == 0) and (step|int == 0)
tags: validation
- name: Stop and disable neutron_l3 service
tags: step2
when: neutron_l3_agent_enabled.rc == 0
when: (neutron_l3_agent_enabled.rc == 0) and (step|int == 2)
service: name=neutron-l3-agent state=stopped enabled=no

7
docker/services/neutron-metadata.yaml

@ -124,9 +124,8 @@ outputs:
register: neutron_metadata_agent_enabled
- name: "PreUpgrade step0,validation: Check service neutron-metadata-agent is running"
command: systemctl is-active --quiet neutron-metadata-agent
when: neutron_metadata_agent_enabled.rc == 0
tags: step0,validation
when: (neutron_metadata_agent_enabled.rc == 0) and (step|int == 0)
tags: validation
- name: Stop and disable neutron_metadata service
tags: step2
when: neutron_metadata_agent_enabled.rc == 0
when: (neutron_metadata_agent_enabled.rc == 0) and (step|int == 2)
service: name=neutron-metadata-agent state=stopped enabled=no

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

@ -150,14 +150,16 @@ outputs:
register: neutron_ovs_agent_enabled
- name: "PreUpgrade step0,validation: Check service neutron-openvswitch-agent is running"
command: systemctl is-active --quiet neutron-openvswitch-agent
when: neutron_ovs_agent_enabled.rc == 0
tags: step0,validation
when: (neutron_ovs_agent_enabled.rc == 0) and (step|int == 0)
tags: validation
- name: Stop and disable neutron_ovs_agent service
tags: step2
when: neutron_ovs_agent_enabled.rc == 0
when: (neutron_ovs_agent_enabled.rc == 0) and (step|int == 2)
service: name=neutron-openvswitch-agent state=stopped enabled=no
- name: Set fact for removal of openstack-neutron-openvswitch package
when: step|int == 2
set_fact:
remove_neutron_openvswitch_package: {get_param: UpgradeRemoveUnusedPackages}
- name: Remove openstack-neutron-openvswitch package if operator requests it
yum: name=openstack-neutron-openvswitch state=removed
tags: step2
ignore_errors: True
when: {get_param: UpgradeRemoveUnusedPackages}
when: (remove_neutron_openvswitch_package|bool) and (step|int == 2)

7
docker/services/neutron-sriov-agent.yaml

@ -112,9 +112,8 @@ outputs:
register: neutron_sriov_nic_agent_enabled
- name: "PreUpgrade step0,validation: Check service neutron-sriov-nic-agent is running"
command: systemctl is-active --quiet neutron-sriov-nic-agent
when: neutron_sriov_nic_agent_enabled.rc == 0
tags: step0,validation
when: (neutron_sriov_nic_agent_enabled.rc == 0) and (step|int == 0)
tags: validation
- name: Stop and disable neutron_sriov_agent service
tags: step2
when: neutron_sriov_nic_agent_enabled.rc == 0
when: (neutron_sriov_nic_agent_enabled.rc == 0) and (step|int == 2)
service: name=neutron-sriov-nic-agent state=stopped enabled=no

23
docker/services/nova-api.yaml

@ -318,11 +318,10 @@ outputs:
register: httpd_enabled
- name: "PreUpgrade step0,validation: Check service openstack-nova-api is running"
command: systemctl is-active --quiet openstack-nova-api
tags: step0,validation
when: nova_api_enabled.rc == 0 and httpd_enabled.rc != 0
tags: validation
when: (nova_api_enabled.rc == 0) and (httpd_enabled.rc != 0) and (step|int == 0)
- name: Stop and disable nova_api service
tags: step2
when: nova_api_enabled.rc == 0 and httpd_enabled.rc != 0
when: (nova_api_enabled.rc == 0) and (httpd_enabled.rc != 0) and (step|int == 2)
service: name=openstack-nova-api state=stopped enabled=no
- name: Check if httpd service is running
command: systemctl is-active --quiet httpd
@ -330,20 +329,22 @@ outputs:
ignore_errors: True
register: httpd_running
- name: "PreUpgrade step0,validation: Check if nova_wsgi is running"
tags: step0,validation
tags: validation
shell: systemctl status 'httpd' | grep -q 'nova'
when: httpd_enabled.rc == 0 and httpd_running.rc == 0
when: (httpd_enabled.rc == 0) and (httpd_running.rc == 0) and (step|int == 0)
- name: Stop nova_api service (running under httpd)
tags: step2
when: httpd_enabled.rc == 0 and httpd_running.rc == 0
when: (httpd_enabled.rc == 0) and (httpd_running.rc == 0) and (step|int == 2)
service: name=httpd state=stopped
- name: Set fact for removal of openstack-nova-api package
when: step|int == 2
set_fact:
remove_nova_api_package: {get_param: UpgradeRemoveUnusedPackages}
- name: Remove openstack-nova-api package if operator requests it
yum: name=openstack-nova-api state=removed
tags: step2
ignore_errors: True
when: {get_param: UpgradeRemoveUnusedPackages}
when: (remove_nova_api_package|bool) and (step|int == 2)
- name: remove old nova cron jobs
tags: step2
when: step|int == 2
file:
path: /var/spool/cron/nova
state: absent

16
docker/services/nova-compute.yaml

@ -182,7 +182,7 @@ outputs:
ignore_errors: True
register: nova_compute_enabled
- name: Set compute upgrade level to auto
tags: step1
when: step|int == 1
ini_file:
str_replace:
template: "dest=/etc/nova/nova.conf section=upgrade_levels option=compute value=LEVEL"
@ -190,14 +190,16 @@ outputs:
LEVEL: {get_param: UpgradeLevelNovaCompute}
- name: "PreUpgrade step0,validation: Check service openstack-nova-compute is running"
command: systemctl is-active --quiet openstack-nova-compute
tags: step0,validation
when: nova_compute_enabled.rc == 0
tags: validation
when: (nova_compute_enabled.rc == 0) and (step|int == 0)
- name: Stop and disable nova-compute service
tags: step2
when: nova_compute_enabled.rc == 0
when: (nova_compute_enabled.rc == 0) and (step|int == 2)
service: name=openstack-nova-compute state=stopped enabled=no
- name: Set fact for removal of openstack-nova-compute package
when: step|int == 2
set_fact:
remove_nova_compute_package: {get_param: UpgradeRemoveUnusedPackages}
- name: Remove openstack-nova-compute package if operator requests it
yum: name=openstack-nova-compute state=removed
tags: step2
ignore_errors: True
when: {get_param: UpgradeRemoveUnusedPackages}
when: (remove_nova_compute_package|bool) and (step|int == 2)

16
docker/services/nova-conductor.yaml

@ -134,7 +134,7 @@ outputs:
ignore_errors: True
register: nova_conductor_enabled
- name: Set compute upgrade level to auto
tags: step1
when: step|int == 1
ini_file:
str_replace:
template: "dest=/etc/nova/nova.conf section=upgrade_levels option=compute value=LEVEL"
@ -142,14 +142,16 @@ outputs:
LEVEL: {get_param: UpgradeLevelNovaCompute}
- name: "PreUpgrade step0,validation: Check service openstack-nova-conductor is running"
command: systemctl is-active --quiet openstack-nova-conductor
tags: step0,validation
when: nova_conductor_enabled.rc == 0
tags: validation
when: (nova_conductor_enabled.rc == 0) and (step|int == 0)
- name: Stop and disable nova_conductor service
tags: step2
when: nova_conductor_enabled.rc == 0
when: (nova_conductor_enabled.rc == 0) and (step|int == 2)
service: name=openstack-nova-conductor state=stopped enabled=no
- name: Set fact for removal of openstack-nova-conductor package
when: step|int == 2
set_fact:
remove_nova_conductor_package: {get_param: UpgradeRemoveUnusedPackages}
- name: Remove openstack-nova-conductor package if operator requests it
yum: name=openstack-nova-conductor state=removed
tags: step2
ignore_errors: True
when: {get_param: UpgradeRemoveUnusedPackages}
when: (remove_nova_conductor_package|bool) and (step|int == 2)

14
docker/services/nova-consoleauth.yaml

@ -130,14 +130,16 @@ outputs:
register: nova_consoleauth_enabled
- name: "PreUpgrade step0,validation: Check service openstack-nova-consoleauth is running"
command: systemctl is-active --quiet openstack-nova-consoleauth
tags: step0,validation
when: nova_consoleauth_enabled.rc == 0
tags: validation
when: (nova_consoleauth_enabled.rc == 0) and (step|int == 0)
- name: Stop and disable nova_consoleauth service
tags: step2
when: nova_consoleauth_enabled.rc == 0
when: (nova_consoleauth_enabled.rc == 0) and (step|int == 2)
service: name=openstack-nova-consoleauth state=stopped enabled=no
- name: Set fact for removal of openstack-nova-console package
when: step|int == 2
set_fact:
remove_nova_console_package: {get_param: UpgradeRemoveUnusedPackages}
- name: Remove openstack-nova-console package if operator requests it
yum: name=openstack-nova-console state=removed
tags: step2
ignore_errors: True
when: {get_param: UpgradeRemoveUnusedPackages}
when: (remove_nova_console_package|bool) and (step|int == 2)

7
docker/services/nova-ironic.yaml

@ -137,9 +137,8 @@ outputs:
register: nova_ironic_enabled
- name: "PreUpgrade step0,validation: Check service openstack-nova-compute is running"
command: systemctl is-active --quiet openstack-nova-compute
tags: step0,validation
when: nova_ironic_enabled.rc == 0
tags: validation
when: (nova_ironic_enabled.rc == 0) and (step|int == 0)
- name: Stop and disable nova-compute service
tags: step2
when: nova_ironic_enabled.rc == 0
when: (nova_ironic_enabled.rc == 0) and (step|int == 2)
service: name=openstack-nova-compute state=stopped enabled=no

7
docker/services/nova-libvirt.yaml

@ -317,9 +317,8 @@ outputs:
register: nova_libvirt_enabled
- name: "PreUpgrade step0,validation: Check service libvirtd is running"
command: systemctl is-active --quiet libvirtd
tags: step0,validation
when: nova_libvirt_enabled.rc == 0
tags: validation
when: (nova_libvirt_enabled.rc == 0) and (step|int == 0)
- name: Stop and disable libvirtd service
tags: step2
when: nova_libvirt_enabled.rc == 0
when: (nova_libvirt_enabled.rc == 0) and (step|int == 2)
service: name=libvirtd state=stopped enabled=no

7
docker/services/nova-metadata.yaml

@ -124,9 +124,8 @@ outputs:
register: nova_metadata_enabled
- name: "PreUpgrade step0,validation: Check service openstack-nova-api is running"
command: systemctl is-active --quiet openstack-nova-api
tags: step0,validation
when: nova_metadata_enabled.rc == 0
tags: validation
when: (nova_metadata_enabled.rc == 0) and (step|int == 0)
- name: Stop and disable nova_api service
tags: step2
when: nova_metadata_enabled.rc == 0
when: (nova_metadata_enabled.rc == 0) and (step|int == 2)
service: name=openstack-nova-api state=stopped enabled=no

14
docker/services/nova-placement.yaml

@ -150,15 +150,17 @@ outputs:
register: httpd_running
- name: "PreUpgrade step0,validation: Check if placement_wsgi is running"
shell: systemctl status 'httpd' | grep -q placement_wsgi
tags: step0,validation
when: httpd_enabled.rc == 0 and httpd_running.rc == 0
tags: validation
when: (httpd_enabled.rc == 0) and (httpd_running.rc == 0) and (step|int == 0)
- name: Stop and disable nova_placement service (running under httpd)
tags: step2
when: httpd_enabled.rc == 0 and httpd_running.rc == 0
when: (httpd_enabled.rc == 0) and (httpd_running.rc == 0) and (step|int == 2)
service: name=httpd state=stopped enabled=no
- name: Set fact for removal of httpd package
when: step|int == 2
set_fact:
remove_httpd_package: {get_param: UpgradeRemoveUnusedPackages}
- name: Remove httpd package if operator requests it
yum: name=httpd state=removed
tags: step2
ignore_errors: True
when: {get_param: UpgradeRemoveUnusedPackages}
when: (remove_httpd_package|bool) and (step|int == 2)

14
docker/services/nova-scheduler.yaml

@ -131,14 +131,16 @@ outputs:
register: nova_scheduler_enabled
- name: "PreUpgrade step0,validation: Check service openstack-nova-scheduler is running"
command: systemctl is-active --quiet openstack-nova-scheduler
tags: step0,validation
when: nova_scheduler_enabled.rc == 0
tags: validation
when: (nova_scheduler_enabled.rc == 0) and (step|int == 0)
- name: Stop and disable nova_scheduler service
tags: step2
when: nova_scheduler_enabled.rc == 0
when: (nova_scheduler_enabled.rc == 0) and (step|int == 2)
service: name=openstack-nova-scheduler state=stopped enabled=no
- name: Set fact for removal of openstack-nova-scheduler package
when: step|int == 2
set_fact:
remove_nova_scheduler_package: {get_param: UpgradeRemoveUnusedPackages}
- name: Remove openstack-nova-scheduler package if operator requests it
yum: name=openstack-nova-scheduler state=removed
tags: step2
ignore_errors: True
when: {get_param: UpgradeRemoveUnusedPackages}
when: (remove_nova_scheduler_package|bool) and (step|int == 2)

14
docker/services/nova-vnc-proxy.yaml

@ -130,14 +130,16 @@ outputs:
register: nova_vncproxy_enabled
- name: "PreUpgrade step0,validation: Check service openstack-nova-novncproxy is running"
command: systemctl is-active --quiet openstack-nova-novncproxy
tags: step0,validation
when: nova_vncproxy_enabled.rc == 0
tags: validation
when: (nova_vncproxy_enabled.rc == 0) and (step|int == 0)
- name: Stop and disable nova_vnc_proxy service
tags: step2
when: nova_vncproxy_enabled.rc == 0
when: (nova_vncproxy_enabled.rc == 0) and (step|int == 2)
service: name=openstack-nova-novncproxy state=stopped enabled=no
- name: Set fact for removal of openstack-nova-novncproxy package
when: step|int == 2
set_fact:
remove_nova_novncproxy_package: {get_param: UpgradeRemoveUnusedPackages}
- name: Remove openstack-nova-novncproxy package if operator requests it
yum: name=openstack-nova-novncproxy state=removed
tags: step2
ignore_errors: True
when: {get_param: UpgradeRemoveUnusedPackages}
when: (remove_nova_novncproxy_package|bool) and (step|int == 2)

2
docker/services/octavia-api.yaml

@ -184,5 +184,5 @@ outputs:
ignore_errors: true
upgrade_tasks:
- name: Stop and disable octavia_api service
tags: step2
when: step|int == 2
service: name=openstack-octavia-api state=stopped enabled=no

9
docker/services/octavia-health-manager.yaml

@ -126,10 +126,13 @@ outputs: