virtcontainers: remove the redundant sandbox config store

The following storeSandbox() will store the sandbox config
data, thus there is no need to store it specifically before
run storeSandbox().

Signed-off-by: lifupan <lifupan@gmail.com>
This commit is contained in:
lifupan 2019-08-22 12:48:14 +08:00
parent 0db6974ace
commit 5b749a56d8

View File

@ -1138,10 +1138,6 @@ func (s *Sandbox) CreateContainer(contConfig ContainerConfig) (VCContainer, erro
return nil, err return nil, err
} }
if err := s.store.Store(store.Configuration, *(s.config)); err != nil {
return nil, err
}
if err := s.updateCgroups(); err != nil { if err := s.updateCgroups(); err != nil {
return nil, err return nil, err
} }
@ -1242,11 +1238,6 @@ func (s *Sandbox) DeleteContainer(containerID string) (VCContainer, error) {
} }
} }
// Store sandbox config
if err := s.store.Store(store.Configuration, *(s.config)); err != nil {
return nil, err
}
if err = s.storeSandbox(); err != nil { if err = s.storeSandbox(); err != nil {
return nil, err return nil, err
} }