Remove all ignore_errors to avoid confusion when debugging

- deploy-steps-tasks-step-1.yaml: Do not ignore errors when dealing
  with check-mode directories. The file module is resilient enough to
  not fail if the path is already absent.

- deploy-steps-tasks.yaml: Replace ignore_errors by another condition,
  "not ansible_check_mode"; this task is not needed in check mode.

- generate-config-tasks.yaml: Replace ignore_errors by another
  condition, "not ansible_check_mode"; this task is not needed in check mode.

- Neutron wrappers: use fail_key: False instead of ignore_errors: True
  if a key can't be found in /etc/passwd.

- All services with service checks: Replace "ignore_errors: true" by
  "failed_when: false". Since we don't care about whether or not the
  task returns 0, let's just make the task never fail. It will only
  improve UX when scrawling logs; no more failure will be shown for
  these tasks.

- Same as above for cibadmin commands, cluster resources show
  commands and keepalived container restart command; and all other shell
  or command or yum modules uses where we just don't care about their potential
  failures.

- Aodh/Gnocchi: Add pipefail so the task isn't support to fail

- tripleo-packages-baremetal-puppet and undercloud-upgrade: check shell
  rc instead of "succeeded", since the task will always succeed.

Change-Id: I0c44db40e1b9a935e7dde115bb0c9affa15c42bf
(cherry picked from commit 38bad5283f)
This commit is contained in:
Emilien Macchi 2020-03-03 11:59:14 -05:00
parent 70e2b3b6e6
commit 851bbb31e0
64 changed files with 107 additions and 106 deletions

View File

@ -51,7 +51,7 @@ outputs:
name: unbound
state: stopped
enabled: false
ignore_errors: true
failed_when: false
- name: Set resolv.conf
copy:
content: "nameserver 1.1.1.1\nnameserver 1.0.0.1"

View File

@ -42,7 +42,6 @@
- container_startup_configs
when:
- ansible_check_mode|bool
ignore_errors: true
check_mode: no
- name: Create /var/lib/tripleo-config/check-mode directory for check mode
@ -133,7 +132,6 @@
state: absent
tags:
- container_config
ignore_errors: true
check_mode: no
when:
- ansible_check_mode|bool

View File

@ -53,13 +53,13 @@
debug:
var: puppet_host_outputs.stdout_lines | default([]) | union(puppet_host_outputs.stderr_lines | default([]))
when:
- not ansible_check_mode|bool
- enable_puppet | bool
- puppet_host_outputs.rc is defined
changed_when: puppet_host_outputs.rc == 2
failed_when: puppet_host_outputs.rc not in [0, 2]
tags:
- host_config
ignore_errors: "{{ ansible_check_mode|bool }}"
#########################################
# Pre-cache facts for container-puppet.py

View File

@ -35,9 +35,10 @@
- name: "Debug output for task: Run container-puppet tasks (generate config) during step 1"
debug:
var: generate_config_outputs.stdout_lines | default([]) | union(generate_config_outputs.stderr_lines | default([]))
when: generate_config_outputs.rc is defined
when:
- not (ansible_check_mode | bool)
- generate_config_outputs.rc is defined
failed_when: generate_config_outputs.rc != 0
ignore_errors: "{{ ansible_check_mode|bool }}"
- name: Block for container-puppet tasks (generate config) during step {{ step }} with tripleo-ansible
when:

View File

@ -272,14 +272,15 @@ outputs:
block:
- name: Check for aodh running under apache
tags: common
shell: "httpd -t -D DUMP_VHOSTS | grep -q aodh_wsgi"
ignore_errors: true
shell: |-
set -o pipefail
httpd -t -D DUMP_VHOSTS | grep -q aodh_wsgi
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
ignore_errors: True
failed_when: false
command: systemctl is-active --quiet httpd
register: httpd_running_result
when:

View File

@ -137,7 +137,7 @@ outputs:
block:
- name: FFU check if openstack-aodh-evaluator is deployed
command: systemctl is-enabled --quiet openstack-aodh-evaluator
ignore_errors: True
failed_when: false
register: aodh_evaluator_enabled_result
- name: Set fact aodh_evaluator_enabled
set_fact:

View File

