server: Lookup infra containers as well in endpoint
Signed-off-by: Mrunal Patel <mrunalp@gmail.com>
This commit is contained in:
parent
138a40540f
commit
e9378f23ca
1 changed files with 5 additions and 2 deletions
|
@ -49,8 +49,11 @@ func (s *Server) StartInfoEndpoints() error {
|
||||||
containerID := bone.GetValue(req, "id")
|
containerID := bone.GetValue(req, "id")
|
||||||
ctr := s.GetContainer(containerID)
|
ctr := s.GetContainer(containerID)
|
||||||
if ctr == nil {
|
if ctr == nil {
|
||||||
http.Error(w, fmt.Sprintf("container with id: %s not found", containerID), http.StatusNotFound)
|
ctr = s.getInfraContainer(containerID)
|
||||||
return
|
if ctr == nil {
|
||||||
|
http.Error(w, fmt.Sprintf("container with id: %s not found", containerID), http.StatusNotFound)
|
||||||
|
return
|
||||||
|
}
|
||||||
}
|
}
|
||||||
ctrState := ctr.State()
|
ctrState := ctr.State()
|
||||||
if ctrState == nil {
|
if ctrState == nil {
|
||||||
|
|
Loading…
Reference in a new issue