Add per-node variants list to OS diagnose output
Signed-off-by: Guido Trotter <ultrotter@google.com>Reviewed-by: Olivier Tharan <olive@google.com>
gnt-os diagnose: show os variants
We already show the per-node os variants, also show the global ones.
Export and show the cluster uuid in cluster info
Signed-off-by: Iustin Pop <iustin@google.com>Reviewed-by: Michael Hanselmann <hansmi@google.com>
Implement uuid in gnt-node/instance list and info
The patch modifies LUQueryInstanceData to return the uuid too and alsoadds support for it in the gnt-* scripts.
gnt-instance info: fix nic display
In branch-2.1 the conversion of NICs to Tuples has been unified to the_NICListToTuple function, which is used by both hook generation andinstance info generation. Unfortunately the ip and mac fields gotswapped from what instance info expected, so the mac is shown as ip, and...
Unify the instance creation code
Currently the AddInstance in gnt-instance and ImportInstance ingnt-backup duplicate all of their code except the actual opcode creation(the parameters to it). By moving this to cli.py (not optimal location,but we don't have another one), we can use a single copy of the code,...
Unify multi-instance handling in gnt-instance
Start, stop and reboot have the same code for dealing withmulti-instance handling. This patch moves all that into a single genericfunction, and leaves only the building of the specific opcode for theoperation in the individual functions....
Fix gnt-instance start/stop/… args
The gnt-instance commands that have the multi-filter can take also zeroarguments, if the --all flag is passed. But they currently are declaredwith min=1, and this is a regression due to the recent bash completionchanges....
Move more cluster init opts to cli.py
Some of these should be added to cluster modify too.
Move cluster verify options to cli.py
Move the “--reboot-type” option to cli.py
Move the “--ignore-secondaries” option to cli.py
Move the “--no-shutdown” option to cli.py
Change indentation style in commands definitions
Currently, the indentation level for a command's definition depends onthe command name length, and this makes the commands dict unpleasant tothe eye. This patch changes it so that a new line begins right after the...
Remove explicit DEBUG_OPT and add it by default
Since >90% of the commands take the “--debug” option, and all shouldactually take it (the gnt-job command is currently missing it), it makessense to simply remove this and add it by default in cli.py.
Signed-off-by: Iustin Pop <iustin@google.com>...
Move the “--on-primary” option to cli.py
Move the “--on-secondary” option to cli.py
Move the “--auto” option to cli.py
Move the “--ignore-size” option to cli.py
Move the “--src-…” options to cli.py
Unify the “--secondary-ip” option
Move the “--readd” option to cli.py
Move the “--no-ssh-key-check” option to cli.py
Move the node flags options to cli.py
This also unifies a little the parameters to the respective options.
Move the “--allocatable” option to cli.py
Unify the “--no-lvm-storage” option
Unify the “--enabled-hypervisors” option
This also required a change, as one of the cases used a differentdefault.
Unify the “--nic-parameters” option
Unify the “--candidate-pool-size” option
This required a slight tweak since in init we want a different default.
Unify the “--vg-name” option
Move the “--yes-do-it” option to cli.py
Move the “--no-voting” option to cli.py
Move the “--mac-prefix” option to cli.py
The default has also been changed to None as this will be useful oncecluster modify will be able to change this setting too.
Unify the last “--hypervisor” (as list) option
This third form takes a list of name+options, and is used only ingnt-cluster. Who knew that we have three forms of ‘-H’?
Unify the “--no-ip-check” option
Unify the “--net” option
Unify the “--disk” (identkeyval) option
Unify the “--disks” (disk indices) option
Unify the “--os-size” option
Unify the “--ignore-consistency” option
Unify the “--non-live” option
Unify the “--node” (as instance placement) option
Unify the “--node” (as list of nodes) option
Unify the last “--node” (single node) option
Move the “--no-start” option to cli.py
Move the “--show-cmd” option to cli.py
Move the “--cleanup” option to cli.py
Move the “--static” option to cli.py
Move the “--all” option to cli.py
Move the “--select-os” option to cli.py
Move the “--ignore-failures” option to cli.py
Unify the “--new-secondary” option
Unify the “--disk-template” option
Signed-off-by: Iustin Pop <iustin@google.com>Reviewed-by: Guido Trotter <ultrotter@google.com>
Unify the “--no-nics” option
Unify the “--file-storage-dir” option
Unify the “--file-driver” option
Unify the “--iallocator” option
This patch also changes the gnt-debug's “--algorithm” intoIALLOCATOR_OPT, since it was the only non-standard use of this (due tohistorical reasons). Since it's just a debug option,backwards-compatibility is not critical here....
Unify the “--os-type” option
This was already unified inside gnt-instance, I just moved thatdefinition (and upper-cased it) into cli.py.
Unify the “--backend-parameters” option
This is not straight-forward. First, gnt-cluster had“--backend-parameters” wheres the rest of the script had just“--backend”. I settled on the full form, since one can always abbreviateoptions, but not vice-versa....
Unify the “--hypervisor” (params only) option
This unifies the two uses of --hypervisor-parameters with only options(a=b,…) form. The patch changes a little SetInstanceParms since thatexpected opts.hypervisor instead of opts.hvparams.
Note that there is another form of --hypervisor-parameters which also...
Unify the “--hypervisor” (with name) option
Unify the “--no-wait-for-sync” option
Add an error-simulation mode to cluster verify
One of the issues we have in ganeti is that it's very hard to test theerror-handling paths; QA and burnin only test the OK code-path, sinceit's hard to simulate errors.
LUVerifyCluster is special amongst the LUs in the fact that a) it has a...
Introduce parseable error codes in LUVerifyCluster
Currently the output of cluster verify can be parsed for 'ERROR'messages, but that is the only indication we get (error or no error). Inorder to allow monitoring tools to separate different error conditions,...
Unify the multiple 'verbose' options
Currently multiple files define a 'verbose' option. This patch moves allthese definitions to a single VERBOSE_OPT option which is exported fromcli.py.
Export new lock_status field to gnt-job
Signed-off-by: Michael Hanselmann <hansmi@google.com>Reviewed-by: Iustin Pop <iustin@google.com>
Merge commit 'origin/next' into branch-2.1
Fix gnt-node modify online help
This completes what was began in commit862b1b2b4c698cec8ad816793172fac9aa7f4cdf
Signed-off-by: Guido Trotter <ultrotter@google.com>Reviewed-by: Michael Hanselmann <hansmi@google.com>
scripts/gnt-node: fix a help string
gnt-node modify says it wants an "<instance>". Changing it to"<node_name>" as for the other commands.
Signed-off-by: Guido Trotter <ultrotter@google.com>Reviewed-by: Iustin Pop <iustin@google.com>
Extend gnt-debug with more debugging options
This patch extends gnt-debug to be able to submit multiple copies of theinput jobs and job contents, in order to simplify testing. It also addsa timing mode, and splits the execution into separate submit and...
Add bash completion for --node node1[:node2]
Signed-off-by: Michael Hanselmann <hansmi@google.com>Reviewed-by: Luca Bigliardi <shammash@google.com>
Use ReadFile/WriteFile in more places
This survived QA, burnin and unittests.
gnt-cluster watcher: Show more information
Signed-off-by: Michael Hanselmann <hansmi@google.com>Reviewed-by: Guido Trotter <ultrotter@google.com>
Conflicts: lib/cmdlib.py: Trivial
Return cluster tags from LUQueryClusterInfo
Signed-off-by: Michael Hanselmann <hansmi@google.com>Reviewed-by: Olivier Tharan <olive@google.com>
Merge branch 'next' into branch-2.1
Add more bash completion metadata for options
gnt-cluster: Add CLI for watcher pause
Add ArgHost class
It expands to the hostnames known by bash.
Re-introduce constants for most often used arguments
Add more auto-completion metadata
Make all options use cli_option
Change scripts to use new argument definitions
This can be used to generate the bash completion script automatically.In the future it may allow for better command line validation as well.
Add gnt-instance move
This uses the new LUMoveInstance. It supports only single-instance moves.
cli: Merge ikv_option and keyval_option into cli_option
Merging them gets rid of two public functions in cli.py and optparse explicitlysupports more than one option type per class.
Add support for querying the ctime/mtime
This patch adds querying of ctime/mtime for the cluster/nodes/instances.
Implement “gnt-node repair-volume”
gnt-node: Use helper function to convert storage type
Implement instance recreate-disks
This can be used for a 'plain' type instance when the underlying storagewent away, to recreate the storage (and reinstall) instead of removingthe instance and readding it.
Fix small typo in gnt-node
The iallocator option is '-I' not '-i'.
gnt-instance replace-disks: Add new --auto option
Run post cluster initialization LU
Call PostInitCluster from 'gnt-cluster init'.
Signed-off-by: Luca Bigliardi <shammash@google.com>Reviewed-by: Iustin Pop <iustin@google.com>
Add cluster-init --no-etc-hosts parameter
If --no-etc-hosts is passed in at cluster init time we set a newparameter in the cluster's object to false, and avoid adding nodes tothe hosts file. The UpgradeConfig function is used to set the value toTrue, when upgrading from an old configuration version....
Merge branch 'master' into next
Convert ldisk_degraded to tri-state value
This allows us to report “uncertain” states (LDS_UNKNOWN) for caseswhere the code can't easily detect or report what's wrong with ablock device.
objects.BlockDevStatus: Remove ToLegacyStatus
Signed-off-by: Michael Hanselmann <hansmi@google.com>Reviewed-by: Guido Trotter <ultrotter@google.com>Reviewed-by: Iustin Pop <iustin@google.com>
export: add meaningful exit code
Currently ‘gnt-backup export’ always returns exit code zero, even in theface of complete failure during backup (only failure to stop/start theinstance will cause job failure and thus non-zero exit code). This isbad, since one cannot script the backup....
Implement gnt-cluster check-disk-sizes
This patch adds a new opcode and lu for checking disk sizes. Currentlyit does only top-level disk verification, and also doesn't checkprimary/secondary node size mismatches (these two are added as TODOs inthe Exec() function of the LU)....
Implement --ignore-size in activate-disks
This patch modified OpActivateDisks, LUActivateDisks and gnt-instanceactivate-disks to support and pass this option to_AssembleInstanceDisks.
The patch is quite trivial I think; there should be no issues from it...