summaryrefslogtreecommitdiff
path: root/Propellor/Property
diff options
context:
space:
mode:
authorJoey Hess2014-04-04 15:49:49 -0400
committerJoey Hess2014-04-04 15:49:49 -0400
commitf31f8e8358397c8fef3a8334c1b8d12810a4743a (patch)
tree6b8c3d66e709a113dc0fc5b5a081099835c9db74 /Propellor/Property
parente6d9c792e72848e7977020fa9a3311fefff8e710 (diff)
propellor spin
Diffstat (limited to 'Propellor/Property')
-rw-r--r--Propellor/Property/Docker.hs7
1 files changed, 2 insertions, 5 deletions
diff --git a/Propellor/Property/Docker.hs b/Propellor/Property/Docker.hs
index e96603f5..2ed35fb4 100644
--- a/Propellor/Property/Docker.hs
+++ b/Propellor/Property/Docker.hs
@@ -227,11 +227,9 @@ runningContainer cid@(ContainerId hn cn) image containerprops = containerDesc ci
-- parameters of the container differ and it must
-- be restarted.
runningident <- getrunningident
- print runningident
if runningident == Just ident
then return NoChange
else do
- error "container parameters changed"
void $ stopContainer cid
restartcontainer
else ifM (elem cid <$> listContainers AllContainers)
@@ -247,9 +245,8 @@ runningContainer cid@(ContainerId hn cn) image containerprops = containerDesc ci
go oldimage
getrunningident :: IO (Maybe ContainerIdent)
- getrunningident = simpleShClient (namedPipe cid) "cat" [propellorIdent] $ \rs -> do
- print (rs, extractident rs)
- return $ extractident rs
+ getrunningident = simpleShClient (namedPipe cid) "cat" [propellorIdent] $
+ return . extractident
extractident :: [Resp] -> Maybe ContainerIdent
extractident = headMaybe . catMaybes . map (readish :: String -> Maybe ContainerIdent) . catMaybes . map getStdout