Created
March 13, 2017 18:37
-
-
Save sameo/9450d8ab0f8cbae7da747b82cd112ff1 to your computer and use it in GitHub Desktop.
This file contains 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 06c172d..117f386 100644 | |
--- a/server/container_create.go | |
+++ b/server/container_create.go | |
@@ -376,7 +376,7 @@ func (s *Server) createSandboxContainer(ctx context.Context, containerID string, | |
if containerInfo.Config != nil && len(containerInfo.Config.Config.Cmd) > 0 { | |
processArgs = containerInfo.Config.Config.Cmd | |
} else { | |
- processArgs = []string{"/bin/sh"} | |
+ processArgs = []string{podInfraCommand} | |
} | |
} | |
specgen.SetProcessArgs(processArgs) | |
diff --git a/server/container_status.go b/server/container_status.go | |
index 4afd911..33b76a0 100644 | |
--- a/server/container_status.go | |
+++ b/server/container_status.go | |
@@ -21,13 +21,23 @@ func (s *Server) ContainerStatus(ctx context.Context, req *pb.ContainerStatusReq | |
} | |
containerID := c.ID() | |
+ image := c.Image() | |
resp := &pb.ContainerStatusResponse{ | |
Status: &pb.ContainerStatus{ | |
Id: containerID, | |
Metadata: c.Metadata(), | |
+ Image: image, | |
}, | |
} | |
+ status, err := s.images.ImageStatus(s.imageContext, image.Image) | |
+ if err == nil { | |
+ resp.Status.ImageRef = status.ID | |
+ } else { | |
+ logrus.Errorf("Could not get Image status: %v", err) | |
+ resp.Status.ImageRef = "foobarfoobar" | |
+ } | |
+ | |
cState := s.runtime.ContainerStatus(c) | |
rStatus := pb.ContainerState_CONTAINER_UNKNOWN | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment