Merge branch 'joeyconfig'

This commit is contained in:
Joey Hess 2014-12-01 11:53:54 -04:00
commit d84e7a2848
3 changed files with 18 additions and 4 deletions

View File

@ -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"

View File

@ -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

View File

@ -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