propellor spin

This commit is contained in:
Joey Hess 2014-04-04 15:58:48 -04:00
parent 68ed5153aa
commit 075a8eac5b
Failed to extract signature
2 changed files with 11 additions and 5 deletions

View File

@ -1,4 +1,4 @@
{-# LANGUAGE RankNTypes #-} {-# LANGUAGE RankNTypes, BangPatterns #-}
-- | Docker support for propellor -- | Docker support for propellor
-- --
@ -227,7 +227,6 @@ runningContainer cid@(ContainerId hn cn) image containerprops = containerDesc ci
-- parameters of the container differ and it must -- parameters of the container differ and it must
-- be restarted. -- be restarted.
runningident <- getrunningident runningident <- getrunningident
print runningident
if runningident == Just ident if runningident == Just ident
then return NoChange then return NoChange
else do else do
@ -247,11 +246,11 @@ runningContainer cid@(ContainerId hn cn) image containerprops = containerDesc ci
getrunningident :: IO (Maybe ContainerIdent) getrunningident :: IO (Maybe ContainerIdent)
getrunningident = simpleShClient (namedPipe cid) "cat" [propellorIdent] $ \rs -> do getrunningident = simpleShClient (namedPipe cid) "cat" [propellorIdent] $ \rs -> do
print (extractident rs) let !v = extractident rs
return $ extractident rs return v
extractident :: [Resp] -> Maybe ContainerIdent extractident :: [Resp] -> Maybe ContainerIdent
extractident = headMaybe . catMaybes . map (readish :: String -> Maybe ContainerIdent) . catMaybes . map getStdout extractident = headMaybe . catMaybes . map readish . catMaybes . map getStdout
runps = getRunParams $ containerprops ++ runps = getRunParams $ containerprops ++
-- expose propellor directory inside the container -- expose propellor directory inside the container

7
debian/changelog vendored
View File

@ -1,3 +1,10 @@
propellor (0.2.3) UNRELEASED; urgency=medium
* docker: Fix laziness bug that caused running containers to be
unnecessarily stopped and committed.
-- Joey Hess <joeyh@debian.org> Fri, 04 Apr 2014 15:58:03 -0400
propellor (0.2.2) unstable; urgency=medium propellor (0.2.2) unstable; urgency=medium
* Now supports provisioning docker containers with architecture/libraries * Now supports provisioning docker containers with architecture/libraries