summaryrefslogtreecommitdiff
path: root/libpod/container_internal.go
diff options
context:
space:
mode:
authorDaniel J Walsh <dwalsh@redhat.com>2018-03-17 20:08:27 -0400
committerAtomic Bot <atomic-devel@projectatomic.io>2018-03-29 01:55:20 +0000
commitc54816dfc39b00824b9d4902ed2e533b3c6c07a7 (patch)
treeb810d6625d3f095a7d7e8561bde651062ab9f44d /libpod/container_internal.go
parentf936b745b66de3cbbdf924a26bb35766afe5acba (diff)
downloadpodman-c54816dfc39b00824b9d4902ed2e533b3c6c07a7.tar.gz
podman-c54816dfc39b00824b9d4902ed2e533b3c6c07a7.tar.bz2
podman-c54816dfc39b00824b9d4902ed2e533b3c6c07a7.zip
Check for duplicate names when generating new container and pod names.
This fixes the situation where we fail to create a container when a name already exists. Signed-off-by: Daniel J Walsh <dwalsh@redhat.com> Closes: #517 Approved by: baude
Diffstat (limited to 'libpod/container_internal.go')
-rw-r--r--libpod/container_internal.go2
1 files changed, 0 insertions, 2 deletions
diff --git a/libpod/container_internal.go b/libpod/container_internal.go
index 28f7dfe45..a338a1776 100644
--- a/libpod/container_internal.go
+++ b/libpod/container_internal.go
@@ -15,7 +15,6 @@ import (
"github.com/containers/storage/pkg/archive"
"github.com/containers/storage/pkg/chrootarchive"
"github.com/docker/docker/pkg/mount"
- "github.com/docker/docker/pkg/namesgenerator"
"github.com/docker/docker/pkg/stringid"
spec "github.com/opencontainers/runtime-spec/specs-go"
"github.com/opencontainers/runtime-tools/generate"
@@ -150,7 +149,6 @@ func newContainer(rspec *spec.Spec, lockDir string) (*Container, error) {
ctr.state = new(containerState)
ctr.config.ID = stringid.GenerateNonCryptoID()
- ctr.config.Name = namesgenerator.GetRandomName(0)
ctr.config.Spec = new(spec.Spec)
deepcopier.Copy(rspec).To(ctr.config.Spec)