propellor spin
This commit is contained in:
parent
d96bc41d06
commit
0b7fb01032
|
@ -223,8 +223,12 @@ runningContainer cid@(ContainerId hn cn) image containerprops = containerDesc ci
|
||||||
l <- listContainers RunningContainers
|
l <- listContainers RunningContainers
|
||||||
if cid `elem` l
|
if cid `elem` l
|
||||||
then do
|
then do
|
||||||
|
-- Check if the ident has changed; if so the
|
||||||
|
-- parameters of the container differ and it must
|
||||||
|
-- be restarted.
|
||||||
runningident <- getrunningident
|
runningident <- getrunningident
|
||||||
if (ident2id <$> runningident) == Just (ident2id ident)
|
print runningident
|
||||||
|
if runningident == Just ident
|
||||||
then return NoChange
|
then return NoChange
|
||||||
else do
|
else do
|
||||||
void $ stopContainer cid
|
void $ stopContainer cid
|
||||||
|
@ -238,11 +242,10 @@ runningContainer cid@(ContainerId hn cn) image containerprops = containerDesc ci
|
||||||
where
|
where
|
||||||
ident = ContainerIdent image hn cn runps
|
ident = ContainerIdent image hn cn runps
|
||||||
|
|
||||||
|
getrunningident :: IO (Maybe ContainerIdent)
|
||||||
getrunningident = catchDefaultIO Nothing $
|
getrunningident = catchDefaultIO Nothing $
|
||||||
simpleShClient (namedPipe cid) "cat" [propellorIdent] $ \vs -> do
|
simpleShClient (namedPipe cid) "cat" [propellorIdent] $
|
||||||
print vs
|
pure . headMaybe . catMaybes . map readish . catMaybes . map getStdout
|
||||||
-- pure . headMaybe . catMaybes . map readish . catMaybes . map getStdout
|
|
||||||
return Nothing
|
|
||||||
|
|
||||||
runps = getRunParams $ containerprops ++
|
runps = getRunParams $ containerprops ++
|
||||||
-- expose propellor directory inside the container
|
-- expose propellor directory inside the container
|
||||||
|
|
Loading…
Reference in New Issue