propellor spin

This commit is contained in:
Joey Hess 2014-04-04 15:07:51 -04:00
parent 00b27119ee
commit 4d69d83def
Failed to extract signature
1 changed files with 3 additions and 6 deletions

View File

@ -231,7 +231,7 @@ runningContainer cid@(ContainerId hn cn) image containerprops = containerDesc ci
if runningident == Just ident if runningident == Just ident
then return NoChange then return NoChange
else do else do
print "container parameters changed" debug ["container parameters changed"]
void $ stopContainer cid void $ stopContainer cid
oldimage <- fromMaybe image <$> commitContainer cid oldimage <- fromMaybe image <$> commitContainer cid
void $ removeContainer cid void $ removeContainer cid
@ -244,11 +244,8 @@ runningContainer cid@(ContainerId hn cn) image containerprops = containerDesc ci
ident = ContainerIdent image hn cn runps ident = ContainerIdent image hn cn runps
getrunningident :: IO (Maybe ContainerIdent) getrunningident :: IO (Maybe ContainerIdent)
getrunningident = simpleShClient (namedPipe cid) "cat" [propellorIdent] $ \vs -> do getrunningident = simpleShClient (namedPipe cid) "cat" [propellorIdent] $
let l = (extractident) vs return . extractident
print l
print vs
return l
extractident :: [Resp] -> Maybe ContainerIdent extractident :: [Resp] -> Maybe ContainerIdent
extractident = headMaybe . catMaybes . map readish . catMaybes . map getStdout extractident = headMaybe . catMaybes . map readish . catMaybes . map getStdout