@ -137,7 +137,7 @@ outputs:
block:
- name: FFU check if openstack-aodh-listener is deployed
command: systemctl is-enabled --quiet openstack-aodh-listener
ignore_errors: True
failed_when: false
register: aodh_listener_enabled_result
- name: Set fact aodh_listener_enabled
set_fact:

View File

@ -138,7 +138,7 @@ outputs:
block:
- name: FFU check if openstack-aodh-notifier is deployed
command: systemctl is-enabled --quiet openstack-aodh-notifier
ignore_errors: True
failed_when: false
register: aodh_notifier_enabled_result
- name: Set fact aodh_notifier_enabled
set_fact:

View File

@ -195,7 +195,7 @@ outputs:
block:
- name: FFU check if openstack-ceilometer-central is deployed
command: systemctl is-enabled --quiet openstack-ceilometer-central
ignore_errors: True
failed_when: false
register: ceilometer_agent_central_enabled_result
- name: Set fact ceilometer_agent_central_enabled
set_fact:

View File

@ -132,7 +132,7 @@ outputs:
block:
- name: FFU check if openstack-ceilometer-compute is deployed
command: systemctl is-enabled openstack-ceilometer-compute
ignore_errors: True
failed_when: false
register: ceilometer_agent_compute_enabled_result
- name: Set fact ceilometer_agent_compute_enabled
set_fact:

View File

@ -145,7 +145,7 @@ outputs:
block:
- name: FFU check if openstack-ceilometer-ipmi is enabled
command: systemctl is-enabled openstack-ceilometer-ipmi
ignore_errors: True
failed_when: false
register: ceilometer_ipmi_enabled_result
- name: Set fact ceilometer_ipmi_enabled
set_fact:

View File

@ -171,7 +171,7 @@ outputs:
block:
- name: FFU check if openstack-ceilometer-notification is deployed
command: systemctl is-enabled openstack-ceilometer-notification
ignore_errors: True
failed_when: false
register: ceilometer_agent_notification_enabled_result
- name: Set fact ceilometer_agent_notification_enabled
set_fact:

View File

@ -407,7 +407,7 @@ outputs:
block:
- name: Check is cinder_api is deployed
command: systemctl is-enabled --quiet openstack-cinder-api
ignore_errors: True
failed_when: false
register: cinder_api_enabled_result
- name: Set fact cinder_api_enabled
set_fact:

View File

@ -163,7 +163,7 @@ outputs:
block:
- name: Check if cinder_scheduler is deployed
command: systemctl is-enabled --quiet openstack-cinder-scheduler
ignore_errors: True
failed_when: false
register: cinder_scheduler_enabled_result
- name: Set fact cinder_scheduler_enabled
set_fact:

View File

@ -340,7 +340,7 @@ outputs:
block:
- name: Check if cinder_volume is deployed
command: systemctl is-enabled --quiet openstack-cinder-volume
ignore_errors: True
failed_when: false
register: cinder_volume_enabled_result
- name: Set fact cinder_volume_enabled
set_fact:

View File

@ -397,7 +397,7 @@ outputs:
resource: openstack-cinder-volume
state: show
check_mode: false
ignore_errors: true
failed_when: false
register: cinder_volume_res_result
- name: Set fact cinder_volume_res
set_fact:

View File

@ -444,7 +444,7 @@ outputs:
block:
- name: Check Mysql logging configuration in pacemaker
command: cibadmin --query --xpath "//storage-mapping[@id='mysql-log']"
ignore_errors: true
failed_when: false
register: mysql_logs_moved
- name: Change Mysql logging configuration in pacemaker
# rc == 6 means the configuration doesn't exist in the CIB

View File

@ -387,7 +387,7 @@ outputs:
block:
- name: Check redis logging configuration in pacemaker
command: cibadmin --query --xpath "//storage-mapping[@id='redis-log' and @source-dir='/var/log/containers/redis']"
ignore_errors: true
failed_when: false
register: redis_logs_moved
- name: Change redis logging configuration in pacemaker
# rc == 6 means the configuration doesn't exist in the CIB
@ -463,7 +463,7 @@ outputs:
resource: {get_attr: [RedisBase, role_data, service_name]}
state: show
check_mode: false
ignore_errors: true
failed_when: false
register: redis_res_result
- name: Set fact redis_res
set_fact:

View File

