diff options
-rw-r--r-- | ci/environments/scenario001-multinode-containers.yaml | 8 | ||||
-rw-r--r-- | common/deploy-steps-tasks.yaml | 5 | ||||
-rwxr-xr-x | docker/docker-puppet.py | 14 | ||||
-rw-r--r-- | docker/services/cinder-volume.yaml | 1 | ||||
-rw-r--r-- | docker/services/nova-compute.yaml | 1 | ||||
-rw-r--r-- | puppet/services/gnocchi-metricd.yaml | 5 |
6 files changed, 27 insertions, 7 deletions
diff --git a/ci/environments/scenario001-multinode-containers.yaml b/ci/environments/scenario001-multinode-containers.yaml index 546e4c4b..082541ca 100644 --- a/ci/environments/scenario001-multinode-containers.yaml +++ b/ci/environments/scenario001-multinode-containers.yaml @@ -29,7 +29,9 @@ resource_registry: # FIXME(mandre) fluentd container image missing from tripleomaster registry # https://bugs.launchpad.net/tripleo/+bug/1721723 # OS::TripleO::Services::FluentdClient: ../../docker/services/fluentd-client.yaml - OS::TripleO::Services::FluentdClient: ../../puppet/services/logging/fluentd-client.yaml + # FIXME(mandre/bandini) mixing BM fluentd and containers is problematic + # https://bugs.launchpad.net/tripleo/+bug/1726891 + # OS::TripleO::Services::FluentdClient: ../../puppet/services/logging/fluentd-client.yaml OS::TripleO::Services::SensuClient: ../../docker/services/sensu-client.yaml # Some infra instances don't pass the ping test but are otherwise working. # Since the OVB jobs also test this functionality we can shut it off here. @@ -98,7 +100,9 @@ parameter_defaults: - OS::TripleO::Services::Congress - OS::TripleO::Services::TripleoPackages - OS::TripleO::Services::TripleoFirewall - - OS::TripleO::Services::FluentdClient + # FIXME(mandre/bandini) mixing BM fluentd and containers is problematic + # https://bugs.launchpad.net/tripleo/+bug/1726891 + #- OS::TripleO::Services::FluentdClient - OS::TripleO::Services::SensuClient - OS::TripleO::Services::Iscsid diff --git a/common/deploy-steps-tasks.yaml b/common/deploy-steps-tasks.yaml index 785095b6..79a8bc80 100644 --- a/common/deploy-steps-tasks.yaml +++ b/common/deploy-steps-tasks.yaml @@ -14,16 +14,17 @@ command: >- puppet apply {{ host_puppet_config_debug|default('') }} --modulepath=/etc/puppet/modules:/opt/stack/puppet-modules:/usr/share/openstack-puppet/modules + --detailed-exitcodes --logdest syslog --logdest console --color=false /var/lib/tripleo-config/puppet_step_config.pp - changed_when: false + changed_when: outputs.rc == 2 check_mode: no register: outputs failed_when: false no_log: true - debug: var=(outputs.stderr|default('')).split('\n')|union(outputs.stdout_lines|default([])) when: outputs is defined - failed_when: outputs|failed + failed_when: outputs.rc not in [0, 2] ###################################### # Generate config via docker-puppet.py ###################################### diff --git a/docker/docker-puppet.py b/docker/docker-puppet.py index 533ed07d..d12e0551 100755 --- a/docker/docker-puppet.py +++ b/docker/docker-puppet.py @@ -225,8 +225,14 @@ def mp_puppet_config((config_volume, puppet_tags, manifest, config_image, volume touch /tmp/the_origin_of_time sync + set +e FACTER_hostname=$HOSTNAME FACTER_uuid=docker /usr/bin/puppet apply \ - --color=false --logdest syslog --logdest console $TAGS /etc/config.pp + --detailed-exitcodes --color=false --logdest syslog --logdest console $TAGS /etc/config.pp + rc=$? + set -e + if [ $rc -ne 2 -a $rc -ne 0 ]; then + exit $rc + fi # Disables archiving if [ -z "$NO_ARCHIVE" ]; then @@ -307,7 +313,9 @@ def mp_puppet_config((config_volume, puppet_tags, manifest, config_image, volume subproc = subprocess.Popen(dcmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE, env=env) cmd_stdout, cmd_stderr = subproc.communicate() - if subproc.returncode != 0: + # puppet with --detailed-exitcodes will return 0 for success and no changes + # and 2 for success and resource changes. Other numbers are failures + if subproc.returncode not in [0, 2]: log.error('Failed running docker-puppet.py for %s' % config_volume) if cmd_stdout: log.error(cmd_stdout) @@ -355,7 +363,7 @@ returncodes = list(p.map(mp_puppet_config, process_map)) config_volumes = [pm[0] for pm in process_map] success = True for returncode, config_volume in zip(returncodes, config_volumes): - if returncode != 0: + if returncode not in [0, 2]: log.error('ERROR configuring %s' % config_volume) success = False diff --git a/docker/services/cinder-volume.yaml b/docker/services/cinder-volume.yaml index d8a93b13..46873ea8 100644 --- a/docker/services/cinder-volume.yaml +++ b/docker/services/cinder-volume.yaml @@ -125,6 +125,7 @@ outputs: step_4: cinder_volume: image: *cinder_volume_image + ipc: host net: host privileged: true restart: always diff --git a/docker/services/nova-compute.yaml b/docker/services/nova-compute.yaml index 883f438b..5163a381 100644 --- a/docker/services/nova-compute.yaml +++ b/docker/services/nova-compute.yaml @@ -115,6 +115,7 @@ outputs: step_4: nova_compute: image: &nova_compute_image {get_param: DockerNovaComputeImage} + ipc: host net: host privileged: true user: nova diff --git a/puppet/services/gnocchi-metricd.yaml b/puppet/services/gnocchi-metricd.yaml index d45d140a..1918c6e1 100644 --- a/puppet/services/gnocchi-metricd.yaml +++ b/puppet/services/gnocchi-metricd.yaml @@ -37,6 +37,10 @@ parameters: default: '%{::os_workers}' description: Number of workers for Gnocchi MetricD type: string + MetricProcessingDelay: + default: 30 + description: Delay between processing metrics. + type: number resources: GnocchiServiceBase: @@ -59,6 +63,7 @@ outputs: map_merge: - get_attr: [GnocchiServiceBase, role_data, config_settings] - gnocchi::metricd::workers: {get_param: GnocchiMetricdWorkers} + gnocchi::metricd::metric_processing_delay: {get_param: MetricProcessingDelay} step_config: | include ::tripleo::profile::base::gnocchi::metricd upgrade_tasks: |