mirror of
https://github.com/containers/podman.git
synced 2025-07-11 08:01:04 +08:00
.copr
.github
.tool
cmd
cni
completions
contrib
docs
hack
libpod
common
driver
image
layers
testdata
boltdb_state.go
boltdb_state_internal.go
boltdb_state_linux.go
boltdb_state_unsupported.go
common_test.go
container.go
container_api.go
container_attach.go
container_commit.go
container_easyjson.go
container_graph.go
container_graph_test.go
container_inspect.go
container_internal.go
container_internal_linux.go
container_internal_test.go
container_internal_unsupported.go
container_linux.go
container_top_linux.go
container_top_unsupported.go
container_unsupported.go
diff.go
errors.go
in_memory_state.go
info.go
networking_linux.go
networking_unsupported.go
oci.go
oci_linux.go
oci_unsupported.go
options.go
pod.go
pod_api.go
pod_easyjson.go
pod_internal.go
pod_top_linux.go
pod_top_unsupported.go
runtime.go
runtime_ctr.go
runtime_img.go
runtime_img_test.go
runtime_pod.go
runtime_pod_infra_linux.go
runtime_pod_linux.go
runtime_pod_unsupported.go
state.go
state_test.go
stats.go
stats_config.go
stats_unsupported.go
storage.go
util.go
util_linux.go
util_test.go
util_unsupported.go
version.go
logo
pkg
test
utils
vendor
version
.gitignore
.papr.sh
.papr.yml
.papr_prepare.sh
.travis.yml
API.md
CONTRIBUTING.md
Dockerfile
Dockerfile.CentOS
Dockerfile.Fedora
LICENSE
Makefile
OWNERS
README.md
RELEASE_NOTES.md
Vagrantfile
changelog.txt
code-of-conduct.md
commands.md
crio-umount.conf
docker
install.md
libpod.conf
seccomp.json
transfer.md
troubleshooting.md
vendor.conf

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
15 lines
351 B
Go
15 lines
351 B
Go
// +build linux
|
|
|
|
package libpod
|
|
|
|
import (
|
|
"github.com/containernetworking/plugins/pkg/ns"
|
|
)
|
|
|
|
type containerPlatformState struct {
|
|
// NetNSPath is the path of the container's network namespace
|
|
// Will only be set if config.CreateNetNS is true, or the container was
|
|
// told to join another container's network namespace
|
|
NetNS ns.NetNS `json:"-"`
|
|
}
|