@ -697,7 +697,7 @@ outputs:
block:
- name: Check if glance_api is deployed
command: systemctl is-enabled --quiet openstack-glance-api
ignore_errors: True
failed_when: false
register: glance_api_enabled_result
- name: Set fact glance_api_enabled
set_fact:

View File

@ -391,7 +391,7 @@ outputs:
- name: Check if httpd service is running
command: systemctl is-active --quiet httpd
tags: common
ignore_errors: True
failed_when: false
register: httpd_running_result
when:
- httpd_running is undefined
@ -403,15 +403,16 @@ outputs:
- name: Check if gnocchi_api is deployed
command: systemctl is-enabled --quiet openstack-gnocchi-api
tags: common
ignore_errors: True
failed_when: false
register: gnocchi_api_enabled_result
- name: Set fact gnocchi_api_enabled
set_fact:
gnocchi_api_enabled: "{{ gnocchi_api_enabled_result.rc == 0 }}"
- name: Check for gnocchi_api running under apache
tags: common
shell: "httpd -t -D DUMP_VHOSTS | grep -q gnocchi"
ignore_errors: True
shell: |-
set -o pipefail
httpd -t -D DUMP_VHOSTS | grep -q gnocchi
register: gnocchi_httpd_enabled_result
- name: Set fact gnocchi_httpd_enabled
set_fact:

View File

@ -192,7 +192,7 @@ outputs:
block:
- name: FFU check if openstack-gnocchi-metricd is deployed
command: systemctl is-enabled --quiet openstack-gnocchi-metricd
ignore_errors: True
failed_when: false
register: gnocchi_metricd_enabled_result
- name: Set fact gnocchi_metricd_enabled
set_fact:

View File

@ -182,7 +182,7 @@ outputs:
fast_forward_upgrade_tasks:
- name: FFU check if openstack-gnocchi-statsd is deployed
command: systemctl is-enabled --quiet openstack-gnocchi-statsd
ignore_errors: True
failed_when: false
register: gnocchi_statsd_enabled_result
when:
- step|int == 0

View File

@ -378,7 +378,7 @@ outputs:
block:
- name: Check haproxy public certificate configuration in pacemaker
command: cibadmin --query --xpath "//storage-mapping[@id='haproxy-cert']"
ignore_errors: true
failed_when: false
register: haproxy_cert_mounted
- name: Disable the haproxy cluster resource
pacemaker_resource:
@ -489,11 +489,11 @@ outputs:
block:
- name: Check haproxy stats socket configuration in pacemaker
command: cibadmin --query --xpath "//storage-mapping[@id='haproxy-var-lib']"
ignore_errors: true
failed_when: false
register: haproxy_stats_exposed
- name: Check haproxy public certificate configuration in pacemaker
command: cibadmin --query --xpath "//storage-mapping[@id='haproxy-cert']"
ignore_errors: true
failed_when: false
register: haproxy_cert_mounted
- name: Add a bind mount for stats socket in the haproxy bundle
command: pcs resource bundle update haproxy-bundle storage-map add id=haproxy-var-lib source-dir=/var/lib/haproxy target-dir=/var/lib/haproxy options=rw

View File

@ -236,7 +236,7 @@ outputs:
block:
- name: FFU check if openstack-heat-api-cfn service is enabled
command: systemctl is-enabled openstack-heat-api-cfn
ignore_errors: True
failed_when: false
register: heat_api_cfn_enabled_result
- name: Set fact heat_api_cfn_enabled
set_fact:

View File

@ -44,7 +44,7 @@ outputs:
block:
- name: FFU check if heat_api_cloudwatch is deployed
command: systemctl is-enabled openstack-heat-api-cloudwatch
ignore_errors: True
failed_when: false
register: heat_api_cloudwatch_enabled_result
- name: Set fact heat_api_cloudwatch_enabled
set_fact:
@ -57,7 +57,7 @@ outputs:
- heat_api_cloudwatch_enabled|bool
- name: Remove heat_api_cloudwatch package
package: name=openstack-heat-api-cloudwatch state=removed
ignore_errors: True
failed_when: false
when:
- step|int == 2
- release == 'rocky'

View File

@ -298,7 +298,7 @@ outputs:
block:
- name: FFU check openstack-heat-api is enabled
command: systemctl is-enabled openstack-heat-api
ignore_errors: True
failed_when: false
register: heat_api_enabled_result
- name: Set fact heat_api_enabled
set_fact:

