diff options
| author | Joey Hess <joey@kitenet.net> | 2014-04-11 00:48:37 -0400 |
|---|---|---|
| committer | Joey Hess <joey@kitenet.net> | 2014-04-11 00:48:37 -0400 |
| commit | 0274aec9491a4bacfc15ec302c9280a0d88046a1 (patch) | |
| tree | ab1654366cde6a3b2f256396cf0b30393f6c8c5f /Propellor/Property/Docker.hs | |
| parent | f5b27f4fa38d455a335dfb864ddc33e28c52dbc9 (diff) | |
propellor spin
Diffstat (limited to 'Propellor/Property/Docker.hs')
| -rw-r--r-- | Propellor/Property/Docker.hs | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/Propellor/Property/Docker.hs b/Propellor/Property/Docker.hs index edf12c2e..b75b2bfc 100644 --- a/Propellor/Property/Docker.hs +++ b/Propellor/Property/Docker.hs @@ -218,6 +218,9 @@ toContainerId s fromContainerId :: ContainerId -> String fromContainerId (ContainerId hn cn) = cn++"."++hn++myContainerSuffix +containerHostName :: ContainerId -> HostName +containerHostName (ContainerId _ cn) = cn + myContainerSuffix :: String myContainerSuffix = ".propellor" @@ -299,7 +302,7 @@ chain s = case toContainerId s of -- to avoid ever provisioning twice at the same time. whenM (checkProvisionedFlag cid) $ do let shim = Shim.file (localdir </> "propellor") (localdir </> shimdir cid) - unlessM (boolSystem shim [Param "--continue", Param $ show $ Chain $ fromContainerId cid]) $ + unlessM (boolSystem shim [Param "--continue", Param $ show $ Chain $ containerHostName cid]) $ warningMessage "Boot provision failed!" void $ async $ job reapzombies void $ async $ job $ simpleSh $ namedPipe cid @@ -328,7 +331,7 @@ provisionContainer cid = containerDesc cid $ Property "provision" $ liftIO $ do setProvisionedFlag cid return r where - params = ["--continue", show $ Chain $ fromContainerId cid] + params = ["--continue", show $ Chain $ containerHostName cid] go lastline (v:rest) = case v of StdoutLine s -> do |
