Merge "Enable paunch logging to its full extent"

This commit is contained in:
Zuul 2019-03-26 21:14:47 +00:00 committed by Gerrit Code Review
commit 5859b3caed
4 changed files with 5 additions and 9 deletions

View File

@ -491,15 +491,13 @@
# Note container-puppet.py generates the hashed-*.json file, which is a copy of # 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 # 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 # 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 }} - name: Start containers for step {{ step }}
environment: environment:
TRIPLEO_MINOR_UPDATE: '{{ tripleo_minor_update | default(false) }}' TRIPLEO_MINOR_UPDATE: '{{ tripleo_minor_update | default(false) }}'
command: >- command: >-
paunch {% if enable_debug|bool %}--debug{% else %}-v{% endif %} apply paunch {% if enable_debug|bool %}--debug{% else %}-v{% endif %} apply
--default-runtime "{{ container_cli }}" --default-runtime "{{ container_cli }}"
--container-log-path "{{ container_log_stdout_path }}"
--file /var/lib/tripleo-config/hashed-docker-container-startup-config-step_{{ step }}.json --file /var/lib/tripleo-config/hashed-docker-container-startup-config-step_{{ step }}.json
--config-id tripleo_step{{ step }} --managed-by tripleo-{{ tripleo_role_name }} --config-id tripleo_step{{ step }} --managed-by tripleo-{{ tripleo_role_name }}
changed_when: false changed_when: false

View File

@ -68,9 +68,8 @@ if not os.path.exists(config_volume_prefix):
if container_cli == 'docker': if container_cli == 'docker':
cli_dcmd = ['--volume', '/usr/share/openstack-puppet/modules/:/usr/share/openstack-puppet/modules/:ro'] cli_dcmd = ['--volume', '/usr/share/openstack-puppet/modules/:/usr/share/openstack-puppet/modules/:ro']
env = {} env = {}
# FIXME: add log=log once we have paunch 4.0.1 in Pypi and promoted in RDO
RUNNER = containers_runner.DockerRunner( RUNNER = containers_runner.DockerRunner(
'container-puppet', cont_cmd='docker') 'container-puppet', cont_cmd='docker', log=log)
elif container_cli == 'podman': elif container_cli == 'podman':
# podman doesn't allow relabeling content in /usr and # podman doesn't allow relabeling content in /usr and
# doesn't support named volumes # 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'] '--volume', '/usr/share/openstack-puppet/modules/:/usr/share/openstack-puppet/modules/:ro']
# podman need to find dependent binaries that are in environment # podman need to find dependent binaries that are in environment
env = {'PATH': os.environ['PATH']} 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( RUNNER = containers_runner.PodmanRunner(
'container-puppet', cont_cmd='podman') 'container-puppet', cont_cmd='podman', log=log)
else: else:
log.error('Invalid container_cli: %s' % container_cli) log.error('Invalid container_cli: %s' % container_cli)
sys.exit(1) sys.exit(1)

View File

@ -82,7 +82,7 @@ paramiko==2.0.0
passlib==1.7.0 passlib==1.7.0
Paste==2.0.2 Paste==2.0.2
PasteDeploy==1.5.0 PasteDeploy==1.5.0
paunch==4.0.0 paunch==4.2.0
pbr==2.0.0 pbr==2.0.0
pecan==1.0.0 pecan==1.0.0
pika-pool==0.1.3 pika-pool==0.1.3

View File

@ -6,4 +6,4 @@ PyYAML>=3.12 # MIT
Jinja2>=2.10 # BSD License (3 clause) Jinja2>=2.10 # BSD License (3 clause)
six>=1.10.0 # MIT six>=1.10.0 # MIT
tripleo-common>=7.1.0 # Apache-2.0 tripleo-common>=7.1.0 # Apache-2.0
paunch>=4.0.0 # Apache-2.0 paunch>=4.2.0 # Apache-2.0