diff options
| author | Joey Hess <joey@kitenet.net> | 2014-04-02 13:28:46 -0400 |
|---|---|---|
| committer | Joey Hess <joey@kitenet.net> | 2014-04-02 13:28:46 -0400 |
| commit | bbc4a84f4f905fa8fcc382ab3425f4c3f62add9c (patch) | |
| tree | 96a7c462de7642654c277d3468ac02a15cc51f25 | |
| parent | 16b4d1616248522275ec2312ca22ff2a65e78133 (diff) | |
always clear the provisioned flag
| -rw-r--r-- | Propellor/Property/Docker.hs | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/Propellor/Property/Docker.hs b/Propellor/Property/Docker.hs index 3f90d157..0cec9e1e 100644 --- a/Propellor/Property/Docker.hs +++ b/Propellor/Property/Docker.hs @@ -230,14 +230,12 @@ runningContainer cid@(ContainerId hn cn) image containerprops = containerDesc ci if (ident2id <$> runningident) == Just (ident2id ident) then return NoChange else do - clearProvisionedFlag cid void $ stopContainer cid oldimage <- fromMaybe image <$> commitContainer cid void $ removeContainer cid go oldimage else do whenM (elem cid <$> listContainers AllContainers) $ do - clearProvisionedFlag cid void $ removeContainer cid go image where @@ -258,6 +256,7 @@ runningContainer cid@(ContainerId hn cn) image containerprops = containerDesc ci chaincmd = [localdir </> "propellor", "--docker", fromContainerId cid] go img = do + clearProvisionedFlag cid createDirectoryIfMissing True (takeDirectory $ identFile cid) writeFile (identFile cid) (show ident) ifM (runContainer img (runps ++ ["-i", "-d", "-t"]) chaincmd) |
