Merge pull request #185 from Crazykev/restore-annotation

restore pod annotations when restart ocid
This commit is contained in:
Mrunal Patel 2016-11-01 08:35:27 -07:00 committed by GitHub
commit 23d86cd866

View file

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