aboutsummaryrefslogtreecommitdiff
path: root/libpod/pod.go
diff options
context:
space:
mode:
authorMatthew Heon <matthew.heon@gmail.com>2018-04-02 12:23:19 -0400
committerAtomic Bot <atomic-devel@projectatomic.io>2018-04-03 14:57:16 +0000
commit98b19aeb0ceba4cae10cb89a99ff2af0738027ba (patch)
treeba6a47be4dd1af9a8fc135368c656a82131e49d4 /libpod/pod.go
parent4d4646d09b6fb1a8914f6a564baf7fbe4d683f9b (diff)
downloadpodman-98b19aeb0ceba4cae10cb89a99ff2af0738027ba.tar.gz
podman-98b19aeb0ceba4cae10cb89a99ff2af0738027ba.tar.bz2
podman-98b19aeb0ceba4cae10cb89a99ff2af0738027ba.zip
Refactor dependency checks from init() into public API
Instead of checking during init(), which could result in major locking issues when used with pods, make our dependency checks in the public API instead. This avoids doing them when we start pods (where, because of the dependency graph, we can reasonably say all dependencies are up before we start a container). Signed-off-by: Matthew Heon <matthew.heon@gmail.com> Closes: #577 Approved by: rhatdan
Diffstat (limited to 'libpod/pod.go')
-rw-r--r--libpod/pod.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/libpod/pod.go b/libpod/pod.go
index f7059800a..7d9e2c81b 100644
--- a/libpod/pod.go
+++ b/libpod/pod.go
@@ -165,6 +165,11 @@ func startNode(node *containerNode, setError bool, ctrErrors map[string]error, c
// Going to start the container, mark us as visited
ctrsVisited[node.id] = true
+ // TODO: Maybe have a checkDependenciesRunningLocked here?
+ // Graph traversal should ensure our deps have been started, but some
+ // might have stopped since?
+ // Potentially will hurt our perf, though
+
// Start the container (only if it is not running)
ctrErrored := false
if node.container.state.State != ContainerStateRunning {