Browse Source

puppet apply: add --summarize

... so we can know how long take resources configuration in Puppet
catalogs, and more easily debug why we have timeouts.

Change-Id: If3fae8837140caae91120e46b4880146ffe22afc
changes/13/531013/2
Emilien Macchi 4 years ago
parent
commit
eb324768d0
  1. 1
      common/deploy-steps-tasks.yaml
  2. 2
      docker/docker-puppet.py
  3. 2
      docker/services/haproxy.yaml
  4. 2
      extraconfig/pre_network/host_config_and_reboot.yaml
  5. 1
      extraconfig/tasks/run_puppet.sh
  6. 2
      puppet/services/nova-api.yaml

1
common/deploy-steps-tasks.yaml

@ -16,6 +16,7 @@
puppet apply {{ host_puppet_config_debug|default('') }}
--modulepath=/etc/puppet/modules:/opt/stack/puppet-modules:/usr/share/openstack-puppet/modules
--detailed-exitcodes
--summarize
--logdest syslog --logdest console --color=false
/var/lib/tripleo-config/puppet_step_config.pp
changed_when: outputs.rc == 2

2
docker/docker-puppet.py

@ -225,7 +225,7 @@ def mp_puppet_config((config_volume, puppet_tags, manifest, config_image, volume
sync
set +e
FACTER_hostname=$HOSTNAME FACTER_uuid=docker /usr/bin/puppet apply \
FACTER_hostname=$HOSTNAME FACTER_uuid=docker /usr/bin/puppet apply --summarize \
--detailed-exitcodes --color=false --logdest syslog --logdest console --modulepath=/etc/puppet/modules:/usr/share/openstack-puppet/modules $TAGS /etc/config.pp
rc=$?
set -e

2
docker/services/haproxy.yaml

@ -194,7 +194,7 @@ outputs:
list_join:
- '; '
- - "cp -a /tmp/puppet-etc/* /etc/puppet; echo '{\"step\": 1}' > /etc/puppet/hieradata/docker.json"
- "FACTER_uuid=docker puppet apply DEBUG --color=false --modulepath=/etc/puppet/modules:/usr/share/openstack-puppet/modules --tags TAGS -v -e 'CONFIG'"
- "FACTER_uuid=docker puppet apply DEBUG --color=false --summarize --modulepath=/etc/puppet/modules:/usr/share/openstack-puppet/modules --tags TAGS -v -e 'CONFIG'"
params:
TAGS: 'tripleo::firewall::rule'
CONFIG:

2
extraconfig/pre_network/host_config_and_reboot.yaml

@ -271,7 +271,7 @@ resources:
systemctl restart openvswitch
# DO NOT use --detailed-exitcodes
puppet apply --logdest console \
puppet apply --logdest console --summarize \
--modulepath /etc/puppet/modules:/opt/stack/puppet-modules:/usr/share/openstack-puppet/modules \
-e '
class {"vswitch::dpdk":

1
extraconfig/tasks/run_puppet.sh

@ -12,6 +12,7 @@ function run_puppet {
set +e
puppet apply --detailed-exitcodes \
--modulepath \
--summarize \
/etc/puppet/modules:/opt/stack/puppet-modules:/usr/share/openstack-puppet/modules \
"${manifest}"
rc=$?

2
puppet/services/nova-api.yaml

@ -235,7 +235,7 @@ outputs:
- name: Run puppet apply to set tranport_url in nova.conf
tags: step5
when: is_bootstrap_node
command: puppet apply --modulepath /etc/puppet/modules:/opt/stack/puppet-modules:/usr/share/openstack-puppet/modules --detailed-exitcodes /root/nova-api_upgrade_manifest.pp
command: puppet apply --summarize --modulepath /etc/puppet/modules:/opt/stack/puppet-modules:/usr/share/openstack-puppet/modules --detailed-exitcodes /root/nova-api_upgrade_manifest.pp
register: puppet_apply_nova_api_upgrade
failed_when: puppet_apply_nova_api_upgrade.rc not in [0,2]
changed_when: puppet_apply_nova_api_upgrade.rc == 2

Loading…
Cancel
Save