diff options
author | Dan Williams <dcbw@redhat.com> | 2020-03-06 09:58:37 -0600 |
---|---|---|
committer | Dan Williams <dcbw@redhat.com> | 2020-03-06 10:03:27 -0600 |
commit | 74ddc0b6967bd0e40c901e077880a02a59733dcc (patch) | |
tree | 07ca5867fb16f39f0a77f6896f076ee5a73a9e40 /vendor/github.com/containernetworking/cni/pkg/invoke | |
parent | f07e18f05c07026e4544788a1359122c81adcde7 (diff) | |
download | podman-74ddc0b6967bd0e40c901e077880a02a59733dcc.tar.gz podman-74ddc0b6967bd0e40c901e077880a02a59733dcc.tar.bz2 podman-74ddc0b6967bd0e40c901e077880a02a59733dcc.zip |
vendor: update github.com/containernetworking/cni to v0.7.2-0.20200304161608-4fae32b84921
Specifically to get:
https://github.com/containernetworking/cni/pull/735
6f29b0165883b2b52ccd4dcb937162ea4c86927b intercept netplugin std err
But also pulls in some interface name validation and a compatibility
fix for configurations that don't set a CNI version.
Signed-off-by: Dan Williams <dcbw@redhat.com>
Diffstat (limited to 'vendor/github.com/containernetworking/cni/pkg/invoke')
-rw-r--r-- | vendor/github.com/containernetworking/cni/pkg/invoke/args.go | 4 | ||||
-rw-r--r-- | vendor/github.com/containernetworking/cni/pkg/invoke/raw_exec.go | 8 |
2 files changed, 8 insertions, 4 deletions
diff --git a/vendor/github.com/containernetworking/cni/pkg/invoke/args.go b/vendor/github.com/containernetworking/cni/pkg/invoke/args.go index d31a44e87..3cdb4bc8d 100644 --- a/vendor/github.com/containernetworking/cni/pkg/invoke/args.go +++ b/vendor/github.com/containernetworking/cni/pkg/invoke/args.go @@ -60,8 +60,8 @@ func (args *Args) AsEnv() []string { pluginArgsStr = stringify(args.PluginArgs) } - // Duplicated values which come first will be overrided, so we must put the - // custom values in the end to avoid being overrided by the process environments. + // Duplicated values which come first will be overridden, so we must put the + // custom values in the end to avoid being overridden by the process environments. env = append(env, "CNI_COMMAND="+args.Command, "CNI_CONTAINERID="+args.ContainerID, diff --git a/vendor/github.com/containernetworking/cni/pkg/invoke/raw_exec.go b/vendor/github.com/containernetworking/cni/pkg/invoke/raw_exec.go index ad8498ba2..4f89a5dda 100644 --- a/vendor/github.com/containernetworking/cni/pkg/invoke/raw_exec.go +++ b/vendor/github.com/containernetworking/cni/pkg/invoke/raw_exec.go @@ -44,10 +44,14 @@ func (e *RawExec) ExecPlugin(ctx context.Context, pluginPath string, stdinData [ } func pluginErr(err error, output []byte) error { - if _, ok := err.(*exec.ExitError); ok { + if exitError, ok := err.(*exec.ExitError); ok { emsg := types.Error{} if len(output) == 0 { - emsg.Msg = "netplugin failed with no error message" + if len(exitError.Stderr) == 0 { + emsg.Msg = "netplugin failed with no error message" + } else { + emsg.Msg = fmt.Sprintf("netplugin failed: %q", string(exitError.Stderr)) + } } else if perr := json.Unmarshal(output, &emsg); perr != nil { emsg.Msg = fmt.Sprintf("netplugin failed but error parsing its diagnostic message %q: %v", string(output), perr) } |