Merge "Add validation task in docker services [Mixed-2]"

This commit is contained in:
Zuul 2017-11-22 18:30:03 +00:00 committed by Gerrit Code Review
commit b133ce29c6
7 changed files with 75 additions and 0 deletions

@ -156,8 +156,18 @@ outputs:
- KOLLA_CONFIG_STRATEGY=COPY_ALWAYS
host_prep_tasks: {get_attr: [BarbicanApiLogging, host_prep_tasks]}
upgrade_tasks:
- name: Check if openstack-barbican-api is deployed
command: systemctl is-enabled --quiet openstack-barbican-api
tags: common
ignore_errors: True
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
- name: Stop and disable barbican_api service
tags: step2
when: barbican_enabled.rc == 0
service: name=openstack-barbican-api state=stopped enabled=no
- name: Remove openstack-barbican-api package if operator requests it
yum: name=openstack-barbican-api state=removed

@ -119,8 +119,18 @@ outputs:
/var/log/containers/collectd.
ignore_errors: true
upgrade_tasks:
- name: Check if collectd is deployed
command: systemctl is-enabled --quiet collectd
tags: common
ignore_errors: True
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
- name: Stop and disable collectd service
tags: step2
when: collectd_enabled.rc == 0
service: name=collectd.service state=stopped enabled=no
- name: Remove collectd package if operator requests it
yum: name=collectd state=removed

@ -197,8 +197,23 @@ outputs:
config_image: *keystone_config_image
host_prep_tasks: {get_attr: [KeystoneLogging, host_prep_tasks]}
upgrade_tasks:
- name: Check for keystone running under apache
tags: common
shell: "httpd -t -D DUMP_VHOSTS | grep -q keystone_wsgi"
ignore_errors: True
register: httpd_enabled
- name: Check if httpd is running
tags: common
command: systemctl is-active --quiet httpd
ignore_errors: True
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
- name: Stop and disable keystone service (running under httpd)
tags: step2
when: httpd_enabled.rc == 0 and httpd_running.rc == 0
service: name=httpd state=stopped enabled=no
- name: remove old keystone cron jobs
tags: step2

@ -115,6 +115,16 @@ outputs:
/var/log/containers/memcached.
ignore_errors: true
upgrade_tasks:
- name: Check if memcached is deployed
command: systemctl is-enabled --quiet memcached
tags: common
ignore_errors: True
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
- name: Stop and disable memcached service
tags: step2
when: memcached_enabled.rc == 0
service: name=memcached state=stopped enabled=no

@ -86,6 +86,16 @@ outputs:
- KOLLA_CONFIG_STRATEGY=COPY_ALWAYS
host_prep_tasks:
upgrade_tasks:
- name: Check if multipathd is deployed
command: systemctl is-enabled --quiet multipathd
tags: common
ignore_errors: True
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
- name: Stop and disable multipathd service
tags: step2
when: multipathd_enabled.rc == 0
service: name=multipathd state=stopped enabled=no

@ -122,6 +122,16 @@ outputs:
/var/log/containers/opendaylight.
ignore_errors: true
upgrade_tasks:
- name: Check if opendaylight is deployed
command: systemctl is-enabled --quiet opendaylight
tags: common
ignore_errors: True
register: opendaylight_enabled
- name: "PreUpgrade step0,validation: Check service opendaylight is running"
command: systemctl is-active --quiet opendaylight
when: opendaylight_enabled.rc == 0
tags: step0,validation
- name: Stop and disable opendaylight_api service
tags: step2
when: opendaylight_enabled.rc == 0
service: name=opendaylight state=stopped enabled=no

@ -225,8 +225,18 @@ outputs:
/var/log/containers/rabbitmq.
ignore_errors: true
upgrade_tasks:
- name: Check if rabbitmq server is deployed
command: systemctl is-enabled --quiet rabbitmq-server
tags: common
ignore_errors: True
register: rabbitmq_enabled
- name: "PreUpgrade step0,validation: Check service rabbitmq server is running"
command: systemctl is-active --quiet rabbitmq-server
when: rabbitmq_enabled.rc == 0
tags: step0,validation
- name: Stop and disable rabbitmq service
tags: step2
when: rabbitmq_enabled.rc == 0
service: name=rabbitmq-server state=stopped enabled=no
update_tasks:
# TODO: Are we sure we want to support this. Rolling update