View File

@ -299,7 +299,7 @@ outputs:
block:
- name: FFU check if openstack-heat-engine is enabled
command: systemctl is-enabled --quiet openstack-heat-engine
ignore_errors: True
failed_when: false
register: heat_engine_enabled_result
- name: Set fact heat_engine_enabled
set_fact:

View File

@ -298,7 +298,7 @@ outputs:
block:
- name: Check if ironic_api is deployed
command: systemctl is-enabled --quiet openstack-ironic-api
ignore_errors: True
failed_when: false
register: ironic_api_enabled_result
- name: Set fact ironic_api_enabled
set_fact:

View File

@ -591,7 +591,7 @@ outputs:
block:
- name: Check if ironic_conductor is deployed
command: systemctl is-enabled --quiet openstack-ironic-conductor
ignore_errors: True
failed_when: false
register: ironic_conductor_enabled_result
- name: Set fact ironic_conductor_enabled
set_fact:

View File

@ -113,7 +113,7 @@ outputs:
when: stat_iscsid_socket.stat.exists
- name: Check if iscsi.service is enabled
command: systemctl is-enabled --quiet iscsi.service
ignore_errors: True
failed_when: false
register: iscsi_service_enabled_result
- name: Stop iscsi.service
service: name=iscsi.service state=stopped enabled=no

View File

@ -136,7 +136,7 @@ outputs:
- name: Restart Keepalived container
shell: "{{container_cli}} restart keepalived"
when: restart_keepalived|bool
ignore_errors: True
failed_when: false
- name: load ip_vs module
import_role:
name: tripleo-module-load

View File

@ -758,13 +758,13 @@ outputs:
- name: Check for keystone running under apache
tags: common
shell: "httpd -t -D DUMP_VHOSTS | grep -q keystone_wsgi"
ignore_errors: true
failed_when: false
register: keystone_httpd_enabled_result
- name: Set fact keystone_httpd_enabled
set_fact:
keystone_httpd_enabled: "{{ keystone_httpd_enabled_result.rc == 0 }}"
- name: Check if httpd is running
ignore_errors: True
failed_when: false
command: systemctl is-active --quiet httpd
register: httpd_running_result
when:

View File

@ -256,7 +256,7 @@ outputs:
fast_forward_upgrade_tasks:
- name: Check if manila_api is deployed
command: systemctl is-enabled --quiet openstack-manila-api
ignore_errors: True
failed_when: false
register: manila_api_enabled_result
when:
- step|int == 0

View File

@ -119,7 +119,7 @@ outputs:
fast_forward_upgrade_tasks:
- name: Check if manila_scheduler is deployed
command: systemctl is-enabled --quiet openstack-manila-scheduler
ignore_errors: True
failed_when: false
register: manila_scheduler_enabled_result
when:
- step|int == 0

View File

@ -174,7 +174,7 @@ outputs:
fast_forward_upgrade_tasks:
- name: Check if manila_share is deployed
command: systemctl is-enabled --quiet openstack-manila-share
ignore_errors: True
failed_when: false
register: manila_share_enabled_result
when:
- step|int == 0

View File

@ -379,7 +379,7 @@ outputs:
resource: openstack-manila-share
state: show
check_mode: false
ignore_errors: true
failed_when: false
register: manila_share_res_result
when:
- step|int == 0

View File

@ -194,7 +194,7 @@ outputs:
- name: Check if memcached is deployed
command: systemctl is-enabled --quiet memcached
tags: common
ignore_errors: True
failed_when: false
register: memcached_enabled_result
- name: memcached_enabled
set_fact:

View File

@ -662,7 +662,7 @@ outputs:
block:
- name: Check if collectd.service is deployed
command: systemctl is-enabled --quiet collectd.service
ignore_errors: True
failed_when: false
register: collectd_enabled_result
- name: Set fact collectd_enabled
set_fact:

View File

@ -136,7 +136,7 @@ outputs:
host_prep_tasks:
- name: Check if multipathd is deployed on the host
command: systemctl is-enabled --quiet multipathd
ignore_errors: True
failed_when: false
register: multipathd_enabled_result
- name: Set fact multipathd_enabled
set_fact:

View File

