Commit 4fa74266 authored by Klaus Aehlig's avatar Klaus Aehlig
Browse files

Provide options no-voting and yes-do-it



As the job handling is now done by luxid, that
daemon is also in charge of verifying that it runs
on the master node. So provide these options in
the Haskell world as well.
Signed-off-by: default avatarKlaus Aehlig <aehlig@google.com>
Reviewed-by: default avatarPetr Pudlak <pudlak@google.com>
parent 38acc50f
......@@ -39,6 +39,8 @@ module Ganeti.Daemon
, oBindAddress
, oSyslogUsage
, oForceNode
, oNoVoting
, oYesDoIt
, parseArgs
, parseAddress
, cleanupSocket
......@@ -102,6 +104,8 @@ data DaemonOptions = DaemonOptions
, optBindAddress :: Maybe String -- ^ Override for the bind address
, optSyslogUsage :: Maybe SyslogUsage -- ^ Override for Syslog usage
, optForceNode :: Bool -- ^ Ignore node checks
, optNoVoting :: Bool -- ^ skip voting for master
, optYesDoIt :: Bool -- ^ force dangerous options
}
-- | Default values for the command line options.
......@@ -117,6 +121,8 @@ defaultOptions = DaemonOptions
, optBindAddress = Nothing
, optSyslogUsage = Nothing
, optForceNode = False
, optNoVoting = False
, optYesDoIt = False
}
instance StandardOptions DaemonOptions where
......@@ -196,6 +202,20 @@ oForceNode =
"Force the daemon to run on a different node than the master",
OptComplNone)
oNoVoting :: OptType
oNoVoting =
(Option "" ["no-voting"]
(NoArg (\ opts -> Ok opts { optNoVoting = True }))
"Skip node agreement check (dangerous)",
OptComplNone)
oYesDoIt :: OptType
oYesDoIt =
(Option "" ["yes-do-it"]
(NoArg (\ opts -> Ok opts { optYesDoIt = True }))
"Force a dangerous operation",
OptComplNone)
-- | Generic options.
genericOpts :: [OptType]
genericOpts = [ oShowHelp
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment