summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoey Hess2014-12-01 11:53:54 -0400
committerJoey Hess2014-12-01 11:53:54 -0400
commitd84e7a2848be31a08570e683eb20ac2451d14a78 (patch)
treec179d6d0931f3b0ab93256591bd21f871c70e7f7
parentcd8c6114229a5f725bd1818f1fc2d0538c40f486 (diff)
parent1906500030b1f2692d9abe46c2368338d9163894 (diff)
Merge branch 'joeyconfig'
-rw-r--r--config-joey.hs14
-rw-r--r--src/Propellor/Engine.hs6
-rw-r--r--src/Propellor/Property/Docker.hs2
3 files changed, 18 insertions, 4 deletions
diff --git a/config-joey.hs b/config-joey.hs
index 67986ffe..b617ccfa 100644
--- a/config-joey.hs
+++ b/config-joey.hs
@@ -24,9 +24,10 @@ import qualified Propellor.Property.Postfix as Postfix
import qualified Propellor.Property.Grub as Grub
import qualified Propellor.Property.Obnam as Obnam
import qualified Propellor.Property.Gpg as Gpg
-import qualified Propellor.Property.Chroot as Chroot
import qualified Propellor.Property.Systemd as Systemd
+import qualified Propellor.Property.Chroot as Chroot
import qualified Propellor.Property.Debootstrap as Debootstrap
+import qualified Propellor.Property.OS as OS
import qualified Propellor.Property.HostingProvider.DigitalOcean as DigitalOcean
import qualified Propellor.Property.HostingProvider.CloudAtCost as CloudAtCost
import qualified Propellor.Property.HostingProvider.Linode as Linode
@@ -48,8 +49,17 @@ hosts = -- (o) `
, diatom
, elephant
, alien
+ , testvm
] ++ monsters
+testvm :: Host
+testvm = host "testvm.kitenet.net"
+ & Chroot.provisioned (Chroot.debootstrapped (System (Debian Unstable) "amd64") Debootstrap.DefaultConfig "/new-os")
+ -- & OS.cleanInstall (OS.Confirmed "foo.example.com") []
+ -- `onChange` propertyList "fixing up after clean install"
+ -- [
+ -- ]
+
darkstar :: Host
darkstar = host "darkstar.kitenet.net"
& ipv6 "2001:4830:1600:187::2" -- sixxs tunnel
@@ -120,7 +130,7 @@ orca = standardSystem "orca.kitenet.net" Unstable "amd64"
-- multiuser system with eg, user passwords that are not deployed
-- with propellor.
kite :: Host
-kite = standardSystemUnhardened "kite.kitenet.net" Unstable "amd64"
+kite = standardSystemUnhardened "kite.kitenet.net" Testing "amd64"
[ "Welcome to the new kitenet.net server!"
]
& ipv4 "66.228.36.95"
diff --git a/src/Propellor/Engine.hs b/src/Propellor/Engine.hs
index 0b65fb7e..81cc2397 100644
--- a/src/Propellor/Engine.hs
+++ b/src/Propellor/Engine.hs
@@ -77,12 +77,16 @@ processChainOutput h = go Nothing
where
go lastline = do
v <- catchMaybeIO (hGetLine h)
+ debug ["read from chained propellor: ", show v]
case v of
Nothing -> case lastline of
- Nothing -> pure FailedChange
+ Nothing -> do
+ debug ["chained propellor output nothing; assuming it failed"]
+ return FailedChange
Just l -> case readish l of
Just r -> pure r
Nothing -> do
+ debug ["chained propellor output did not end with a Result; assuming it failed"]
putStrLn l
hFlush stdout
return FailedChange
diff --git a/src/Propellor/Property/Docker.hs b/src/Propellor/Property/Docker.hs
index 586ebc2e..5fa06517 100644
--- a/src/Propellor/Property/Docker.hs
+++ b/src/Propellor/Property/Docker.hs
@@ -430,7 +430,7 @@ provisionContainer cid = containerDesc cid $ property "provisioned" $ liftIO $ d
let params = ["--continue", show $ toChain cid]
msgh <- mkMessageHandle
let p = inContainerProcess cid
- [ if isConsole msgh then "-it" else "-i" ]
+ (if isConsole msgh then ["-it"] else [])
(shim : params)
r <- withHandle StdoutHandle createProcessSuccess p $
processChainOutput