@ -542,7 +542,7 @@ outputs:
block:
- name: Check if neutron_server is deployed
command: systemctl is-enabled --quiet neutron-server
ignore_errors: True
failed_when: false
register: neutron_server_enabled_result
- name: Set fact neutron_server_enabled
set_fact:
@ -565,7 +565,7 @@ outputs:
package: name=python-networking-odl state=latest
# package python-networking-cisco may or may not be present
- name: Networking cisco db sync workaround
ignore_errors: true
failed_when: false
package: name=python-networking-cisco state=latest
- name: Neutron db sync
command: neutron-db-manage upgrade head

View File

@ -405,10 +405,10 @@ outputs:
- - name: create /run/netns with temp namespace
command: ip netns add ns_temp
register: ipnetns_add_result
ignore_errors: True
failed_when: false
- - name: remove temp namespace
command: ip netns delete ns_temp
ignore_errors: True
failed_when: false
when: ipnetns_add_result.rc == 0
- - name: create /var/lib/neutron
file:
@ -428,7 +428,7 @@ outputs:
block:
- name: Check if neutron_dhcp_agent is deployed
command: systemctl is-enabled --quiet neutron-dhcp-agent
ignore_errors: True
failed_when: false
register: neutron_dhcp_agent_enabled_result
- name: Set fact neutron_dhcp_agent_enabled
set_fact:
@ -444,7 +444,7 @@ outputs:
getent:
database: passwd
key: neutron
ignore_errors: True
fail_key: false
- name: Set neutron_user_avail
set_fact:
neutron_user_avail: "{{ getent_passwd is defined }}"
@ -460,7 +460,7 @@ outputs:
setfacl -R -m u:neutron:rw /var/lib/neutron
find /var/lib/neutron -type d -exec setfacl -m u:neutron:rwx '{}' \;
- name: Provide access for domain sockets
ignore_errors: True
failed_when: false
become: true
shell: |
umask 0002
@ -469,4 +469,4 @@ outputs:
- /var/lib/neutron/metadata_proxy
- /var/lib/neutron
# These files are not necessarily present
ignore_errors: True
failed_when: false

View File

@ -361,10 +361,10 @@ outputs:
- - name: create /run/netns with temp namespace
command: ip netns add ns_temp
register: ipnetns_add_result
ignore_errors: True
failed_when: false
- - name: remove temp namespace
command: ip netns delete ns_temp
ignore_errors: True
failed_when: false
when: ipnetns_add_result.rc == 0
- - name: create /var/lib/neutron
file:
@ -384,7 +384,7 @@ outputs:
block:
- name: Check if neutron_l3_agent is deployed
command: systemctl is-enabled --quiet neutron-l3-agent
ignore_errors: True
failed_when: false
register: neutron_l3_agent_enabled_result
- name: Set fact neutron_l3_agent_enabled
set_fact:
@ -400,7 +400,7 @@ outputs:
getent:
database: passwd
key: neutron
ignore_errors: True
fail_key: false
- name: Set neutron_user_avail
set_fact:
neutron_user_avail: "{{ getent_passwd is defined }}"
@ -425,4 +425,4 @@ outputs:
- /var/lib/neutron/keepalived-state-change
- /var/lib/neutron
# These files are not necessarily present
ignore_errors: True
failed_when: false

View File

@ -217,7 +217,7 @@ outputs:
block:
- name: Check if neutron_metadata_agent is deployed
command: systemctl is-enabled --quiet neutron-metadata-agent
ignore_errors: True
failed_when: false
register: neutron_metadata_agent_enabled_result
- name: Set fact neutron_metadata_agent_enabled
set_fact:
@ -233,7 +233,7 @@ outputs:
getent:
database: passwd
key: neutron
ignore_errors: True
fail_key: false
- name: Set neutron_user_avail
set_fact:
neutron_user_avail: "{{ getent_passwd is defined }}"
@ -258,4 +258,4 @@ outputs:
- /var/lib/neutron/keepalived-state-change
- /var/lib/neutron
# These files are not necessarily present
ignore_errors: True
failed_when: false

View File

@ -396,7 +396,7 @@ outputs:
block:
- name: Check if neutron_ovs_agent is deployed
command: systemctl is-enabled --quiet neutron-openvswitch-agent
ignore_errors: True
failed_when: false
register: neutron_ovs_agent_enabled_result
- name: Set fact neutron_ovs_agent_enabled
set_fact:

