diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2020-05-20 21:25:27 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-05-20 21:25:27 +0200 |
commit | b5a134262b29e1b261860e0dedab18ee07322fce (patch) | |
tree | d053fb4dcdd4bb9c20b36ce5a631afeb40d3cc23 /libpod | |
parent | b0bfa0e6da7d1cb0673328cdcff18329ca18cabf (diff) | |
parent | d2d338b7ec5148e349b94d8ba606f69e6408910b (diff) | |
download | podman-b5a134262b29e1b261860e0dedab18ee07322fce.tar.gz podman-b5a134262b29e1b261860e0dedab18ee07322fce.tar.bz2 podman-b5a134262b29e1b261860e0dedab18ee07322fce.zip |
Merge pull request #6291 from haircommander/journald-container-name
oci conmon: tell conmon to log container name
Diffstat (limited to 'libpod')
-rw-r--r-- | libpod/oci_conmon_linux.go | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/libpod/oci_conmon_linux.go b/libpod/oci_conmon_linux.go index 895a67747..7ba36fe7c 100644 --- a/libpod/oci_conmon_linux.go +++ b/libpod/oci_conmon_linux.go @@ -1347,15 +1347,21 @@ func (r *ConmonOCIRuntime) configureConmonEnv(runtimeDir string) ([]string, []*o // sharedConmonArgs takes common arguments for exec and create/restore and formats them for the conmon CLI func (r *ConmonOCIRuntime) sharedConmonArgs(ctr *Container, cuuid, bundlePath, pidPath, logPath, exitDir, ociLogPath, logTag string) []string { // set the conmon API version to be able to use the correct sync struct keys - args := []string{"--api-version", "1"} + args := []string{ + "--api-version", "1", + "-c", ctr.ID(), + "-u", cuuid, + "-r", r.path, + "-b", bundlePath, + "-p", pidPath, + "-n", ctr.Name(), + "--exit-dir", exitDir, + "--socket-dir-path", r.socketsDir, + } + if r.cgroupManager == config.SystemdCgroupsManager && !ctr.config.NoCgroups { args = append(args, "-s") } - args = append(args, "-c", ctr.ID()) - args = append(args, "-u", cuuid) - args = append(args, "-r", r.path) - args = append(args, "-b", bundlePath) - args = append(args, "-p", pidPath) var logDriver string switch ctr.LogDriver() { @@ -1376,8 +1382,6 @@ func (r *ConmonOCIRuntime) sharedConmonArgs(ctr *Container, cuuid, bundlePath, p } args = append(args, "-l", logDriver) - args = append(args, "--exit-dir", exitDir) - args = append(args, "--socket-dir-path", r.socketsDir) if r.logSizeMax >= 0 { args = append(args, "--log-size-max", fmt.Sprintf("%v", r.logSizeMax)) } |