From ad05860f45fbb15487cfc713ba4ea05bf947c71d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Jeanneret?= Date: Fri, 22 Mar 2019 10:28:35 +0100 Subject: [PATCH] Enable paunch logging to its full extent There were some FIXME and TODO related to paunch version. This patch activate some logging features available in newest paunch. Also, raised paunch version requirement in order to ensure we can activate the new options. Change-Id: I1df64c413373c7b8eb72baca34cf5f826d3bd51c Depends-On: https://review.openstack.org/645532 --- common/deploy-steps-tasks.yaml | 4 +--- docker/container-puppet.py | 6 ++---- lower-constraints.txt | 2 +- requirements.txt | 2 +- 4 files changed, 5 insertions(+), 9 deletions(-) diff --git a/common/deploy-steps-tasks.yaml b/common/deploy-steps-tasks.yaml index 99f3594e22..c346cad18b 100644 --- a/common/deploy-steps-tasks.yaml +++ b/common/deploy-steps-tasks.yaml @@ -491,15 +491,13 @@ # Note container-puppet.py generates the hashed-*.json file, which is a copy of # the *step_n.json with a hash of the generated external config added # This acts as a salt to enable restarting the container if config changes - # TODO(cjeanner): add --container-log-path {{ container_log_stdout_path }} once - # we have new paunch version related to - # https://review.openstack.org/#/c/635438/ - name: Start containers for step {{ step }} environment: TRIPLEO_MINOR_UPDATE: '{{ tripleo_minor_update | default(false) }}' command: >- paunch {% if enable_debug|bool %}--debug{% else %}-v{% endif %} apply --default-runtime "{{ container_cli }}" + --container-log-path "{{ container_log_stdout_path }}" --file /var/lib/tripleo-config/hashed-docker-container-startup-config-step_{{ step }}.json --config-id tripleo_step{{ step }} --managed-by tripleo-{{ tripleo_role_name }} changed_when: false diff --git a/docker/container-puppet.py b/docker/container-puppet.py index b840f47d54..09e4de8227 100755 --- a/docker/container-puppet.py +++ b/docker/container-puppet.py @@ -68,9 +68,8 @@ if not os.path.exists(config_volume_prefix): if container_cli == 'docker': cli_dcmd = ['--volume', '/usr/share/openstack-puppet/modules/:/usr/share/openstack-puppet/modules/:ro'] env = {} - # FIXME: add log=log once we have paunch 4.0.1 in Pypi and promoted in RDO RUNNER = containers_runner.DockerRunner( - 'container-puppet', cont_cmd='docker') + 'container-puppet', cont_cmd='docker', log=log) elif container_cli == 'podman': # podman doesn't allow relabeling content in /usr and # doesn't support named volumes @@ -78,9 +77,8 @@ elif container_cli == 'podman': '--volume', '/usr/share/openstack-puppet/modules/:/usr/share/openstack-puppet/modules/:ro'] # podman need to find dependent binaries that are in environment env = {'PATH': os.environ['PATH']} - # FIXME: add log=log once we have paunch 4.0.1 in Pypi and promoted in RDO RUNNER = containers_runner.PodmanRunner( - 'container-puppet', cont_cmd='podman') + 'container-puppet', cont_cmd='podman', log=log) else: log.error('Invalid container_cli: %s' % container_cli) sys.exit(1) diff --git a/lower-constraints.txt b/lower-constraints.txt index dea3987f69..75b89b9ddd 100644 --- a/lower-constraints.txt +++ b/lower-constraints.txt @@ -82,7 +82,7 @@ paramiko==2.0.0 passlib==1.7.0 Paste==2.0.2 PasteDeploy==1.5.0 -paunch==4.0.0 +paunch==4.2.0 pbr==2.0.0 pecan==1.0.0 pika-pool==0.1.3 diff --git a/requirements.txt b/requirements.txt index 7f3177f7f4..2527f95bc4 100644 --- a/requirements.txt +++ b/requirements.txt @@ -6,4 +6,4 @@ PyYAML>=3.12 # MIT Jinja2>=2.10 # BSD License (3 clause) six>=1.10.0 # MIT tripleo-common>=7.1.0 # Apache-2.0 -paunch>=4.0.0 # Apache-2.0 +paunch>=4.2.0 # Apache-2.0