View File

@ -486,7 +486,7 @@ outputs:
delay: 30
until: nova_api_healthcheck_state.status.ExecMainPID != '0' and
nova_api_healthcheck_state.status.ActiveState in ['inactive', 'failed']
ignore_errors: yes
failed_when: false
- name: Fail if nova-api healthcheck report failed status
fail:
msg: nova-api isn't working (healthcheck failed)
@ -524,7 +524,7 @@ outputs:
block:
- name: Check if nova-api is deployed
command: systemctl is-enabled --quiet openstack-nova-api
ignore_errors: True
failed_when: false
register: nova_api_enabled_result
- name: Set fact nova_api_enabled
set_fact:

View File

@ -1049,7 +1049,7 @@ outputs:
delay: 30
until: nova_compute_healthcheck_state.status.ExecMainPID != '0' and
nova_compute_healthcheck_state.status.ActiveState in ['inactive', 'failed']
ignore_errors: yes
failed_when: false
- name: Fail if nova-compute healthcheck report failed status
fail:
msg: nova-compute isn't working (healthcheck failed)
@ -1062,7 +1062,7 @@ outputs:
- openstack-nova-compute
- python-nova
state: removed
ignore_errors: True
failed_when: false
when: step|int == 2
update_tasks:
- name: Remove openstack-nova-compute and python-nova package during upgrade
@ -1071,7 +1071,7 @@ outputs:
- openstack-nova-compute
- python-nova
state: removed
ignore_errors: True
failed_when: false
when: step|int == 2
scale_tasks:
- when: step|int == 1
@ -1146,7 +1146,7 @@ outputs:
block:
- name: Check if nova-compute is deployed
command: systemctl is-enabled --quiet openstack-nova-compute
ignore_errors: True
failed_when: false
register: nova_compute_enabled_result
- name: Set fact nova_compute_enabled
set_fact:

View File

@ -214,7 +214,7 @@ outputs:
delay: 30
until: nova_conductor_healthcheck_state.status.ExecMainPID != '0' and
nova_conductor_healthcheck_state.status.ActiveState in ['inactive', 'failed']
ignore_errors: yes
failed_when: false
- name: Fail if nova-conductor healthcheck report failed status
fail:
msg: nova-conductor isn't working (healthcheck failed)
@ -249,7 +249,7 @@ outputs:
block:
- name: Check if nova_conductor is deployed
command: systemctl is-enabled --quiet openstack-nova-conductor
ignore_errors: True
failed_when: false
register: nova_conductor_enabled_result
- name: Set fact nova_conductor_enabled
set_fact:

View File

@ -813,7 +813,7 @@ outputs:
delay: 30
until: nova_libvirt_healthcheck_state.status.ExecMainPID != '0' and
nova_libvirt_healthcheck_state.status.ActiveState in ['inactive', 'failed']
ignore_errors: yes
failed_when: false
- name: Fail if nova-libvirt healthcheck report failed status
fail:
msg: nova-libvirt isn't working (healtcheck failed)

View File

@ -255,7 +255,7 @@ outputs:
delay: 30
until: nova_metadata_healthcheck_state.status.ExecMainPID != '0' and
nova_metadata_healthcheck_state.status.ActiveState in ['inactive', 'failed']
ignore_errors: yes
failed_when: false
- name: Fail if nova-metadata healthcheck report failed status
fail:
msg: nova-metadata isn't working (healthcheck failed)

View File

@ -189,7 +189,7 @@ outputs:
delay: 30
until: nova_migration_target_healthcheck_state.status.ExecMainPID != '0' and
nova_migration_target_healthcheck_state.status.ActiveState in ['inactive', 'failed']
ignore_errors: yes
failed_when: false
- name: Fail if nova-migration-target healthcheck report failed status
fail:
msg: nova-migration-target isn't working (healtcheck failed)

View File

