Do not fetch pod and ctr State on retrieval in Bolt

It's not necessary to fill in state immediately, as we'll be
overwriting it on any API call accessing it thanks to
syncContainer(). It is also causing races when we fetch it
without holding the container lock (which syncContainer() does).
As such, just don't retrieve the state on initial pull from the
database with Bolt.

Also, refactor some Linux-specific netns handling functions out
of container_internal_linux.go into boltdb_linux.go.

Signed-off-by: Matthew Heon <matthew.heon@gmail.com>

Closes: #1186
Approved by: rhatdan
This commit is contained in:
Matthew Heon
2018-07-30 09:42:35 -04:00
committed by Atomic Bot
parent cfcd928476
commit 1db70cce34
7 changed files with 64 additions and 99 deletions

View File

@ -3,11 +3,3 @@
package libpod
type containerPlatformState struct{}
func (ctr *Container) setNamespace(netNSPath string, newState *containerState) error {
return ErrNotImplemented
}
func (ctr *Container) setNamespaceStatePath() string {
return ""
}