Podman 1.4.1 drops json-file in favor of k8s-file

While this new name makes more sense than the "json-file" which wasn't a
json, it breaks podman invocations[0] in TripleO.

Also, moved the configuration snipped to the podman dedicated block,
since docker doesn't have that driver[1].

[0] https://github.com/containers/libpod/issues/3363
[1] https://docs.docker.com/config/containers/logging/configure/

Depends-On: https://review.opendev.org/688705
Change-Id: I3891da45e665727ab6d767514f9d24cb06da6b50
(cherry picked from commit 55e1eac892)
This commit is contained in:
Cédric Jeanneret 2019-06-19 07:43:02 +02:00
parent 57da31329e
commit 810fe06764

View File

@ -424,7 +424,6 @@ def mp_puppet_config(*args):
'--env', 'NO_ARCHIVE=%s' % os.environ.get('NO_ARCHIVE', ''),
'--env', 'STEP=%s' % os.environ.get('STEP', '6'),
'--env', 'NET_HOST=%s' % os.environ.get('NET_HOST', 'false'),
'--log-driver', 'json-file',
'--volume', '/etc/localtime:/etc/localtime:ro',
'--volume', '%s:/etc/config.pp:ro' % tmp_man.name,
'--volume', '/etc/puppet/:/tmp/puppet-etc/:ro',
@ -444,7 +443,8 @@ def mp_puppet_config(*args):
if container_cli == 'podman':
log_path = os.path.join(container_log_stdout_path, uname)
logging = ['--log-opt',
logging = ['--log-driver', 'k8s-file',
'--log-opt',
'path=%s.log' % log_path]
common_dcmd.extend(logging)