@ -204,7 +204,7 @@ outputs:
delay: 30
until: nova_scheduler_healthcheck_state.status.ExecMainPID != '0' and
nova_scheduler_healthcheck_state.status.ActiveState in ['inactive', 'failed']
ignore_errors: yes
failed_when: false
- name: Fail if nova-scheduler healthcheck report failed status
fail:
msg: nova-scheduler isn't working (healthcheck failed)
@ -224,7 +224,7 @@ outputs:
block:
- name: Check if nova_scheduler is deployed
command: systemctl is-enabled --quiet openstack-nova-scheduler
ignore_errors: True
failed_when: false
register: nova_scheduler_enabled_result
- name: Set fact nova_scheduler_enabled
set_fact:

View File

@ -300,7 +300,7 @@ outputs:
delay: 30
until: nova_vnc_proxy_healthcheck_state.status.ExecMainPID != '0' and
nova_vnc_proxy_healthcheck_state.status.ActiveState in ['inactive', 'failed']
ignore_errors: yes
failed_when: false
- name: Fail if nova-vnc-proxy healtcheck report failed status
fail:
msg: nova-vnc-proxy isn't working (healthcheck failed)
@ -328,7 +328,7 @@ outputs:
block:
- name: Check if nova vncproxy is deployed
command: systemctl is-enabled --quiet openstack-nova-novncproxy
ignore_errors: True
failed_when: false
register: nova_vncproxy_enabled_result
- name: Set fact nova_vncproxy_enabled
set_fact:

View File

@ -348,10 +348,10 @@ outputs:
- - name: create /run/netns with temp namespace
command: ip netns add ns_temp
register: ipnetns_add_result
ignore_errors: True
failed_when: false
- - name: remove temp namespace
command: ip netns delete ns_temp
ignore_errors: True
failed_when: false
when: ipnetns_add_result.rc == 0
- - name: create /var/lib/neutron
file:

View File

@ -342,7 +342,7 @@ outputs:
block:
- name: Check rabbitmq logging configuration in pacemaker
command: cibadmin --query --xpath "//storage-mapping[@id='rabbitmq-log']"
ignore_errors: true
failed_when: false
register: rabbitmq_logs_moved
- name: Add a bind mount for logging in the rabbitmq bundle
# rc == 6 means the configuration doesn't exist in the CIB
@ -437,7 +437,7 @@ outputs:
resource: {get_attr: [RabbitmqBase, role_data, service_name]}
state: show
check_mode: false
ignore_errors: true
failed_when: false
register: rabbitmq_res_result
- name: Set fact rabbitmq_res
set_fact:

View File

@ -343,7 +343,7 @@ outputs:
block:
- name: Check rabbitmq logging configuration in pacemaker
command: cibadmin --query --xpath "//storage-mapping[@id='rabbitmq-log']"
ignore_errors: true
failed_when: false
register: rabbitmq_logs_moved
- name: Add a bind mount for logging in the rabbitmq bundle
# rc == 6 means the configuration doesn't exist in the CIB
@ -424,7 +424,7 @@ outputs:
resource: {get_attr: [RabbitmqBase, role_data, service_name]}
state: show
check_mode: false
ignore_errors: true
failed_when: false
register: rabbitmq_res_result
- name: Set fact rabbitmq_res
set_fact:

View File

@ -348,7 +348,7 @@ outputs:
block:
- name: Check rabbitmq logging configuration in pacemaker
command: cibadmin --query --xpath "//storage-mapping[@id='rabbitmq-log']"
ignore_errors: true
failed_when: false
register: rabbitmq_logs_moved
- name: Add a bind mount for logging in the rabbitmq bundle
# rc == 6 means the configuration doesn't exist in the CIB
@ -443,7 +443,7 @@ outputs:
resource: {get_attr: [RabbitmqBase, role_data, service_name]}
state: show
check_mode: false
ignore_errors: true
failed_when: false
register: rabbitmq_res_result
- name: Set fact rabbitmq_res
set_fact:

View File

@ -219,7 +219,7 @@ outputs:
block:
- name: FFU check openstack-sahara-api is enabled
command: systemctl is-enabled openstack-sahara-api
ignore_errors: True
failed_when: false
register: sahara_api_enabled_result
- name: Set fact sahara_api_enabled
set_fact:

View File

@ -141,7 +141,7 @@ outputs:
block:
- name: FFU check if openstack-sahara-engine is enabled
command: systemctl is-enabled --quiet openstack-sahara-engine
ignore_errors: True
failed_when: false
register: sahara_engine_enabled_result
- name: Set fact sahara_engine_enabled
set_fact:

