From 5b749a56d8f26420b7253a3788e08467dc720e7f Mon Sep 17 00:00:00 2001 From: lifupan Date: Thu, 22 Aug 2019 12:48:14 +0800 Subject: [PATCH] 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 --- virtcontainers/sandbox.go | 9 --------- 1 file changed, 9 deletions(-) diff --git a/virtcontainers/sandbox.go b/virtcontainers/sandbox.go index ad1abddeab..fcc4697e1a 100644 --- a/virtcontainers/sandbox.go +++ b/virtcontainers/sandbox.go @@ -1138,10 +1138,6 @@ func (s *Sandbox) CreateContainer(contConfig ContainerConfig) (VCContainer, erro return nil, err } - if err := s.store.Store(store.Configuration, *(s.config)); err != nil { - return nil, err - } - if err := s.updateCgroups(); err != nil { 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 { return nil, err }