diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2021-02-16 16:08:26 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-02-16 16:08:26 -0500 |
commit | fb6f1439467544a5fa9ea599a3ef6ab5c721a3c7 (patch) | |
tree | 77f1f313bdb1e9802a8172d56d7ec45b3db509d1 /pkg/domain/infra/tunnel | |
parent | 7fb347a3d40afeb4c565c2066fbade7f003e3e50 (diff) | |
parent | 958f90143199bbc4b5dcd7ad4fffdd56d3f6fbc3 (diff) | |
download | podman-fb6f1439467544a5fa9ea599a3ef6ab5c721a3c7.tar.gz podman-fb6f1439467544a5fa9ea599a3ef6ab5c721a3c7.tar.bz2 podman-fb6f1439467544a5fa9ea599a3ef6ab5c721a3c7.zip |
Merge pull request #9401 from rhatdan/stop
podman kill should report rawInput not container id
Diffstat (limited to 'pkg/domain/infra/tunnel')
-rw-r--r-- | pkg/domain/infra/tunnel/containers.go | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/pkg/domain/infra/tunnel/containers.go b/pkg/domain/infra/tunnel/containers.go index 5a83faaf0..b0a07cd27 100644 --- a/pkg/domain/infra/tunnel/containers.go +++ b/pkg/domain/infra/tunnel/containers.go @@ -124,16 +124,21 @@ func (ic *ContainerEngine) ContainerStop(ctx context.Context, namesOrIds []strin } func (ic *ContainerEngine) ContainerKill(ctx context.Context, namesOrIds []string, opts entities.KillOptions) ([]*entities.KillReport, error) { - ctrs, err := getContainersByContext(ic.ClientCtx, opts.All, false, namesOrIds) + ctrs, rawInputs, err := getContainersAndInputByContext(ic.ClientCtx, opts.All, false, namesOrIds) if err != nil { return nil, err } + ctrMap := map[string]string{} + for i := range ctrs { + ctrMap[ctrs[i].ID] = rawInputs[i] + } options := new(containers.KillOptions).WithSignal(opts.Signal) reports := make([]*entities.KillReport, 0, len(ctrs)) for _, c := range ctrs { reports = append(reports, &entities.KillReport{ - Id: c.ID, - Err: containers.Kill(ic.ClientCtx, c.ID, options), + Id: c.ID, + Err: containers.Kill(ic.ClientCtx, c.ID, options), + RawInput: ctrMap[c.ID], }) } return reports, nil |