Merge pull request #822 from mrunalp/label_infra_ctr

sandbox: Add special label to infra container
This commit is contained in:
Antonio Murdaca 2017-09-01 22:10:54 +02:00 committed by GitHub
commit 11fbcd235c
12 changed files with 404 additions and 8 deletions

View file

@ -48,8 +48,11 @@ func (s *Server) GetInfoMux() *bone.Mux {
containerID := bone.GetValue(req, "id")
ctr := s.GetContainer(containerID)
if ctr == nil {
http.Error(w, fmt.Sprintf("container with id: %s not found", containerID), http.StatusNotFound)
return
ctr = s.getInfraContainer(containerID)
if ctr == nil {
http.Error(w, fmt.Sprintf("container with id: %s not found", containerID), http.StatusNotFound)
return
}
}
ctrState := ctr.State()
if ctrState == nil {