diff options
Diffstat (limited to 'pkg')
-rw-r--r-- | pkg/api/handlers/types.go | 11 | ||||
-rw-r--r-- | pkg/bindings/test/containers_test.go | 1 | ||||
-rw-r--r-- | pkg/specgen/generate/ports.go | 15 |
3 files changed, 10 insertions, 17 deletions
diff --git a/pkg/api/handlers/types.go b/pkg/api/handlers/types.go index a17f5df56..0ccaa95bb 100644 --- a/pkg/api/handlers/types.go +++ b/pkg/api/handlers/types.go @@ -203,15 +203,6 @@ func ImageToImageSummary(l *libpodImage.Image) (*entities.ImageSummary, error) { return nil, errors.Wrapf(err, "Failed to obtain RepoTags for image %s", l.ID()) } - history, err := l.History(context.TODO()) - if err != nil { - return nil, errors.Wrapf(err, "Failed to obtain History for image %s", l.ID()) - } - historyIds := make([]string, len(history)) - for i, h := range history { - historyIds[i] = h.ID - } - digests := make([]string, len(l.Digests())) for i, d := range l.Digests() { digests[i] = string(d) @@ -233,7 +224,7 @@ func ImageToImageSummary(l *libpodImage.Image) (*entities.ImageSummary, error) { Digest: string(l.Digest()), Digests: digests, ConfigDigest: string(l.ConfigDigest), - History: historyIds, + History: l.NamesHistory(), } return &is, nil } diff --git a/pkg/bindings/test/containers_test.go b/pkg/bindings/test/containers_test.go index c1a01c280..9a188e5da 100644 --- a/pkg/bindings/test/containers_test.go +++ b/pkg/bindings/test/containers_test.go @@ -280,6 +280,7 @@ var _ = Describe("Podman containers ", func() { }) It("podman wait to pause|unpause condition", func() { + Skip("FIXME: https://github.com/containers/podman/issues/6518") var ( name = "top" exitCode int32 = -1 diff --git a/pkg/specgen/generate/ports.go b/pkg/specgen/generate/ports.go index 1ad7e6f4d..7dd50ac0d 100644 --- a/pkg/specgen/generate/ports.go +++ b/pkg/specgen/generate/ports.go @@ -123,19 +123,20 @@ func parsePortMapping(portMappings []specgen.PortMapping) ([]ocicni.PortMapping, postAssignHostPort = true } } else { - testCPort := ctrPortMap[cPort] - if testCPort != 0 && testCPort != hPort { - // This is an attempt to redefine a port - return nil, nil, nil, errors.Errorf("conflicting port mappings for container port %d (protocol %s)", cPort, p) - } - ctrPortMap[cPort] = hPort - testHPort := hostPortMap[hPort] if testHPort != 0 && testHPort != cPort { return nil, nil, nil, errors.Errorf("conflicting port mappings for host port %d (protocol %s)", hPort, p) } hostPortMap[hPort] = cPort + // Mapping a container port to multiple + // host ports is allowed. + // We only store the latest of these in + // the container port map - we don't + // need to know all of them, just one. + testCPort := ctrPortMap[cPort] + ctrPortMap[cPort] = hPort + // If we have an exact duplicate, just continue if testCPort == hPort && testHPort == cPort { continue |