View File

@ -93,7 +93,7 @@ outputs:
block:
- name: Check if snmpd is enabled
command: systemctl is-enabled --quiet snmpd
ignore_errors: True
failed_when: false
register: snmpd_enabled_result
- name: Set fact snmpd_enabled
set_fact:

View File

@ -479,7 +479,7 @@ outputs:
block:
- name: Check if swift-proxy or swift-object-expirer are deployed
command: systemctl is-enabled --quiet "{{ item }}"
ignore_errors: True
failed_when: false
register: swift_proxy_services_enabled_result
with_items:
- openstack-swift-proxy

View File

@ -688,7 +688,7 @@ outputs:
- openstack-swift-object-updater
- openstack-swift-object
- openstack-swift-object-reconstructor
ignore_errors: True
failed_when: false
register: swift_services_enabled_result
- name: Set fact swift_services_enabled
set_fact:

View File

@ -241,7 +241,7 @@ outputs:
set -o pipefail
yum info -q rhosp-openvswitch | awk '/^Version/{print $NF}'
register: rhosp_package_result
ignore_errors: true
failed_when: false
- name: Set fact for triggering OpenvSwitch layered product package handling
set_fact:
ovs_lp_packaging: "{{ rhosp_package_result.rc == 0 }}"
@ -295,13 +295,13 @@ outputs:
block:
- name: check if an upgrade is required
register: ovs_need_upgrade
ignore_errors: true
failed_when: false
shell: |
yum check-upgrade openvswitch | awk '/openvswitch/{print}'
- name: Check openvswitch packaging.
shell: rpm -q --scripts openvswitch | awk '/postuninstall/,/*/' | grep -q "systemctl.*try-restart"
register: ovs_packaging_issue
ignore_errors: true
failed_when: false
- name: Upgrade openvswitch
block:
- name: "Ensure empty directory: emptying."
@ -332,7 +332,7 @@ outputs:
when:
- step|int == 2
- run_ovs_update|bool
- ovs_packaging_issue|default(false)|succeeded
- ovs_packaging_issue.rc == 0 | default(false)
- ovs_need_upgrade.stdout|default('')
- name: Install libibverbs (https://bugs.launchpad.net/tripleo/+bug/1817743)
when: step|int == 2
@ -356,7 +356,7 @@ outputs:
- name: Check that os-net-config has configuration
shell: test -s /etc/os-net-config/config.json
register: os_net_config_has_config
ignore_errors: True
failed_when: false
when: step|int == 3
- block:
- name: Upgrade os-net-config

View File

@ -89,7 +89,7 @@ outputs:
set -o pipefail
yum info -q rhosp-openvswitch | awk '/^Version/{print $NF}'
register: rhosp_package_result
ignore_errors: true
failed_when: false
- name: Set fact for triggering OpenvSwitch layered product package handling
set_fact:
ovs_lp_packaging: "{{ rhosp_package_result.rc == 0 }}"
@ -143,13 +143,13 @@ outputs:
block:
- name: check if an upgrade is required
register: ovs_need_upgrade
ignore_errors: true
failed_when: false
shell: |
yum check-upgrade openvswitch | awk '/openvswitch/{print}'
- name: Check openvswitch packaging.
shell: rpm -q --scripts openvswitch | awk '/postuninstall/,/*/' | grep -q "systemctl.*try-restart"
register: ovs_packaging_issue
ignore_errors: true
failed_when: false
- name: Upgrade openvswitch
block:
- name: "Ensure empty directory: emptying."
@ -180,7 +180,7 @@ outputs:
when:
- step|int == 2
- run_ovs_update|bool
- ovs_packaging_issue|default(false)|succeeded
- ovs_packaging_issue.rc == 0 | default(false)
- ovs_need_upgrade.stdout|default('')
# The openvswitch package disables the systemd service on install. When installing
# the layered product we prevent the service from being killed, but it doesn't

View File

@ -57,7 +57,7 @@ outputs:
- name: Check if vpp is deployed
command: systemctl is-enabled vpp
tags: common
ignore_errors: True
failed_when: false
register: vpp_enabled
- name: "PreUpgrade step0,validation: Check service vpp is running"
shell: /usr/bin/systemctl show 'vpp' --property ActiveState | grep '\bactive\b'