Revision 2207220d
b/man/hroller.rst | ||
---|---|---|
33 | 33 |
|
34 | 34 |
**[ -v... | -q ]** |
35 | 35 |
**[ -S *file* ]** |
36 |
**[ --one-step-only ]** |
|
36 | 37 |
|
37 | 38 |
DESCRIPTION |
38 | 39 |
----------- |
... | ... | |
65 | 66 |
\--node-tags *tag,...* |
66 | 67 |
Restrict to nodes having at least one of the given tags. |
67 | 68 |
|
69 |
\--one-step-only |
|
70 |
Restrict to the first reboot group. Output the group one node per line. |
|
71 |
|
|
68 | 72 |
\--force |
69 | 73 |
Do not fail, even if the master node cannot be determined. |
70 | 74 |
|
b/src/Ganeti/HTools/CLI.hs | ||
---|---|---|
71 | 71 |
, oNodeSim |
72 | 72 |
, oNodeTags |
73 | 73 |
, oOfflineNode |
74 |
, oOneStepOnly |
|
74 | 75 |
, oOutputDir |
75 | 76 |
, oPrintCommands |
76 | 77 |
, oPrintInsts |
... | ... | |
138 | 139 |
, optNodeSim :: [String] -- ^ Cluster simulation mode |
139 | 140 |
, optNodeTags :: Maybe [String] -- ^ List of node tags to restrict to |
140 | 141 |
, optOffline :: [String] -- ^ Names of offline nodes |
142 |
, optOneStepOnly :: Bool -- ^ Only do the first step |
|
141 | 143 |
, optOutPath :: FilePath -- ^ Path to the output directory |
142 | 144 |
, optSaveCluster :: Maybe FilePath -- ^ Save cluster state to this file |
143 | 145 |
, optShowCmds :: Maybe FilePath -- ^ Whether to show the command list |
... | ... | |
186 | 188 |
, optNodeSim = [] |
187 | 189 |
, optNodeTags = Nothing |
188 | 190 |
, optOffline = [] |
191 |
, optOneStepOnly = False |
|
189 | 192 |
, optOutPath = "." |
190 | 193 |
, optSaveCluster = Nothing |
191 | 194 |
, optShowCmds = Nothing |
... | ... | |
469 | 472 |
"set node as offline", |
470 | 473 |
OptComplOneNode) |
471 | 474 |
|
475 |
oOneStepOnly :: OptType |
|
476 |
oOneStepOnly = |
|
477 |
(Option "" ["one-step-only"] |
|
478 |
(NoArg (\ opts -> Ok opts {optOneStepOnly = True})) |
|
479 |
"Only do the first step", |
|
480 |
OptComplNone) |
|
481 |
|
|
472 | 482 |
oOutputDir :: OptType |
473 | 483 |
oOutputDir = |
474 | 484 |
(Option "d" ["output-dir"] |
b/src/Ganeti/HTools/Program/Hroller.hs | ||
---|---|---|
65 | 65 |
, oSaveCluster |
66 | 66 |
, oGroup |
67 | 67 |
, oForce |
68 |
, oOneStepOnly |
|
68 | 69 |
] |
69 | 70 |
|
70 | 71 |
-- | The list of arguments supported by the program. |
... | ... | |
169 | 170 |
|
170 | 171 |
when (verbose > 1) . putStrLn $ getStats colorings |
171 | 172 |
|
172 |
unless (optNoHeaders opts) $ |
|
173 |
putStrLn "'Node Reboot Groups'" |
|
174 |
mapM_ (putStrLn . commaJoin) outputRebootNames |
|
173 |
if optOneStepOnly opts |
|
174 |
then do |
|
175 |
unless (optNoHeaders opts) $ |
|
176 |
putStrLn "'First Reboot Group'" |
|
177 |
case outputRebootNames of |
|
178 |
[] -> return () |
|
179 |
y : _ -> mapM_ putStrLn y |
|
180 |
else do |
|
181 |
unless (optNoHeaders opts) $ |
|
182 |
putStrLn "'Node Reboot Groups'" |
|
183 |
mapM_ (putStrLn . commaJoin) outputRebootNames |
|
184 |
|
Also available in: Unified diff