On Tue, Jan 29, 2013 at 11:35 +0100, Iustin Pop <[email protected]> wrote:
> > (c) just use oLuxiSocket as-is (to allow for alternate Luxi socket
> > locations), but have the code in Harep.hs _default_ itself to using
> > Path.defaultLuxiSocket.
> > In (c), `harep` without any options works, but -L can be pass to
> > specify an alternate location of the socket.
> > Thoughts?
> I was thinking of a new option that is similar to oLuxiSocket, just
> defaulting to the defaultLuxiSocket, i.e. (b). But I'm not sure why this
> would be more work, instead of oLuxiSocket it would simply be
> oLuxiSocketAlways or such.
> However, (c) looks appealing, so let's go with that.
Ok, the implementation of (c) looks like:
5/11:
--- src/Ganeti/HTools/Program/Harep.hs
+++ src/Ganeti/HTools/Program/Harep.hs
@@ -53,9 +53,4 @@ main opts args = do
unless (null args) $
exitErr "this program doesn't take any arguments."
- let lsock = optLuxi opts
-
- when (isNothing lsock) $
- exitErr "Luxi socket (-L) required to execute jobs."
-
return ()
6/11:
--- src/Ganeti/HTools/Program/Harep.hs
+++ src/Ganeti/HTools/Program/Harep.hs
@@ -39,6 +39,7 @@ import Ganeti.Common
import Ganeti.Types
import Ganeti.Utils
import qualified Ganeti.Constants as C
+import qualified Ganeti.Path as Path
import Ganeti.HTools.CLI
import Ganeti.HTools.Loader
@@ -177,7 +178,11 @@ main opts args = do
unless (null args) $
exitErr "this program doesn't take any arguments."
- (ClusterData _ _ il _ _) <- loadExternalData opts
+ luxiDef <- Path.defaultLuxiSocket
+ let master = fromMaybe luxiDef $ optLuxi opts
+ opts' = opts { optLuxi = Just master }
+
+ (ClusterData _ _ il _ _) <- loadExternalData opts'
let _unused_iniData = map setInitialState $ Container.elems il
7/11:
--- src/Ganeti/HTools/Program/Harep.hs
+++ src/Ganeti/HTools/Program/Harep.hs
@@ -271,15 +272,13 @@ main opts args = do
(ClusterData _ _ il _ _) <- loadExternalData opts'
let iniData = map setInitialState $ Container.elems il
- master = fromJust lsock
-- First step: check all pending repairs, see if they are completed.
_unused_iniData' <- bracket (L.getClient master) L.closeClient $
--
Dato Simó | [email protected]
Corp Fleet Management / Ganeti SRE (Dublin)
--
You received this message because you are subscribed to the Google Groups
"ganeti-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.