diff options
Diffstat (limited to 'libpod')
99 files changed, 270 insertions, 241 deletions
diff --git a/libpod/boltdb_state.go b/libpod/boltdb_state.go index c9d214cd0..6f2eaeab2 100644 --- a/libpod/boltdb_state.go +++ b/libpod/boltdb_state.go @@ -6,7 +6,7 @@ import ( "strings" "sync" - "github.com/containers/podman/v2/libpod/define" + "github.com/containers/podman/v3/libpod/define" jsoniter "github.com/json-iterator/go" "github.com/pkg/errors" "github.com/sirupsen/logrus" diff --git a/libpod/boltdb_state_internal.go b/libpod/boltdb_state_internal.go index 6014fbef3..cf8f1c175 100644 --- a/libpod/boltdb_state_internal.go +++ b/libpod/boltdb_state_internal.go @@ -7,8 +7,8 @@ import ( "runtime" "strings" - "github.com/containers/podman/v2/libpod/define" - "github.com/containers/podman/v2/pkg/rootless" + "github.com/containers/podman/v3/libpod/define" + "github.com/containers/podman/v3/pkg/rootless" "github.com/containers/storage" "github.com/pkg/errors" "github.com/sirupsen/logrus" diff --git a/libpod/boltdb_state_linux.go b/libpod/boltdb_state_linux.go index 65efd5703..72243dcc5 100644 --- a/libpod/boltdb_state_linux.go +++ b/libpod/boltdb_state_linux.go @@ -3,7 +3,7 @@ package libpod import ( - "github.com/containers/podman/v2/libpod/define" + "github.com/containers/podman/v3/libpod/define" "github.com/pkg/errors" "github.com/sirupsen/logrus" ) diff --git a/libpod/common_test.go b/libpod/common_test.go index 4eeb5c317..4c419cfa8 100644 --- a/libpod/common_test.go +++ b/libpod/common_test.go @@ -8,8 +8,8 @@ import ( "time" "github.com/containers/common/pkg/config" - "github.com/containers/podman/v2/libpod/define" - "github.com/containers/podman/v2/libpod/lock" + "github.com/containers/podman/v3/libpod/define" + "github.com/containers/podman/v3/libpod/lock" "github.com/cri-o/ocicni/pkg/ocicni" "github.com/opencontainers/runtime-tools/generate" "github.com/stretchr/testify/assert" diff --git a/libpod/container.go b/libpod/container.go index 613a02554..9841bddf7 100644 --- a/libpod/container.go +++ b/libpod/container.go @@ -12,9 +12,9 @@ import ( cnitypes "github.com/containernetworking/cni/pkg/types/current" "github.com/containers/common/pkg/secrets" "github.com/containers/image/v5/manifest" - "github.com/containers/podman/v2/libpod/define" - "github.com/containers/podman/v2/libpod/lock" - "github.com/containers/podman/v2/pkg/rootless" + "github.com/containers/podman/v3/libpod/define" + "github.com/containers/podman/v3/libpod/lock" + "github.com/containers/podman/v3/pkg/rootless" "github.com/containers/storage" "github.com/cri-o/ocicni/pkg/ocicni" spec "github.com/opencontainers/runtime-spec/specs-go" diff --git a/libpod/container_api.go b/libpod/container_api.go index 2473acec0..ec5bd08d2 100644 --- a/libpod/container_api.go +++ b/libpod/container_api.go @@ -8,9 +8,9 @@ import ( "sync" "time" - "github.com/containers/podman/v2/libpod/define" - "github.com/containers/podman/v2/libpod/events" - "github.com/containers/podman/v2/pkg/signal" + "github.com/containers/podman/v3/libpod/define" + "github.com/containers/podman/v3/libpod/events" + "github.com/containers/podman/v3/pkg/signal" "github.com/opentracing/opentracing-go" "github.com/pkg/errors" "github.com/sirupsen/logrus" diff --git a/libpod/container_commit.go b/libpod/container_commit.go index 3386a17bd..22da0c566 100644 --- a/libpod/container_commit.go +++ b/libpod/container_commit.go @@ -9,10 +9,10 @@ import ( "github.com/containers/buildah/util" is "github.com/containers/image/v5/storage" "github.com/containers/image/v5/types" - "github.com/containers/podman/v2/libpod/define" - "github.com/containers/podman/v2/libpod/events" - "github.com/containers/podman/v2/libpod/image" - libpodutil "github.com/containers/podman/v2/pkg/util" + "github.com/containers/podman/v3/libpod/define" + "github.com/containers/podman/v3/libpod/events" + "github.com/containers/podman/v3/libpod/image" + libpodutil "github.com/containers/podman/v3/pkg/util" "github.com/pkg/errors" "github.com/sirupsen/logrus" ) diff --git a/libpod/container_config.go b/libpod/container_config.go index 5d7e65f2b..be24b54d6 100644 --- a/libpod/container_config.go +++ b/libpod/container_config.go @@ -6,7 +6,7 @@ import ( "github.com/containers/common/pkg/secrets" "github.com/containers/image/v5/manifest" - "github.com/containers/podman/v2/pkg/namespaces" + "github.com/containers/podman/v3/pkg/namespaces" "github.com/containers/storage" "github.com/cri-o/ocicni/pkg/ocicni" spec "github.com/opencontainers/runtime-spec/specs-go" diff --git a/libpod/container_exec.go b/libpod/container_exec.go index 0d18b55ca..7b1d797bb 100644 --- a/libpod/container_exec.go +++ b/libpod/container_exec.go @@ -8,8 +8,8 @@ import ( "strconv" "time" - "github.com/containers/podman/v2/libpod/define" - "github.com/containers/podman/v2/libpod/events" + "github.com/containers/podman/v3/libpod/define" + "github.com/containers/podman/v3/libpod/events" "github.com/containers/storage/pkg/stringid" "github.com/pkg/errors" "github.com/sirupsen/logrus" diff --git a/libpod/container_graph.go b/libpod/container_graph.go index 39f6ed281..3ae7cfbc7 100644 --- a/libpod/container_graph.go +++ b/libpod/container_graph.go @@ -4,7 +4,7 @@ import ( "context" "strings" - "github.com/containers/podman/v2/libpod/define" + "github.com/containers/podman/v3/libpod/define" "github.com/pkg/errors" "github.com/sirupsen/logrus" ) diff --git a/libpod/container_graph_test.go b/libpod/container_graph_test.go index 518f3e74b..7ad7359bb 100644 --- a/libpod/container_graph_test.go +++ b/libpod/container_graph_test.go @@ -3,7 +3,7 @@ package libpod import ( "testing" - "github.com/containers/podman/v2/libpod/lock" + "github.com/containers/podman/v3/libpod/lock" "github.com/stretchr/testify/assert" ) diff --git a/libpod/container_inspect.go b/libpod/container_inspect.go index e87e26c61..399eff845 100644 --- a/libpod/container_inspect.go +++ b/libpod/container_inspect.go @@ -5,9 +5,9 @@ import ( "strings" "github.com/containers/common/pkg/config" - "github.com/containers/podman/v2/libpod/define" - "github.com/containers/podman/v2/libpod/driver" - "github.com/containers/podman/v2/pkg/util" + "github.com/containers/podman/v3/libpod/define" + "github.com/containers/podman/v3/libpod/driver" + "github.com/containers/podman/v3/pkg/util" units "github.com/docker/go-units" spec "github.com/opencontainers/runtime-spec/specs-go" "github.com/opencontainers/runtime-tools/generate" diff --git a/libpod/container_internal.go b/libpod/container_internal.go index e22f3fcfa..2e0c24579 100644 --- a/libpod/container_internal.go +++ b/libpod/container_internal.go @@ -15,14 +15,14 @@ import ( "github.com/containers/buildah/copier" "github.com/containers/common/pkg/secrets" - "github.com/containers/podman/v2/libpod/define" - "github.com/containers/podman/v2/libpod/events" - "github.com/containers/podman/v2/pkg/cgroups" - "github.com/containers/podman/v2/pkg/ctime" - "github.com/containers/podman/v2/pkg/hooks" - "github.com/containers/podman/v2/pkg/hooks/exec" - "github.com/containers/podman/v2/pkg/rootless" - "github.com/containers/podman/v2/pkg/selinux" + "github.com/containers/podman/v3/libpod/define" + "github.com/containers/podman/v3/libpod/events" + "github.com/containers/podman/v3/pkg/cgroups" + "github.com/containers/podman/v3/pkg/ctime" + "github.com/containers/podman/v3/pkg/hooks" + "github.com/containers/podman/v3/pkg/hooks/exec" + "github.com/containers/podman/v3/pkg/rootless" + "github.com/containers/podman/v3/pkg/selinux" "github.com/containers/storage" "github.com/containers/storage/pkg/archive" "github.com/containers/storage/pkg/idtools" diff --git a/libpod/container_internal_linux.go b/libpod/container_internal_linux.go index edbbefb55..43a345ea9 100644 --- a/libpod/container_internal_linux.go +++ b/libpod/container_internal_linux.go @@ -27,17 +27,17 @@ import ( "github.com/containers/common/pkg/config" "github.com/containers/common/pkg/subscriptions" "github.com/containers/common/pkg/umask" - "github.com/containers/podman/v2/libpod/define" - "github.com/containers/podman/v2/libpod/events" - "github.com/containers/podman/v2/pkg/annotations" - "github.com/containers/podman/v2/pkg/cgroups" - "github.com/containers/podman/v2/pkg/criu" - "github.com/containers/podman/v2/pkg/lookup" - "github.com/containers/podman/v2/pkg/resolvconf" - "github.com/containers/podman/v2/pkg/rootless" - "github.com/containers/podman/v2/pkg/util" - "github.com/containers/podman/v2/utils" - "github.com/containers/podman/v2/version" + "github.com/containers/podman/v3/libpod/define" + "github.com/containers/podman/v3/libpod/events" + "github.com/containers/podman/v3/pkg/annotations" + "github.com/containers/podman/v3/pkg/cgroups" + "github.com/containers/podman/v3/pkg/criu" + "github.com/containers/podman/v3/pkg/lookup" + "github.com/containers/podman/v3/pkg/resolvconf" + "github.com/containers/podman/v3/pkg/rootless" + "github.com/containers/podman/v3/pkg/util" + "github.com/containers/podman/v3/utils" + "github.com/containers/podman/v3/version" "github.com/containers/storage/pkg/archive" "github.com/containers/storage/pkg/idtools" securejoin "github.com/cyphar/filepath-securejoin" diff --git a/libpod/container_internal_unsupported.go b/libpod/container_internal_unsupported.go index 7f6fc9ec9..f979bcbde 100644 --- a/libpod/container_internal_unsupported.go +++ b/libpod/container_internal_unsupported.go @@ -5,8 +5,8 @@ package libpod import ( "context" - "github.com/containers/podman/v2/libpod/define" - "github.com/containers/podman/v2/pkg/lookup" + "github.com/containers/podman/v3/libpod/define" + "github.com/containers/podman/v3/pkg/lookup" spec "github.com/opencontainers/runtime-spec/specs-go" ) diff --git a/libpod/container_log.go b/libpod/container_log.go index f16e08353..a3b700004 100644 --- a/libpod/container_log.go +++ b/libpod/container_log.go @@ -6,8 +6,8 @@ import ( "os" "time" - "github.com/containers/podman/v2/libpod/define" - "github.com/containers/podman/v2/libpod/logs" + "github.com/containers/podman/v3/libpod/define" + "github.com/containers/podman/v3/libpod/logs" "github.com/hpcloud/tail/watch" "github.com/pkg/errors" "github.com/sirupsen/logrus" diff --git a/libpod/container_log_linux.go b/libpod/container_log_linux.go index b1f601a4c..5792633b0 100644 --- a/libpod/container_log_linux.go +++ b/libpod/container_log_linux.go @@ -10,8 +10,8 @@ import ( "math" "time" - "github.com/containers/podman/v2/libpod/define" - "github.com/containers/podman/v2/libpod/logs" + "github.com/containers/podman/v3/libpod/define" + "github.com/containers/podman/v3/libpod/logs" journal "github.com/coreos/go-systemd/v22/sdjournal" "github.com/hpcloud/tail/watch" "github.com/pkg/errors" diff --git a/libpod/container_log_unsupported.go b/libpod/container_log_unsupported.go index 4106b36e5..d10082141 100644 --- a/libpod/container_log_unsupported.go +++ b/libpod/container_log_unsupported.go @@ -5,8 +5,8 @@ package libpod import ( "context" - "github.com/containers/podman/v2/libpod/define" - "github.com/containers/podman/v2/libpod/logs" + "github.com/containers/podman/v3/libpod/define" + "github.com/containers/podman/v3/libpod/logs" "github.com/pkg/errors" ) diff --git a/libpod/container_top_linux.go b/libpod/container_top_linux.go index 161367d75..ee03570ab 100644 --- a/libpod/container_top_linux.go +++ b/libpod/container_top_linux.go @@ -8,8 +8,8 @@ import ( "strconv" "strings" - "github.com/containers/podman/v2/libpod/define" - "github.com/containers/podman/v2/pkg/rootless" + "github.com/containers/podman/v3/libpod/define" + "github.com/containers/podman/v3/pkg/rootless" "github.com/containers/psgo" "github.com/pkg/errors" "github.com/sirupsen/logrus" diff --git a/libpod/container_top_unsupported.go b/libpod/container_top_unsupported.go index 866fe106f..1a096d248 100644 --- a/libpod/container_top_unsupported.go +++ b/libpod/container_top_unsupported.go @@ -2,7 +2,7 @@ package libpod -import "github.com/containers/podman/v2/libpod/define" +import "github.com/containers/podman/v3/libpod/define" // Top gathers statistics about the running processes in a container. It returns a // []string for output diff --git a/libpod/container_validate.go b/libpod/container_validate.go index 57bb929dd..245121a91 100644 --- a/libpod/container_validate.go +++ b/libpod/container_validate.go @@ -1,7 +1,7 @@ package libpod import ( - "github.com/containers/podman/v2/libpod/define" + "github.com/containers/podman/v3/libpod/define" spec "github.com/opencontainers/runtime-spec/specs-go" "github.com/pkg/errors" ) diff --git a/libpod/define/version.go b/libpod/define/version.go index d4cdd539d..67dc730ac 100644 --- a/libpod/define/version.go +++ b/libpod/define/version.go @@ -5,7 +5,7 @@ import ( "strconv" "time" - podmanVersion "github.com/containers/podman/v2/version" + podmanVersion "github.com/containers/podman/v3/version" ) // Overwritten at build time diff --git a/libpod/diff.go b/libpod/diff.go index 43f4d2e96..36d60b838 100644 --- a/libpod/diff.go +++ b/libpod/diff.go @@ -3,7 +3,7 @@ package libpod import ( "io" - "github.com/containers/podman/v2/libpod/layers" + "github.com/containers/podman/v3/libpod/layers" "github.com/containers/storage/pkg/archive" "github.com/pkg/errors" ) diff --git a/libpod/driver/driver.go b/libpod/driver/driver.go index de71c1f6e..6fe2cf8ac 100644 --- a/libpod/driver/driver.go +++ b/libpod/driver/driver.go @@ -1,7 +1,7 @@ package driver import ( - "github.com/containers/podman/v2/libpod/define" + "github.com/containers/podman/v3/libpod/define" "github.com/containers/storage" ) diff --git a/libpod/events.go b/libpod/events.go index e199a3846..839229674 100644 --- a/libpod/events.go +++ b/libpod/events.go @@ -5,7 +5,7 @@ import ( "fmt" "sync" - "github.com/containers/podman/v2/libpod/events" + "github.com/containers/podman/v3/libpod/events" "github.com/pkg/errors" "github.com/sirupsen/logrus" ) diff --git a/libpod/events/filters.go b/libpod/events/filters.go index 26e1e10ba..acfb96302 100644 --- a/libpod/events/filters.go +++ b/libpod/events/filters.go @@ -4,7 +4,7 @@ import ( "strings" "time" - "github.com/containers/podman/v2/pkg/util" + "github.com/containers/podman/v3/pkg/util" "github.com/pkg/errors" ) diff --git a/libpod/events/journal_linux.go b/libpod/events/journal_linux.go index 8b7e448b1..23e5f15b1 100644 --- a/libpod/events/journal_linux.go +++ b/libpod/events/journal_linux.go @@ -8,7 +8,7 @@ import ( "strconv" "time" - "github.com/containers/podman/v2/pkg/util" + "github.com/containers/podman/v3/pkg/util" "github.com/coreos/go-systemd/v22/journal" "github.com/coreos/go-systemd/v22/sdjournal" "github.com/pkg/errors" diff --git a/libpod/events/logfile.go b/libpod/events/logfile.go index c5feabe66..7a32ea311 100644 --- a/libpod/events/logfile.go +++ b/libpod/events/logfile.go @@ -6,7 +6,7 @@ import ( "os" "time" - "github.com/containers/podman/v2/pkg/util" + "github.com/containers/podman/v3/pkg/util" "github.com/containers/storage" "github.com/pkg/errors" ) diff --git a/libpod/healthcheck.go b/libpod/healthcheck.go index 6c5becd5b..c32ba85cb 100644 --- a/libpod/healthcheck.go +++ b/libpod/healthcheck.go @@ -9,7 +9,7 @@ import ( "strings" "time" - "github.com/containers/podman/v2/libpod/define" + "github.com/containers/podman/v3/libpod/define" "github.com/pkg/errors" "github.com/sirupsen/logrus" ) diff --git a/libpod/healthcheck_linux.go b/libpod/healthcheck_linux.go index 0ad15da09..e08214809 100644 --- a/libpod/healthcheck_linux.go +++ b/libpod/healthcheck_linux.go @@ -6,8 +6,8 @@ import ( "os/exec" "strings" - "github.com/containers/podman/v2/pkg/rootless" - "github.com/containers/podman/v2/pkg/systemd" + "github.com/containers/podman/v3/pkg/rootless" + "github.com/containers/podman/v3/pkg/systemd" "github.com/pkg/errors" "github.com/sirupsen/logrus" ) diff --git a/libpod/healthcheck_unsupported.go b/libpod/healthcheck_unsupported.go index 67c952b40..8b6a0209b 100644 --- a/libpod/healthcheck_unsupported.go +++ b/libpod/healthcheck_unsupported.go @@ -2,7 +2,7 @@ package libpod -import "github.com/containers/podman/v2/libpod/define" +import "github.com/containers/podman/v3/libpod/define" // createTimer systemd timers for healthchecks of a container func (c *Container) createTimer() error { diff --git a/libpod/image/docker_registry_options.go b/libpod/image/docker_registry_options.go index 835473a1f..0a2a375ae 100644 --- a/libpod/image/docker_registry_options.go +++ b/libpod/image/docker_registry_options.go @@ -6,7 +6,7 @@ import ( "github.com/containers/buildah/pkg/parse" "github.com/containers/image/v5/docker/reference" "github.com/containers/image/v5/types" - podmanVersion "github.com/containers/podman/v2/version" + podmanVersion "github.com/containers/podman/v3/version" ) // DockerRegistryOptions encapsulates settings that affect how we connect or diff --git a/libpod/image/errors.go b/libpod/image/errors.go index 3f58b1c6a..49f841bf4 100644 --- a/libpod/image/errors.go +++ b/libpod/image/errors.go @@ -1,7 +1,7 @@ package image import ( - "github.com/containers/podman/v2/libpod/define" + "github.com/containers/podman/v3/libpod/define" ) var ( diff --git a/libpod/image/filters.go b/libpod/image/filters.go index 4aff0a7b5..37d3cb6a5 100644 --- a/libpod/image/filters.go +++ b/libpod/image/filters.go @@ -8,7 +8,7 @@ import ( "strings" "time" - "github.com/containers/podman/v2/pkg/inspect" + "github.com/containers/podman/v3/pkg/inspect" "github.com/pkg/errors" "github.com/sirupsen/logrus" ) diff --git a/libpod/image/image.go b/libpod/image/image.go index 8d8af0064..7c760a79a 100644 --- a/libpod/image/image.go +++ b/libpod/image/image.go @@ -29,12 +29,12 @@ import ( "github.com/containers/image/v5/transports" "github.com/containers/image/v5/transports/alltransports" "github.com/containers/image/v5/types" - "github.com/containers/podman/v2/libpod/define" - "github.com/containers/podman/v2/libpod/driver" - "github.com/containers/podman/v2/libpod/events" - "github.com/containers/podman/v2/pkg/inspect" - "github.com/containers/podman/v2/pkg/registries" - "github.com/containers/podman/v2/pkg/util" + "github.com/containers/podman/v3/libpod/define" + "github.com/containers/podman/v3/libpod/driver" + "github.com/containers/podman/v3/libpod/events" + "github.com/containers/podman/v3/pkg/inspect" + "github.com/containers/podman/v3/pkg/registries" + "github.com/containers/podman/v3/pkg/util" "github.com/containers/storage" digest "github.com/opencontainers/go-digest" ociv1 "github.com/opencontainers/image-spec/specs-go/v1" diff --git a/libpod/image/image_test.go b/libpod/image/image_test.go index 8055ef7b1..1ea4f6c11 100644 --- a/libpod/image/image_test.go +++ b/libpod/image/image_test.go @@ -7,8 +7,8 @@ import ( "os" "testing" - "github.com/containers/podman/v2/libpod/events" - "github.com/containers/podman/v2/pkg/util" + "github.com/containers/podman/v3/libpod/events" + "github.com/containers/podman/v3/pkg/util" "github.com/containers/storage" "github.com/containers/storage/pkg/reexec" "github.com/opencontainers/go-digest" diff --git a/libpod/image/prune.go b/libpod/image/prune.go index 6f026f630..d6ae5feaf 100644 --- a/libpod/image/prune.go +++ b/libpod/image/prune.go @@ -5,9 +5,9 @@ import ( "strings" "time" - "github.com/containers/podman/v2/libpod/events" - "github.com/containers/podman/v2/pkg/domain/entities/reports" - "github.com/containers/podman/v2/pkg/timetype" + "github.com/containers/podman/v3/libpod/events" + "github.com/containers/podman/v3/pkg/domain/entities/reports" + "github.com/containers/podman/v3/pkg/timetype" "github.com/containers/storage" "github.com/pkg/errors" "github.com/sirupsen/logrus" diff --git a/libpod/image/pull.go b/libpod/image/pull.go index 996b5995a..3cb1e57c7 100644 --- a/libpod/image/pull.go +++ b/libpod/image/pull.go @@ -19,9 +19,9 @@ import ( "github.com/containers/image/v5/transports" "github.com/containers/image/v5/transports/alltransports" "github.com/containers/image/v5/types" - "github.com/containers/podman/v2/libpod/events" - "github.com/containers/podman/v2/pkg/errorhandling" - "github.com/containers/podman/v2/pkg/registries" + "github.com/containers/podman/v3/libpod/events" + "github.com/containers/podman/v3/pkg/errorhandling" + "github.com/containers/podman/v3/pkg/registries" "github.com/opentracing/opentracing-go" "github.com/pkg/errors" "github.com/sirupsen/logrus" diff --git a/libpod/image/search.go b/libpod/image/search.go index c5799219a..714551e6e 100644 --- a/libpod/image/search.go +++ b/libpod/image/search.go @@ -10,7 +10,7 @@ import ( "github.com/containers/image/v5/docker" "github.com/containers/image/v5/transports/alltransports" "github.com/containers/image/v5/types" - sysreg "github.com/containers/podman/v2/pkg/registries" + sysreg "github.com/containers/podman/v3/pkg/registries" "github.com/pkg/errors" "github.com/sirupsen/logrus" "golang.org/x/sync/semaphore" diff --git a/libpod/image/utils.go b/libpod/image/utils.go index 8882adcc1..0b4264112 100644 --- a/libpod/image/utils.go +++ b/libpod/image/utils.go @@ -11,7 +11,7 @@ import ( "github.com/containers/image/v5/docker/reference" "github.com/containers/image/v5/signature" "github.com/containers/image/v5/types" - "github.com/containers/podman/v2/libpod/define" + "github.com/containers/podman/v3/libpod/define" "github.com/containers/storage" "github.com/pkg/errors" ) diff --git a/libpod/in_memory_state.go b/libpod/in_memory_state.go index 9285589b1..26f15d9c8 100644 --- a/libpod/in_memory_state.go +++ b/libpod/in_memory_state.go @@ -3,8 +3,8 @@ package libpod import ( "strings" - "github.com/containers/podman/v2/libpod/define" - "github.com/containers/podman/v2/pkg/registrar" + "github.com/containers/podman/v3/libpod/define" + "github.com/containers/podman/v3/pkg/registrar" "github.com/containers/storage/pkg/truncindex" "github.com/pkg/errors" ) diff --git a/libpod/info.go b/libpod/info.go index f5bfb122e..ef0c83a2a 100644 --- a/libpod/info.go +++ b/libpod/info.go @@ -15,11 +15,11 @@ import ( "github.com/containers/buildah" "github.com/containers/common/pkg/apparmor" "github.com/containers/common/pkg/seccomp" - "github.com/containers/podman/v2/libpod/define" - "github.com/containers/podman/v2/libpod/linkmode" - "github.com/containers/podman/v2/pkg/cgroups" - registries2 "github.com/containers/podman/v2/pkg/registries" - "github.com/containers/podman/v2/pkg/rootless" + "github.com/containers/podman/v3/libpod/define" + "github.com/containers/podman/v3/libpod/linkmode" + "github.com/containers/podman/v3/pkg/cgroups" + registries2 "github.com/containers/podman/v3/pkg/registries" + "github.com/containers/podman/v3/pkg/rootless" "github.com/containers/storage" "github.com/containers/storage/pkg/system" "github.com/opencontainers/selinux/go-selinux" diff --git a/libpod/kube.go b/libpod/kube.go index 6cb7723c9..0c4f9f0a0 100644 --- a/libpod/kube.go +++ b/libpod/kube.go @@ -7,9 +7,9 @@ import ( "strings" "time" - "github.com/containers/podman/v2/libpod/define" - "github.com/containers/podman/v2/pkg/lookup" - "github.com/containers/podman/v2/pkg/util" + "github.com/containers/podman/v3/libpod/define" + "github.com/containers/podman/v3/pkg/lookup" + "github.com/containers/podman/v3/pkg/util" "github.com/cri-o/ocicni/pkg/ocicni" "github.com/opencontainers/runtime-spec/specs-go" "github.com/opencontainers/runtime-tools/generate" diff --git a/libpod/lock/file_lock_manager.go b/libpod/lock/file_lock_manager.go index 68ec3986c..155606642 100644 --- a/libpod/lock/file_lock_manager.go +++ b/libpod/lock/file_lock_manager.go @@ -1,7 +1,7 @@ package lock import ( - "github.com/containers/podman/v2/libpod/lock/file" + "github.com/containers/podman/v3/libpod/lock/file" ) // FileLockManager manages shared memory locks. diff --git a/libpod/lock/shm_lock_manager_linux.go b/libpod/lock/shm_lock_manager_linux.go index 9581607b6..ecccb2bcb 100644 --- a/libpod/lock/shm_lock_manager_linux.go +++ b/libpod/lock/shm_lock_manager_linux.go @@ -5,7 +5,7 @@ package lock import ( "syscall" - "github.com/containers/podman/v2/libpod/lock/shm" + "github.com/containers/podman/v3/libpod/lock/shm" "github.com/pkg/errors" ) diff --git a/libpod/logs/log.go b/libpod/logs/log.go index 2637c8524..bba52408d 100644 --- a/libpod/logs/log.go +++ b/libpod/logs/log.go @@ -8,7 +8,7 @@ import ( "sync" "time" - "github.com/containers/podman/v2/libpod/logs/reversereader" + "github.com/containers/podman/v3/libpod/logs/reversereader" "github.com/hpcloud/tail" "github.com/pkg/errors" "github.com/sirupsen/logrus" diff --git a/libpod/network/create.go b/libpod/network/create.go index c58d62575..1a5aa82fc 100644 --- a/libpod/network/create.go +++ b/libpod/network/create.go @@ -10,9 +10,9 @@ import ( "github.com/containernetworking/cni/pkg/version" "github.com/containers/common/pkg/config" - "github.com/containers/podman/v2/pkg/domain/entities" - "github.com/containers/podman/v2/pkg/rootless" - "github.com/containers/podman/v2/pkg/util" + "github.com/containers/podman/v3/pkg/domain/entities" + "github.com/containers/podman/v3/pkg/rootless" + "github.com/containers/podman/v3/pkg/util" "github.com/pkg/errors" "github.com/sirupsen/logrus" ) diff --git a/libpod/network/create_test.go b/libpod/network/create_test.go index 017bf31fe..c3824bd91 100644 --- a/libpod/network/create_test.go +++ b/libpod/network/create_test.go @@ -4,7 +4,7 @@ import ( "net" "testing" - "github.com/containers/podman/v2/pkg/domain/entities" + "github.com/containers/podman/v3/pkg/domain/entities" ) func Test_validateBridgeOptions(t *testing.T) { diff --git a/libpod/network/devices.go b/libpod/network/devices.go index a5d23fae4..de6bb4efc 100644 --- a/libpod/network/devices.go +++ b/libpod/network/devices.go @@ -5,8 +5,8 @@ import ( "os/exec" "github.com/containers/common/pkg/config" - "github.com/containers/podman/v2/pkg/util" - "github.com/containers/podman/v2/utils" + "github.com/containers/podman/v3/pkg/util" + "github.com/containers/podman/v3/utils" "github.com/sirupsen/logrus" ) diff --git a/libpod/network/files.go b/libpod/network/files.go index 33cf01064..fe483e25c 100644 --- a/libpod/network/files.go +++ b/libpod/network/files.go @@ -10,7 +10,7 @@ import ( "github.com/containernetworking/cni/libcni" "github.com/containernetworking/plugins/plugins/ipam/host-local/backend/allocator" "github.com/containers/common/pkg/config" - "github.com/containers/podman/v2/libpod/define" + "github.com/containers/podman/v3/libpod/define" "github.com/pkg/errors" "github.com/sirupsen/logrus" ) @@ -81,9 +81,9 @@ func GetCNIConfigPathByNameOrID(config *config.Config, name string) (string, err return "", errors.Wrap(define.ErrNoSuchNetwork, fmt.Sprintf("unable to find network configuration for %s", name)) } -// ReadRawCNIConfByName reads the raw CNI configuration for a CNI +// ReadRawCNIConfByNameOrID reads the raw CNI configuration for a CNI // network by name -func ReadRawCNIConfByName(config *config.Config, name string) ([]byte, error) { +func ReadRawCNIConfByNameOrID(config *config.Config, name string) ([]byte, error) { confFile, err := GetCNIConfigPathByNameOrID(config, name) if err != nil { return nil, err diff --git a/libpod/network/netconflist.go b/libpod/network/netconflist.go index 9be98e78f..1a1583587 100644 --- a/libpod/network/netconflist.go +++ b/libpod/network/netconflist.go @@ -7,7 +7,7 @@ import ( "strings" "github.com/containernetworking/cni/libcni" - "github.com/containers/podman/v2/pkg/util" + "github.com/containers/podman/v3/pkg/util" "github.com/pkg/errors" ) diff --git a/libpod/network/network.go b/libpod/network/network.go index cdaef6c13..f19a764ef 100644 --- a/libpod/network/network.go +++ b/libpod/network/network.go @@ -7,13 +7,14 @@ import ( "net" "os" + "github.com/containernetworking/cni/libcni" "github.com/containernetworking/cni/pkg/types" "github.com/containernetworking/plugins/plugins/ipam/host-local/backend/allocator" "github.com/containers/common/pkg/config" - "github.com/containers/podman/v2/libpod/define" - "github.com/containers/podman/v2/pkg/domain/entities" - "github.com/containers/podman/v2/pkg/rootless" - "github.com/containers/podman/v2/pkg/util" + "github.com/containers/podman/v3/libpod/define" + "github.com/containers/podman/v3/pkg/domain/entities" + "github.com/containers/podman/v3/pkg/rootless" + "github.com/containers/podman/v3/pkg/util" "github.com/pkg/errors" "github.com/sirupsen/logrus" ) @@ -222,7 +223,7 @@ func RemoveNetwork(config *config.Config, name string) error { // InspectNetwork reads a CNI config and returns its configuration func InspectNetwork(config *config.Config, name string) (map[string]interface{}, error) { - b, err := ReadRawCNIConfByName(config, name) + b, err := ReadRawCNIConfByNameOrID(config, name) if err != nil { return nil, err } @@ -234,7 +235,7 @@ func InspectNetwork(config *config.Config, name string) (map[string]interface{}, // Exists says whether a given network exists or not; it meant // specifically for restful responses so 404s can be used func Exists(config *config.Config, name string) (bool, error) { - _, err := ReadRawCNIConfByName(config, name) + _, err := ReadRawCNIConfByNameOrID(config, name) if err != nil { if errors.Cause(err) == define.ErrNoSuchNetwork { return false, nil @@ -277,3 +278,17 @@ func PruneNetworks(rtc *config.Config, usedNetworks map[string]bool) ([]*entitie } return reports, nil } + +// NormalizeName translates a network ID into a name. +// If the input is a name the name is returned. +func NormalizeName(config *config.Config, nameOrID string) (string, error) { + path, err := GetCNIConfigPathByNameOrID(config, nameOrID) + if err != nil { + return "", err + } + conf, err := libcni.ConfListFromFile(path) + if err != nil { + return "", err + } + return conf.Name, nil +} diff --git a/libpod/networking_linux.go b/libpod/networking_linux.go index de6f75d3e..c1b2c694d 100644 --- a/libpod/networking_linux.go +++ b/libpod/networking_linux.go @@ -22,13 +22,13 @@ import ( cnitypes "github.com/containernetworking/cni/pkg/types/current" "github.com/containernetworking/plugins/pkg/ns" - "github.com/containers/podman/v2/libpod/define" - "github.com/containers/podman/v2/libpod/events" - "github.com/containers/podman/v2/libpod/network" - "github.com/containers/podman/v2/pkg/errorhandling" - "github.com/containers/podman/v2/pkg/netns" - "github.com/containers/podman/v2/pkg/rootless" - "github.com/containers/podman/v2/pkg/rootlessport" + "github.com/containers/podman/v3/libpod/define" + "github.com/containers/podman/v3/libpod/events" + "github.com/containers/podman/v3/libpod/network" + "github.com/containers/podman/v3/pkg/errorhandling" + "github.com/containers/podman/v3/pkg/netns" + "github.com/containers/podman/v3/pkg/rootless" + "github.com/containers/podman/v3/pkg/rootlessport" "github.com/cri-o/ocicni/pkg/ocicni" "github.com/pkg/errors" "github.com/sirupsen/logrus" @@ -1139,13 +1139,12 @@ func (c *Container) NetworkDisconnect(nameOrID, netName string, force bool) erro return err } - exists, err := network.Exists(c.runtime.config, netName) + // check if network exists and if the input is a ID we get the name + // ocicni only uses names so it is important that we only use the name + netName, err = network.NormalizeName(c.runtime.config, netName) if err != nil { return err } - if !exists { - return errors.Wrap(define.ErrNoSuchNetwork, netName) - } index, nameExists := networks[netName] if !nameExists && len(networks) > 0 { @@ -1196,13 +1195,12 @@ func (c *Container) NetworkConnect(nameOrID, netName string, aliases []string) e return err } - exists, err := network.Exists(c.runtime.config, netName) + // check if network exists and if the input is a ID we get the name + // ocicni only uses names so it is important that we only use the name + netName, err = network.NormalizeName(c.runtime.config, netName) if err != nil { return err } - if !exists { - return errors.Wrap(define.ErrNoSuchNetwork, netName) - } c.lock.Lock() defer c.lock.Unlock() diff --git a/libpod/networking_unsupported.go b/libpod/networking_unsupported.go index 9e5c4adde..20c27ca7f 100644 --- a/libpod/networking_unsupported.go +++ b/libpod/networking_unsupported.go @@ -4,7 +4,7 @@ package libpod import ( cnitypes "github.com/containernetworking/cni/pkg/types/current" - "github.com/containers/podman/v2/libpod/define" + "github.com/containers/podman/v3/libpod/define" ) func (r *Runtime) setupRootlessNetNS(ctr *Container) error { diff --git a/libpod/oci.go b/libpod/oci.go index 6948e6425..ec6b424ce 100644 --- a/libpod/oci.go +++ b/libpod/oci.go @@ -3,7 +3,7 @@ package libpod import ( "net/http" - "github.com/containers/podman/v2/libpod/define" + "github.com/containers/podman/v3/libpod/define" "k8s.io/client-go/tools/remotecommand" ) diff --git a/libpod/oci_attach_linux.go b/libpod/oci_attach_linux.go index 4556eba94..c3db0f9e0 100644 --- a/libpod/oci_attach_linux.go +++ b/libpod/oci_attach_linux.go @@ -10,10 +10,10 @@ import ( "path/filepath" "github.com/containers/common/pkg/config" - "github.com/containers/podman/v2/libpod/define" - "github.com/containers/podman/v2/pkg/errorhandling" - "github.com/containers/podman/v2/pkg/kubeutils" - "github.com/containers/podman/v2/utils" + "github.com/containers/podman/v3/libpod/define" + "github.com/containers/podman/v3/pkg/errorhandling" + "github.com/containers/podman/v3/pkg/kubeutils" + "github.com/containers/podman/v3/utils" "github.com/moby/term" "github.com/pkg/errors" "github.com/sirupsen/logrus" diff --git a/libpod/oci_attach_unsupported.go b/libpod/oci_attach_unsupported.go index 317dfdc90..b2184f993 100644 --- a/libpod/oci_attach_unsupported.go +++ b/libpod/oci_attach_unsupported.go @@ -5,7 +5,7 @@ package libpod import ( "os" - "github.com/containers/podman/v2/libpod/define" + "github.com/containers/podman/v3/libpod/define" "k8s.io/client-go/tools/remotecommand" ) diff --git a/libpod/oci_conmon_exec_linux.go b/libpod/oci_conmon_exec_linux.go index faf86ea5b..c5f42fe3e 100644 --- a/libpod/oci_conmon_exec_linux.go +++ b/libpod/oci_conmon_exec_linux.go @@ -10,10 +10,10 @@ import ( "time" "github.com/containers/common/pkg/config" - "github.com/containers/podman/v2/libpod/define" - "github.com/containers/podman/v2/pkg/errorhandling" - "github.com/containers/podman/v2/pkg/util" - "github.com/containers/podman/v2/utils" + "github.com/containers/podman/v3/libpod/define" + "github.com/containers/podman/v3/pkg/errorhandling" + "github.com/containers/podman/v3/pkg/util" + "github.com/containers/podman/v3/utils" "github.com/pkg/errors" "github.com/sirupsen/logrus" "golang.org/x/sys/unix" diff --git a/libpod/oci_conmon_linux.go b/libpod/oci_conmon_linux.go index 38ffba7d2..47c628724 100644 --- a/libpod/oci_conmon_linux.go +++ b/libpod/oci_conmon_linux.go @@ -25,14 +25,14 @@ import ( "github.com/containers/common/pkg/capabilities" "github.com/containers/common/pkg/config" conmonConfig "github.com/containers/conmon/runner/config" - "github.com/containers/podman/v2/libpod/define" - "github.com/containers/podman/v2/libpod/logs" - "github.com/containers/podman/v2/pkg/cgroups" - "github.com/containers/podman/v2/pkg/errorhandling" - "github.com/containers/podman/v2/pkg/lookup" - "github.com/containers/podman/v2/pkg/rootless" - "github.com/containers/podman/v2/pkg/util" - "github.com/containers/podman/v2/utils" + "github.com/containers/podman/v3/libpod/define" + "github.com/containers/podman/v3/libpod/logs" + "github.com/containers/podman/v3/pkg/cgroups" + "github.com/containers/podman/v3/pkg/errorhandling" + "github.com/containers/podman/v3/pkg/lookup" + "github.com/containers/podman/v3/pkg/rootless" + "github.com/containers/podman/v3/pkg/util" + "github.com/containers/podman/v3/utils" "github.com/containers/storage/pkg/homedir" pmount "github.com/containers/storage/pkg/mount" "github.com/coreos/go-systemd/v22/activation" diff --git a/libpod/oci_conmon_unsupported.go b/libpod/oci_conmon_unsupported.go index 2504c31f0..4de27d663 100644 --- a/libpod/oci_conmon_unsupported.go +++ b/libpod/oci_conmon_unsupported.go @@ -5,7 +5,7 @@ package libpod import ( "github.com/containers/common/pkg/config" - "github.com/containers/podman/v2/libpod/define" + "github.com/containers/podman/v3/libpod/define" ) const ( diff --git a/libpod/oci_missing.go b/libpod/oci_missing.go index 9d12972d4..0fd14ce52 100644 --- a/libpod/oci_missing.go +++ b/libpod/oci_missing.go @@ -6,7 +6,7 @@ import ( "path/filepath" "sync" - "github.com/containers/podman/v2/libpod/define" + "github.com/containers/podman/v3/libpod/define" "github.com/pkg/errors" "github.com/sirupsen/logrus" "k8s.io/client-go/tools/remotecommand" diff --git a/libpod/oci_util.go b/libpod/oci_util.go index 4ec050d6d..1cafd5863 100644 --- a/libpod/oci_util.go +++ b/libpod/oci_util.go @@ -8,7 +8,7 @@ import ( "strings" "time" - "github.com/containers/podman/v2/libpod/define" + "github.com/containers/podman/v3/libpod/define" "github.com/cri-o/ocicni/pkg/ocicni" "github.com/pkg/errors" "github.com/sirupsen/logrus" diff --git a/libpod/options.go b/libpod/options.go index 8831f527e..627ea8c57 100644 --- a/libpod/options.go +++ b/libpod/options.go @@ -11,11 +11,11 @@ import ( "github.com/containers/common/pkg/secrets" "github.com/containers/image/v5/manifest" "github.com/containers/image/v5/types" - "github.com/containers/podman/v2/libpod/define" - "github.com/containers/podman/v2/libpod/events" - "github.com/containers/podman/v2/pkg/namespaces" - "github.com/containers/podman/v2/pkg/rootless" - "github.com/containers/podman/v2/pkg/util" + "github.com/containers/podman/v3/libpod/define" + "github.com/containers/podman/v3/libpod/events" + "github.com/containers/podman/v3/pkg/namespaces" + "github.com/containers/podman/v3/pkg/rootless" + "github.com/containers/podman/v3/pkg/util" "github.com/containers/storage" "github.com/containers/storage/pkg/idtools" "github.com/cri-o/ocicni/pkg/ocicni" diff --git a/libpod/plugin/volume_api.go b/libpod/plugin/volume_api.go index 79aebed43..fafd26dac 100644 --- a/libpod/plugin/volume_api.go +++ b/libpod/plugin/volume_api.go @@ -12,7 +12,7 @@ import ( "sync" "time" - "github.com/containers/podman/v2/libpod/define" + "github.com/containers/podman/v3/libpod/define" "github.com/docker/go-plugins-helpers/sdk" "github.com/docker/go-plugins-helpers/volume" jsoniter "github.com/json-iterator/go" diff --git a/libpod/pod.go b/libpod/pod.go index 784c2cf5e..dce2a0c1c 100644 --- a/libpod/pod.go +++ b/libpod/pod.go @@ -4,8 +4,8 @@ import ( "net" "time" - "github.com/containers/podman/v2/libpod/define" - "github.com/containers/podman/v2/libpod/lock" + "github.com/containers/podman/v3/libpod/define" + "github.com/containers/podman/v3/libpod/lock" "github.com/cri-o/ocicni/pkg/ocicni" "github.com/pkg/errors" ) diff --git a/libpod/pod_api.go b/libpod/pod_api.go index 845948dd3..14fe8276c 100644 --- a/libpod/pod_api.go +++ b/libpod/pod_api.go @@ -3,11 +3,11 @@ package libpod import ( "context" - "github.com/containers/podman/v2/libpod/define" - "github.com/containers/podman/v2/libpod/events" - "github.com/containers/podman/v2/pkg/cgroups" - "github.com/containers/podman/v2/pkg/parallel" - "github.com/containers/podman/v2/pkg/rootless" + "github.com/containers/podman/v3/libpod/define" + "github.com/containers/podman/v3/libpod/events" + "github.com/containers/podman/v3/pkg/cgroups" + "github.com/containers/podman/v3/pkg/parallel" + "github.com/containers/podman/v3/pkg/rootless" "github.com/pkg/errors" "github.com/sirupsen/logrus" ) diff --git a/libpod/pod_internal.go b/libpod/pod_internal.go index b039ce83f..31b4ba443 100644 --- a/libpod/pod_internal.go +++ b/libpod/pod_internal.go @@ -6,7 +6,7 @@ import ( "time" "github.com/containers/common/pkg/config" - "github.com/containers/podman/v2/libpod/define" + "github.com/containers/podman/v3/libpod/define" "github.com/containers/storage/pkg/stringid" "github.com/pkg/errors" "github.com/sirupsen/logrus" diff --git a/libpod/pod_status.go b/libpod/pod_status.go index 668d45ec7..8552f5681 100644 --- a/libpod/pod_status.go +++ b/libpod/pod_status.go @@ -1,6 +1,6 @@ package libpod -import "github.com/containers/podman/v2/libpod/define" +import "github.com/containers/podman/v3/libpod/define" // GetPodStatus determines the status of the pod based on the // statuses of the containers in the pod. diff --git a/libpod/pod_top_linux.go b/libpod/pod_top_linux.go index 07e1a0d80..aee62d832 100644 --- a/libpod/pod_top_linux.go +++ b/libpod/pod_top_linux.go @@ -6,8 +6,8 @@ import ( "strconv" "strings" - "github.com/containers/podman/v2/libpod/define" - "github.com/containers/podman/v2/pkg/rootless" + "github.com/containers/podman/v3/libpod/define" + "github.com/containers/podman/v3/pkg/rootless" "github.com/containers/psgo" ) diff --git a/libpod/pod_top_unsupported.go b/libpod/pod_top_unsupported.go index fbe6f7331..59d2ff9a2 100644 --- a/libpod/pod_top_unsupported.go +++ b/libpod/pod_top_unsupported.go @@ -2,7 +2,7 @@ package libpod -import "github.com/containers/podman/v2/libpod/define" +import "github.com/containers/podman/v3/libpod/define" // GetPodPidInformation is exclusive to linux func (p *Pod) GetPodPidInformation(descriptors []string) ([]string, error) { diff --git a/libpod/reset.go b/libpod/reset.go index 3346f9d3f..4199e9b76 100644 --- a/libpod/reset.go +++ b/libpod/reset.go @@ -6,9 +6,9 @@ import ( "os" "path/filepath" - "github.com/containers/podman/v2/libpod/define" - "github.com/containers/podman/v2/pkg/rootless" - "github.com/containers/podman/v2/pkg/util" + "github.com/containers/podman/v3/libpod/define" + "github.com/containers/podman/v3/pkg/rootless" + "github.com/containers/podman/v3/pkg/util" "github.com/containers/storage" "github.com/pkg/errors" "github.com/sirupsen/logrus" diff --git a/libpod/rootless_cni_linux.go b/libpod/rootless_cni_linux.go index 94ae062aa..e97985180 100644 --- a/libpod/rootless_cni_linux.go +++ b/libpod/rootless_cni_linux.go @@ -11,10 +11,10 @@ import ( cnitypes "github.com/containernetworking/cni/pkg/types/current" "github.com/containernetworking/plugins/pkg/ns" - "github.com/containers/podman/v2/libpod/define" - "github.com/containers/podman/v2/libpod/image" - "github.com/containers/podman/v2/pkg/env" - "github.com/containers/podman/v2/pkg/util" + "github.com/containers/podman/v3/libpod/define" + "github.com/containers/podman/v3/libpod/image" + "github.com/containers/podman/v3/pkg/env" + "github.com/containers/podman/v3/pkg/util" "github.com/containers/storage/pkg/lockfile" "github.com/hashicorp/go-multierror" spec "github.com/opencontainers/runtime-spec/specs-go" diff --git a/libpod/runtime.go b/libpod/runtime.go index c04d91b9d..201482c65 100644 --- a/libpod/runtime.go +++ b/libpod/runtime.go @@ -14,16 +14,16 @@ import ( "github.com/containers/image/v5/pkg/sysregistriesv2" is "github.com/containers/image/v5/storage" "github.com/containers/image/v5/types" - "github.com/containers/podman/v2/libpod/define" - "github.com/containers/podman/v2/libpod/events" - "github.com/containers/podman/v2/libpod/image" - "github.com/containers/podman/v2/libpod/lock" - "github.com/containers/podman/v2/libpod/plugin" - "github.com/containers/podman/v2/libpod/shutdown" - "github.com/containers/podman/v2/pkg/cgroups" - "github.com/containers/podman/v2/pkg/registries" - "github.com/containers/podman/v2/pkg/rootless" - "github.com/containers/podman/v2/pkg/util" + "github.com/containers/podman/v3/libpod/define" + "github.com/containers/podman/v3/libpod/events" + "github.com/containers/podman/v3/libpod/image" + "github.com/containers/podman/v3/libpod/lock" + "github.com/containers/podman/v3/libpod/plugin" + "github.com/containers/podman/v3/libpod/shutdown" + "github.com/containers/podman/v3/pkg/cgroups" + "github.com/containers/podman/v3/pkg/registries" + "github.com/containers/podman/v3/pkg/rootless" + "github.com/containers/podman/v3/pkg/util" "github.com/containers/storage" "github.com/cri-o/ocicni/pkg/ocicni" "github.com/docker/docker/pkg/namesgenerator" diff --git a/libpod/runtime_cstorage.go b/libpod/runtime_cstorage.go index 6ee8a9354..cd2f226af 100644 --- a/libpod/runtime_cstorage.go +++ b/libpod/runtime_cstorage.go @@ -3,7 +3,7 @@ package libpod import ( "time" - "github.com/containers/podman/v2/libpod/define" + "github.com/containers/podman/v3/libpod/define" "github.com/containers/storage" "github.com/pkg/errors" "github.com/sirupsen/logrus" diff --git a/libpod/runtime_ctr.go b/libpod/runtime_ctr.go index 1b3532f1f..8bf862bf2 100644 --- a/libpod/runtime_ctr.go +++ b/libpod/runtime_ctr.go @@ -10,12 +10,13 @@ import ( "github.com/containers/buildah" "github.com/containers/common/pkg/config" - "github.com/containers/podman/v2/libpod/define" - "github.com/containers/podman/v2/libpod/events" - "github.com/containers/podman/v2/libpod/shutdown" - "github.com/containers/podman/v2/pkg/cgroups" - "github.com/containers/podman/v2/pkg/domain/entities/reports" - "github.com/containers/podman/v2/pkg/rootless" + "github.com/containers/podman/v3/libpod/define" + "github.com/containers/podman/v3/libpod/events" + "github.com/containers/podman/v3/libpod/network" + "github.com/containers/podman/v3/libpod/shutdown" + "github.com/containers/podman/v3/pkg/cgroups" + "github.com/containers/podman/v3/pkg/domain/entities/reports" + "github.com/containers/podman/v3/pkg/rootless" "github.com/containers/storage" "github.com/containers/storage/pkg/stringid" "github.com/docker/go-units" @@ -285,6 +286,21 @@ func (r *Runtime) setupContainer(ctx context.Context, ctr *Container) (_ *Contai return nil, err } + // normalize the networks to names + // ocicni only knows about cni names so we have to make + // sure we do not use ids internally + if len(ctr.config.Networks) > 0 { + netNames := make([]string, 0, len(ctr.config.Networks)) + for _, nameOrID := range ctr.config.Networks { + netName, err := network.NormalizeName(r.config, nameOrID) + if err != nil { + return nil, err + } + netNames = append(netNames, netName) + } + ctr.config.Networks = netNames + } + // Inhibit shutdown until creation succeeds shutdown.Inhibit() defer shutdown.Uninhibit() diff --git a/libpod/runtime_img.go b/libpod/runtime_img.go index fcc52b392..6e1105b9e 100644 --- a/libpod/runtime_img.go +++ b/libpod/runtime_img.go @@ -15,10 +15,10 @@ import ( ociarchive "github.com/containers/image/v5/oci/archive" "github.com/containers/image/v5/oci/layout" "github.com/containers/image/v5/types" - "github.com/containers/podman/v2/libpod/define" - "github.com/containers/podman/v2/libpod/events" - "github.com/containers/podman/v2/libpod/image" - "github.com/containers/podman/v2/pkg/util" + "github.com/containers/podman/v3/libpod/define" + "github.com/containers/podman/v3/libpod/events" + "github.com/containers/podman/v3/libpod/image" + "github.com/containers/podman/v3/pkg/util" "github.com/containers/storage" "github.com/pkg/errors" "github.com/sirupsen/logrus" diff --git a/libpod/runtime_img_test.go b/libpod/runtime_img_test.go index 40d5860cf..7d6390c85 100644 --- a/libpod/runtime_img_test.go +++ b/libpod/runtime_img_test.go @@ -6,7 +6,7 @@ import ( "reflect" "testing" - sysreg "github.com/containers/podman/v2/pkg/registries" + sysreg "github.com/containers/podman/v3/pkg/registries" "github.com/stretchr/testify/assert" ) diff --git a/libpod/runtime_migrate.go b/libpod/runtime_migrate.go index f0f800ef0..3e63bc19e 100644 --- a/libpod/runtime_migrate.go +++ b/libpod/runtime_migrate.go @@ -11,9 +11,9 @@ import ( "strconv" "syscall" - "github.com/containers/podman/v2/libpod/define" - "github.com/containers/podman/v2/pkg/rootless" - "github.com/containers/podman/v2/pkg/util" + "github.com/containers/podman/v3/libpod/define" + "github.com/containers/podman/v3/pkg/rootless" + "github.com/containers/podman/v3/pkg/util" "github.com/pkg/errors" "github.com/sirupsen/logrus" ) diff --git a/libpod/runtime_pod.go b/libpod/runtime_pod.go index 6f9135764..b142472e8 100644 --- a/libpod/runtime_pod.go +++ b/libpod/runtime_pod.go @@ -4,8 +4,8 @@ import ( "context" "time" - "github.com/containers/podman/v2/libpod/define" - "github.com/containers/podman/v2/pkg/util" + "github.com/containers/podman/v3/libpod/define" + "github.com/containers/podman/v3/pkg/util" "github.com/pkg/errors" ) diff --git a/libpod/runtime_pod_infra_linux.go b/libpod/runtime_pod_infra_linux.go index c6f268182..000029fa4 100644 --- a/libpod/runtime_pod_infra_linux.go +++ b/libpod/runtime_pod_infra_linux.go @@ -6,10 +6,10 @@ import ( "context" "strings" - "github.com/containers/podman/v2/libpod/define" - "github.com/containers/podman/v2/libpod/image" - "github.com/containers/podman/v2/pkg/rootless" - "github.com/containers/podman/v2/pkg/util" + "github.com/containers/podman/v3/libpod/define" + "github.com/containers/podman/v3/libpod/image" + "github.com/containers/podman/v3/pkg/rootless" + "github.com/containers/podman/v3/pkg/util" v1 "github.com/opencontainers/image-spec/specs-go/v1" spec "github.com/opencontainers/runtime-spec/specs-go" "github.com/opencontainers/runtime-tools/generate" diff --git a/libpod/runtime_pod_linux.go b/libpod/runtime_pod_linux.go index 1eb42660c..cf48a9453 100644 --- a/libpod/runtime_pod_linux.go +++ b/libpod/runtime_pod_linux.go @@ -10,10 +10,10 @@ import ( "strings" "github.com/containers/common/pkg/config" - "github.com/containers/podman/v2/libpod/define" - "github.com/containers/podman/v2/libpod/events" - "github.com/containers/podman/v2/pkg/cgroups" - "github.com/containers/podman/v2/pkg/rootless" + "github.com/containers/podman/v3/libpod/define" + "github.com/containers/podman/v3/libpod/events" + "github.com/containers/podman/v3/pkg/cgroups" + "github.com/containers/podman/v3/pkg/rootless" spec "github.com/opencontainers/runtime-spec/specs-go" "github.com/pkg/errors" "github.com/sirupsen/logrus" diff --git a/libpod/runtime_pod_unsupported.go b/libpod/runtime_pod_unsupported.go index 6976d37c6..6dbcc9214 100644 --- a/libpod/runtime_pod_unsupported.go +++ b/libpod/runtime_pod_unsupported.go @@ -5,7 +5,7 @@ package libpod import ( "context" - "github.com/containers/podman/v2/libpod/define" + "github.com/containers/podman/v3/libpod/define" ) // NewPod makes a new, empty pod diff --git a/libpod/runtime_renumber.go b/libpod/runtime_renumber.go index 4c121be12..b19cc921f 100644 --- a/libpod/runtime_renumber.go +++ b/libpod/runtime_renumber.go @@ -1,7 +1,7 @@ package libpod import ( - "github.com/containers/podman/v2/libpod/events" + "github.com/containers/podman/v3/libpod/events" "github.com/pkg/errors" ) diff --git a/libpod/runtime_volume.go b/libpod/runtime_volume.go index 9d985f905..5f8f9ca1e 100644 --- a/libpod/runtime_volume.go +++ b/libpod/runtime_volume.go @@ -3,9 +3,9 @@ package libpod import ( "context" - "github.com/containers/podman/v2/libpod/define" - "github.com/containers/podman/v2/libpod/events" - "github.com/containers/podman/v2/pkg/domain/entities/reports" + "github.com/containers/podman/v3/libpod/define" + "github.com/containers/podman/v3/libpod/events" + "github.com/containers/podman/v3/pkg/domain/entities/reports" "github.com/pkg/errors" ) diff --git a/libpod/runtime_volume_linux.go b/libpod/runtime_volume_linux.go index 4a29f01aa..3d5bc8bb2 100644 --- a/libpod/runtime_volume_linux.go +++ b/libpod/runtime_volume_linux.go @@ -9,9 +9,9 @@ import ( "strings" "time" - "github.com/containers/podman/v2/libpod/define" - "github.com/containers/podman/v2/libpod/events" - volplugin "github.com/containers/podman/v2/libpod/plugin" + "github.com/containers/podman/v3/libpod/define" + "github.com/containers/podman/v3/libpod/events" + volplugin "github.com/containers/podman/v3/libpod/plugin" "github.com/containers/storage/pkg/stringid" pluginapi "github.com/docker/go-plugins-helpers/volume" "github.com/pkg/errors" diff --git a/libpod/runtime_volume_unsupported.go b/libpod/runtime_volume_unsupported.go index 3cdb73aed..da7ee3552 100644 --- a/libpod/runtime_volume_unsupported.go +++ b/libpod/runtime_volume_unsupported.go @@ -5,7 +5,7 @@ package libpod import ( "context" - "github.com/containers/podman/v2/libpod/define" + "github.com/containers/podman/v3/libpod/define" ) func (r *Runtime) removeVolume(ctx context.Context, v *Volume, force bool) error { diff --git a/libpod/state_test.go b/libpod/state_test.go index 0709071ec..559c84d1e 100644 --- a/libpod/state_test.go +++ b/libpod/state_test.go @@ -9,8 +9,8 @@ import ( "time" "github.com/containers/common/pkg/config" - "github.com/containers/podman/v2/libpod/define" - "github.com/containers/podman/v2/libpod/lock" + "github.com/containers/podman/v3/libpod/define" + "github.com/containers/podman/v3/libpod/lock" "github.com/containers/storage" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" diff --git a/libpod/stats.go b/libpod/stats.go index 09d990017..f4732b4fc 100644 --- a/libpod/stats.go +++ b/libpod/stats.go @@ -7,8 +7,8 @@ import ( "syscall" "time" - "github.com/containers/podman/v2/libpod/define" - "github.com/containers/podman/v2/pkg/cgroups" + "github.com/containers/podman/v3/libpod/define" + "github.com/containers/podman/v3/pkg/cgroups" "github.com/pkg/errors" ) diff --git a/libpod/stats_unsupported.go b/libpod/stats_unsupported.go index 749a8bf49..44a1c8d03 100644 --- a/libpod/stats_unsupported.go +++ b/libpod/stats_unsupported.go @@ -2,7 +2,7 @@ package libpod -import "github.com/containers/podman/v2/libpod/define" +import "github.com/containers/podman/v3/libpod/define" // GetContainerStats gets the running stats for a given container func (c *Container) GetContainerStats(previousStats *define.ContainerStats) (*define.ContainerStats, error) { diff --git a/libpod/storage.go b/libpod/storage.go index d7862b322..418eb3151 100644 --- a/libpod/storage.go +++ b/libpod/storage.go @@ -6,7 +6,7 @@ import ( istorage "github.com/containers/image/v5/storage" "github.com/containers/image/v5/types" - "github.com/containers/podman/v2/libpod/define" + "github.com/containers/podman/v3/libpod/define" "github.com/containers/storage" "github.com/containers/storage/pkg/idtools" v1 "github.com/opencontainers/image-spec/specs-go/v1" diff --git a/libpod/util.go b/libpod/util.go index 391208fb9..b75c9179a 100644 --- a/libpod/util.go +++ b/libpod/util.go @@ -14,8 +14,8 @@ import ( "time" "github.com/containers/common/pkg/config" - "github.com/containers/podman/v2/libpod/define" - "github.com/containers/podman/v2/utils" + "github.com/containers/podman/v3/libpod/define" + "github.com/containers/podman/v3/utils" "github.com/cri-o/ocicni/pkg/ocicni" "github.com/fsnotify/fsnotify" spec "github.com/opencontainers/runtime-spec/specs-go" diff --git a/libpod/util_linux.go b/libpod/util_linux.go index 5184ed393..32b058d27 100644 --- a/libpod/util_linux.go +++ b/libpod/util_linux.go @@ -7,9 +7,9 @@ import ( "strings" "syscall" - "github.com/containers/podman/v2/libpod/define" - "github.com/containers/podman/v2/pkg/cgroups" - "github.com/containers/podman/v2/pkg/rootless" + "github.com/containers/podman/v3/libpod/define" + "github.com/containers/podman/v3/pkg/cgroups" + "github.com/containers/podman/v3/pkg/rootless" "github.com/opencontainers/selinux/go-selinux/label" "github.com/pkg/errors" "github.com/sirupsen/logrus" diff --git a/libpod/util_test.go b/libpod/util_test.go index 5b1702592..160dca408 100644 --- a/libpod/util_test.go +++ b/libpod/util_test.go @@ -3,7 +3,7 @@ package libpod import ( "testing" - "github.com/containers/podman/v2/utils" + "github.com/containers/podman/v3/utils" "github.com/stretchr/testify/assert" ) diff --git a/libpod/util_unsupported.go b/libpod/util_unsupported.go index 4c7a90940..b718d36aa 100644 --- a/libpod/util_unsupported.go +++ b/libpod/util_unsupported.go @@ -3,7 +3,7 @@ package libpod import ( - "github.com/containers/podman/v2/libpod/define" + "github.com/containers/podman/v3/libpod/define" "github.com/pkg/errors" ) diff --git a/libpod/volume.go b/libpod/volume.go index 5cc5e7e40..506c45b5a 100644 --- a/libpod/volume.go +++ b/libpod/volume.go @@ -5,9 +5,9 @@ import ( "path/filepath" "time" - "github.com/containers/podman/v2/libpod/define" - "github.com/containers/podman/v2/libpod/lock" - "github.com/containers/podman/v2/libpod/plugin" + "github.com/containers/podman/v3/libpod/define" + "github.com/containers/podman/v3/libpod/lock" + "github.com/containers/podman/v3/libpod/plugin" ) // Volume is a libpod named volume. diff --git a/libpod/volume_inspect.go b/libpod/volume_inspect.go index 2448d1bb5..c3f51222d 100644 --- a/libpod/volume_inspect.go +++ b/libpod/volume_inspect.go @@ -1,7 +1,7 @@ package libpod import ( - "github.com/containers/podman/v2/libpod/define" + "github.com/containers/podman/v3/libpod/define" pluginapi "github.com/docker/go-plugins-helpers/volume" "github.com/pkg/errors" "github.com/sirupsen/logrus" diff --git a/libpod/volume_internal.go b/libpod/volume_internal.go index 88d940370..c1dbe00fd 100644 --- a/libpod/volume_internal.go +++ b/libpod/volume_internal.go @@ -4,7 +4,7 @@ import ( "os" "path/filepath" - "github.com/containers/podman/v2/libpod/define" + "github.com/containers/podman/v3/libpod/define" "github.com/pkg/errors" ) diff --git a/libpod/volume_internal_linux.go b/libpod/volume_internal_linux.go index 82c01be44..67ac41874 100644 --- a/libpod/volume_internal_linux.go +++ b/libpod/volume_internal_linux.go @@ -6,8 +6,8 @@ import ( "os/exec" "strings" - "github.com/containers/podman/v2/libpod/define" - "github.com/containers/podman/v2/pkg/rootless" + "github.com/containers/podman/v3/libpod/define" + "github.com/containers/podman/v3/pkg/rootless" pluginapi "github.com/docker/go-plugins-helpers/volume" "github.com/pkg/errors" "github.com/sirupsen/logrus" diff --git a/libpod/volume_internal_unsupported.go b/libpod/volume_internal_unsupported.go index ddbdbd8b6..77452cf22 100644 --- a/libpod/volume_internal_unsupported.go +++ b/libpod/volume_internal_unsupported.go @@ -3,7 +3,7 @@ package libpod import ( - "github.com/containers/podman/v2/libpod/define" + "github.com/containers/podman/v3/libpod/define" ) func (v *Volume) mount() error { |