Update log-driver value for podman

Depending on the podman version, "json-file" is set to noop and makes
podman crash (true for at least podman 1.4.1), while older versions
re-add this json-file as an alias to k8s-file (true since 1.4.3).

Ensuiring we're using k8s-file will prevent issues depending on the
podman version.

Relates to https://bugzilla.redhat.com/show_bug.cgi?id=1754416
Closes-Bug: #1844856

Change-Id: I70eba8af06741ed81173689a03c4867421917cd6
This commit is contained in:
Cédric Jeanneret 2019-09-23 13:49:31 +02:00
parent f494131c2d
commit 0976e4eeb3
5 changed files with 5 additions and 5 deletions

View File

@ -28,7 +28,7 @@ LOGGING=''
CMD="ip netns exec ${NETNS} /usr/sbin/dibbler-client run"
<%- } elsif $container_cli == 'podman' { -%>
CLI="nsenter --net=/run/netns/${NETNS} --preserve-credentials -m -t 1 podman"
LOGGING="--log-driver json-file --log-opt path=/var/log/containers/stdouts/${NAME}.log"
LOGGING="--log-driver k8s-file --log-opt path=/var/log/containers/stdouts/${NAME}.log"
CMD='/usr/sbin/dibbler-client run'
<%- } else { -%>
CLI='echo noop'

View File

@ -25,7 +25,7 @@ LOGGING=''
CMD="ip netns exec ${NETNS} /usr/sbin/dnsmasq -k"
<%- } elsif $container_cli == 'podman' { -%>
CLI="nsenter --net=/run/netns/${NETNS} --preserve-credentials -m -t 1 podman"
LOGGING="--log-driver json-file --log-opt path=/var/log/containers/stdouts/${NAME}.log"
LOGGING="--log-driver k8s-file --log-opt path=/var/log/containers/stdouts/${NAME}.log"
CMD='/usr/sbin/dnsmasq -k'
<%- } else { -%>
CLI='echo noop'

View File

@ -26,7 +26,7 @@ LOGGING=''
CMD="ip netns exec ${NETNS} "'$HAPROXY'
<%- } elsif $container_cli == 'podman' { -%>
CLI="nsenter --net=/run/netns/${NETNS} --preserve-credentials -m -t 1 podman"
LOGGING="--log-driver json-file --log-opt path=/var/log/containers/stdouts/${NAME}.log"
LOGGING="--log-driver k8s-file --log-opt path=/var/log/containers/stdouts/${NAME}.log"
CMD='$HAPROXY'
<%- } else { -%>
CLI='echo noop'

View File

@ -25,7 +25,7 @@ LOGGING=''
CMD="ip netns exec ${NETNS} /usr/sbin/keepalived -n -l -D"
<%- } elsif $container_cli == 'podman' { -%>
CLI="nsenter --net=/run/netns/${NETNS} --preserve-credentials -m -t 1 podman"
LOGGING="--log-driver json-file --log-opt path=/var/log/containers/stdouts/${NAME}.log"
LOGGING="--log-driver k8s-file --log-opt path=/var/log/containers/stdouts/${NAME}.log"
CMD='/usr/sbin/keepalived -n -l -D'
<%- } else { -%>
CLI='echo noop'

View File

@ -25,7 +25,7 @@ LOGGING=''
CMD="ip netns exec qrouter-${NETWORK_ID} /usr/sbin/radvd -n"
<%- } elsif $container_cli == 'podman' { -%>
CLI="nsenter --net=/run/netns/${NETNS} --preserve-credentials -m -t 1 podman"
LOGGING="--log-driver json-file --log-opt path=/var/log/containers/stdouts/${NAME}.log"
LOGGING="--log-driver k8s-file --log-opt path=/var/log/containers/stdouts/${NAME}.log"
CMD='/usr/sbin/radvd -n'
<%- } else { -%>
CLI='echo noop'