diff options
| author | Joey Hess <joey@kitenet.net> | 2014-10-23 03:18:52 -0400 |
|---|---|---|
| committer | Joey Hess <joey@kitenet.net> | 2014-10-23 03:18:52 -0400 |
| commit | 93099b862768235d3f9936435f6f65292b8d9b7c (patch) | |
| tree | 525edf972621123c3c426c5955050148f0f091c5 | |
| parent | ddd2031267e13ac47e4990847dd53e536b308e02 (diff) | |
bugfix
| -rw-r--r-- | debian/changelog | 8 | ||||
| -rw-r--r-- | src/Propellor/Property.hs | 2 | ||||
| -rw-r--r-- | src/Propellor/Property/Docker.hs | 3 |
3 files changed, 11 insertions, 2 deletions
diff --git a/debian/changelog b/debian/changelog index 012826bd..043ef508 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,11 @@ +propellor (0.9.1) UNRELEASED; urgency=medium + + * Docker: Add ability to control when containers restart. + * Docker: Defaut to always restarting containers, so they come back + up after reboots and docker daemon upgrades. + + -- Joey Hess <joeyh@debian.org> Thu, 23 Oct 2014 03:05:22 -0400 + propellor (0.9.0) unstable; urgency=medium * Avoid encoding the current stable suite in propellor's code, diff --git a/src/Propellor/Property.hs b/src/Propellor/Property.hs index ce825192..87136042 100644 --- a/src/Propellor/Property.hs +++ b/src/Propellor/Property.hs @@ -135,7 +135,7 @@ host hn = Host hn [] mempty -- -- Can add Properties and RevertableProperties (&) :: IsProp p => Host -> p -> Host -(Host hn ps as) & p = Host hn (ps ++ [toProp p]) (as <> getInfo p) +(Host hn ps is) & p = Host hn (ps ++ [toProp p]) (is <> getInfo p) infixl 1 & diff --git a/src/Propellor/Property/Docker.hs b/src/Propellor/Property/Docker.hs index 120b51cf..358cc8c3 100644 --- a/src/Propellor/Property/Docker.hs +++ b/src/Propellor/Property/Docker.hs @@ -282,7 +282,7 @@ restart policy = runProp "restart" (serialize policy) where serialize NoRestart = "no" serialize (RestartOnFailure Nothing) = "on-failure" - serialize (RestartOnFailure n) = "on-failure:" ++ show n + serialize (RestartOnFailure (Just n)) = "on-failure:" ++ show n serialize RestartAlways = "always" -- | RestartAlways is the default for docker containers configured by @@ -388,6 +388,7 @@ runningContainer cid@(ContainerId hn cn) image runps = containerDesc cid $ prope -- in mkContainer, to avoid changing the ident -- of existing containers. Any restart property -- will override it. + -- This is a hack. TODO: Move to correct place. ("--restart=always" : runps ++ ["-i", "-d", "-t"]) [shim, "--docker", fromContainerId cid] |
