restore pod annotations when restart ocid

Signed-off-by: Crazykev <crazykev@zju.edu.cn>
This commit is contained in:
Crazykev 2016-11-01 13:49:21 +08:00
parent a742bf6a8e
commit 54a022defb

View file

@ -103,6 +103,11 @@ func (s *Server) loadSandbox(id string) error {
return err
}
annotations := make(map[string]string)
if err = json.Unmarshal([]byte(m.Annotations["ocid/annotations"]), &annotations); err != nil {
return err
}
sb := &sandbox{
id: id,
name: name,
@ -111,6 +116,7 @@ func (s *Server) loadSandbox(id string) error {
containers: oci.NewMemoryStore(),
processLabel: processLabel,
mountLabel: mountLabel,
annotations: annotations,
}
s.addSandbox(sb)