Created
April 4, 2017 09:53
-
-
Save sameo/dbb86800472f57f5333c31acfc07dcb0 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| diff --git a/server/container_create.go b/server/container_create.go | |
| index 7834e88..608cade 100644 | |
| --- a/server/container_create.go | |
| +++ b/server/container_create.go | |
| @@ -71,23 +71,8 @@ func buildOCIProcessArgs(containerKubeConfig *pb.ContainerConfig, imageOCIConfig | |
| kubeArgs := containerKubeConfig.Args | |
| if imageOCIConfig == nil { | |
| - // HACK We should error out here, not being able to get an Image config is fatal. | |
| - // When https://github.com/kubernetes-incubator/cri-o/issues/395 is fixed | |
| - // we'll remove that one and return an error here. | |
| - if containerKubeConfig.Metadata != nil { | |
| - logrus.Errorf("empty image config for %s", containerKubeConfig.Metadata.Name) | |
| - | |
| - // HACK until https://github.com/kubernetes-incubator/cri-o/issues/395 is fixed. | |
| - // If the container is kubeadm's dummy, imageOCIConfig is nil, and both | |
| - // kubeCommands and kubeArgs are empty. So we set processArgs to /pause as the | |
| - // dummy container is just a pause one. | |
| - // (See https://github.com/kubernetes/kubernetes/blob/master/cmd/kubeadm/app/master/templates.go) | |
| - if containerKubeConfig.Metadata.Name == "dummy" { | |
| - return []string{podInfraCommand}, nil | |
| - } | |
| - } else { | |
| - logrus.Errorf("empty image config for %s", containerKubeConfig.Image.Image) | |
| - } | |
| + logrus.Errorf("IMAGE: empty image config for %s", containerKubeConfig.Image.Image) | |
| + return nil, fmt.Errorf("IMAGE: empty image config for %s", containerKubeConfig.Image.Image) | |
| } | |
| // We got an OCI Image configuration. | |
| @@ -110,10 +95,8 @@ func buildOCIProcessArgs(containerKubeConfig *pb.ContainerConfig, imageOCIConfig | |
| processEntryPoint = imageOCIConfig.Config.Cmd | |
| } | |
| } else { | |
| - // We neither have a kubelet command not an image OCI config. | |
| - // Missing an image OCI config will no longer be supported after | |
| - // https://github.com/kubernetes-incubator/cri-o/issues/395 is fixed. | |
| - processEntryPoint = []string{"/bin/sh", "-c"} | |
| + logrus.Errorf("IMAGE: empty image config for %s", containerKubeConfig.Image.Image) | |
| + return nil, fmt.Errorf("IMAGE: empty image config for %s", containerKubeConfig.Image.Image) | |
| } | |
| } | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment