From e9378f23caf9c15eb22bf62b7043fb316360797c Mon Sep 17 00:00:00 2001 From: Mrunal Patel Date: Fri, 1 Sep 2017 08:50:17 -0700 Subject: [PATCH] server: Lookup infra containers as well in endpoint Signed-off-by: Mrunal Patel --- server/inspect.go | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/server/inspect.go b/server/inspect.go index b132c9e6..3eff459d 100644 --- a/server/inspect.go +++ b/server/inspect.go @@ -49,8 +49,11 @@ func (s *Server) StartInfoEndpoints() error { 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 {