From 9c0e9e2f192541db06d6559722c64ee740975236 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Mon, 5 May 2014 13:30:23 -0300 Subject: propellor spin --- Propellor/Property/Docker.hs | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) (limited to 'Propellor') diff --git a/Propellor/Property/Docker.hs b/Propellor/Property/Docker.hs index e5b8d64a..6757c7cc 100644 --- a/Propellor/Property/Docker.hs +++ b/Propellor/Property/Docker.hs @@ -346,11 +346,18 @@ provisionContainer cid = containerDesc cid $ property "provision" $ liftIO $ do hPutStrLn stderr s hFlush stderr go Nothing rest - Done -> ret lastline - go lastline [] = ret lastline - - ret lastline = return $ fromMaybe FailedChange $ - readish =<< lastline + Done -> do + debug ["reached Done"] + ret lastline + go lastline [] = do + debug ["reached end of output"] + ret lastline + + ret lastline = do + let v = fromMaybe FailedChange $ + readish =<< lastline + debug ["provisionContainer returning", show v] + return v stopContainer :: ContainerId -> IO Bool stopContainer cid = boolSystem dockercmd [Param "stop", Param $ fromContainerId cid ] -- cgit v1.2.3