github.com/equinix-metal/virtlet@v1.5.2-0.20191204181327-1659b8a48e9b/cri-tools.patch (about) 1 diff --git a/pkg/framework/util.go b/pkg/framework/util.go 2 index 290485a..7b53fe6 100644 3 --- a/pkg/framework/util.go 4 +++ b/pkg/framework/util.go 5 @@ -50,7 +50,7 @@ const ( 6 DefaultAttempt uint32 = 2 7 8 // DefaultContainerImage is the default image for container using 9 - DefaultContainerImage string = "busybox:1.26" 10 + DefaultContainerImage string = "download.cirros-cloud.net/0.3.5/cirros-0.3.5-x86_64-disk.img" 11 12 // DefaultStopContainerTimeout is the default timeout for stopping container 13 DefaultStopContainerTimeout int64 = 60 14 @@ -120,7 +120,7 @@ func NewUUID() string { 15 16 // RunDefaultPodSandbox runs a PodSandbox with default options. 17 func RunDefaultPodSandbox(c internalapi.RuntimeService, prefix string) string { 18 - podSandboxName := prefix + NewUUID() 19 + podSandboxName := prefix 20 uid := DefaultUIDPrefix + NewUUID() 21 namespace := DefaultNamespacePrefix + NewUUID() 22 23 @@ -172,7 +172,7 @@ func BuildContainerMetadata(containerName string, attempt uint32) *runtimeapi.Co 24 25 // CreateDefaultContainer creates a default container with default options. 26 func CreateDefaultContainer(rc internalapi.RuntimeService, ic internalapi.ImageManagerService, podID string, podConfig *runtimeapi.PodSandboxConfig, prefix string) string { 27 - containerName := prefix + NewUUID() 28 + containerName := prefix 29 containerConfig := &runtimeapi.ContainerConfig{ 30 Metadata: BuildContainerMetadata(containerName, DefaultAttempt), 31 Image: &runtimeapi.ImageSpec{Image: DefaultContainerImage}, 32 diff --git a/pkg/validate/container.go b/pkg/validate/container.go 33 index 67a414f..e7d6097 100644 34 --- a/pkg/validate/container.go 35 +++ b/pkg/validate/container.go 36 @@ -223,7 +223,7 @@ func getContainerStatus(c internalapi.RuntimeService, containerID string) *runti 37 38 // createShellContainer creates a container to run /bin/sh. 39 func createShellContainer(rc internalapi.RuntimeService, ic internalapi.ImageManagerService, podID string, podConfig *runtimeapi.PodSandboxConfig, prefix string) string { 40 - containerName := prefix + framework.NewUUID() 41 + containerName := prefix 42 containerConfig := &runtimeapi.ContainerConfig{ 43 Metadata: framework.BuildContainerMetadata(containerName, framework.DefaultAttempt), 44 Image: &runtimeapi.ImageSpec{Image: framework.DefaultContainerImage}, 45 @@ -342,7 +342,7 @@ func createHostPath(podID string) (string, string) { 46 // createVolContainerOrFail creates a container with volume and the prefix of containerName and fails if it gets error. 47 func createVolumeContainer(rc internalapi.RuntimeService, ic internalapi.ImageManagerService, prefix string, podID string, podConfig *runtimeapi.PodSandboxConfig, hostPath, flagFile string) string { 48 By("create a container with volume and name") 49 - containerName := prefix + framework.NewUUID() 50 + containerName := prefix 51 containerConfig := &runtimeapi.ContainerConfig{ 52 Metadata: framework.BuildContainerMetadata(containerName, framework.DefaultAttempt), 53 Image: &runtimeapi.ImageSpec{Image: framework.DefaultContainerImage}, 54 @@ -362,7 +362,7 @@ func createVolumeContainer(rc internalapi.RuntimeService, ic internalapi.ImageMa 55 // createLogContainer creates a container with log and the prefix of containerName. 56 func createLogContainer(rc internalapi.RuntimeService, ic internalapi.ImageManagerService, prefix string, podID string, podConfig *runtimeapi.PodSandboxConfig) (string, string) { 57 By("create a container with log and name") 58 - containerName := prefix + framework.NewUUID() 59 + containerName := prefix 60 path := fmt.Sprintf("%s.log", containerName) 61 containerConfig := &runtimeapi.ContainerConfig{ 62 Metadata: framework.BuildContainerMetadata(containerName, framework.DefaultAttempt), 63 diff --git a/pkg/validate/image.go b/pkg/validate/image.go 64 index 343ac67..cab9247 100644 65 --- a/pkg/validate/image.go 66 +++ b/pkg/validate/image.go 67 @@ -29,13 +29,13 @@ import ( 68 69 var ( 70 // image name for test image api 71 - testImageName = "busybox" 72 + testImageName = "download.cirros-cloud.net/0.3.5/cirros-0.3.5-x86_64-disk.img" 73 74 // name-tagged reference for test image 75 testImageRef = testImageName + ":1.26.2" 76 77 // Digested reference for test image 78 - busyboxDigestRef = testImageName + "@sha256:817a12c32a39bbe394944ba49de563e085f1d3c5266eb8e9723256bc4448680e" 79 + busyboxDigestRef = "download.cirros-cloud.net/0.3.5/cirros-0.3.5-x86_64-disk.img" 80 ) 81 82 var _ = framework.KubeDescribe("Image Manager", func() {