History | View | Annotate | Download (7.9 kB)
Move the “--src-…” options to cli.py
Signed-off-by: Iustin Pop <iustin@google.com>Reviewed-by: Michael Hanselmann <hansmi@google.com>
Unify the “--no-ip-check” option
Unify the “--net” option
Unify the “--disk” (identkeyval) option
Unify the “--os-size” option
Unify the “--node” (as instance placement) option
Unify the “--node” (as list of nodes) option
Unify the last “--node” (single node) 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 “--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” (with name) option
Unify the “--no-wait-for-sync” option
Add bash completion for --node node1[:node2]
Signed-off-by: Michael Hanselmann <hansmi@google.com>Reviewed-by: Luca Bigliardi <shammash@google.com>
Add more bash completion metadata for options
Signed-off-by: Michael Hanselmann <hansmi@google.com>Reviewed-by: Olivier Tharan <olive@google.com>
Re-introduce constants for most often used arguments
Signed-off-by: Michael Hanselmann <hansmi@google.com>Reviewed-by: Iustin Pop <iustin@google.com>
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.
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.
Merge commit 'origin/next' into branch-2.1
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....
Fix instance import net option
This is identical to dc30b0e4 but applied to gnt-backup. Thanks to userocaner for catching it.
check_ident_key_val, handle no_ and - prefixes
If an ident member of an IdentKeyVal relationship starts with no_ or -,handle it the same way we do for a key. Some unittests are added tocheck that check_ident_key_val behaves as expected.
This patch also changes ForceDictType to, for now, fail on such an...
Disable synchronous (locking) queries
This patch raises an error in the master daemon in case the userrequests a locking query; accordingly, all clients were modified to sendonly lockless queries. This is short-term fix, for proper fix theclients should be modified to submit a job when the user request a...
Implement the backward-compatible ‘-s’ disk option
This patch adds back to the instance creation command (gnt-instace add,gnt-backup import) the ‘-s’ short form option for specifying asingle-disk instance.
Also a small bug in gnt-backup import is fixed....
Instance parameters: force typing
We want all the hv/be parameters to have a known type, rather than arandom mix of empty string, boolean values, and None, so we declare thetype of each variable and we enforce/convert it.
- Add some new constants for enforceable value types...
Implement lockless query operations
This patch adds the framework for, and enables lockless OpQueryInstances. Thismeans that instances will be shown in ERROR_up or ERROR_down state, even thoughthis is not an error (but just an in-progress job).
The framework is implemented as follows:...
Make iallocator work with offline nodes
This patch changes the iallocator framework to work with and properlyexport to plugins offline nodes. It does this by only exporting thestatic configuration data for those nodes, and not attempting to parsethe runtime data....
Update gnt-backup online help
--src-node and --src-dir are not mandatory anymore
Reviewed-by: iustinp
instance import: adapt to multi-disk/nic world
This is mostly a copy from gnt-instance add; import works, but it's notoptimal - device count/parametrs should be able to be reused.
Reviewed-by: ultrotter
Documentation updates for gnt-backup
Reviewed-by: imsnah
Change exit code of gnt-backup list
Currently gnt-backup list exits with the same error code even if can'tcontact som nodes for backup information.
The patch changes it to return 1 instead in this case.
Add mac option to gnt-backup import
Before 'auto' was the only allowed possibility
Forward-port-of: r1885, Reviewed-by: iustinp
Fix some pylint-detected issues on the scripts
Some names were wrong, and similar stuff detected by pylint.gnt-debug.GenericOpCode is still broken.
Convert the gnt scripts to ToStdout/err
Currently the gnt-* scripts are using a mix of print, logger.ToStd* andsys.stderr.write. We convert them all to using cli.ToStdout/err. Thisway, we can easily change the implementation for all at once.
gnt-backup: update for cluster parameters
- add backend and hypervisor parameters- fix beparams validation/passing- pass hypervisor and hvparams- remove deprecated flags
Change over to beparams
This big patch changes the master code to use the beparams. Errors mighthave crept in, but it passes a small burnin.
merge r1569 from branches/ganeti/ganeti-1.2
Implement more options for gnt-backup import
Use new query function for exports in gnt-backup
Fix a syntax error in gnt-backup
I broke gnt-backup in rev 1035, sorry :(
Complete removal of md/drbd 0.7 code
This patch removes the last of the md and drbd 0.7 code. Cluster whichhave the old device types will be broken if they have this applied.
Update command line help and manpages with mandatory options
Revert "CLI: remove command opts/args in "gnt-X""
This reverts commit 976.
CLI: remove command opts/args in "gnt-X"
[Forward-port of the 1.2 branch patch]
This patch removes all the parameters and options from the output"gnt-X" (i.e. the subcommand list for command). This is done in order touniformize the output, currently only some parameters are shown and they...
Add file backend storage options to ImportInstance
This patch adds the file storage options to gnt-backup import whichwould otherwise fail since the values of file_storage_dir andfile_driver are accessed in LUCreateInstance.
Add gnt-backup remove functionality
This patch also fixes the LUExportInstance Prereq docstring.
IAllocator part 3: LUCreateInstance changes
This (final) patch allows the instance's nodes to be selectedautomatically based on the passed allocator algorithm.
The patch changes the pnode opcode parameter from required to optional,now either the pnode or the iallocator must be passed....
Change the gnt-backup export help text
Codestyle fixes: adding a few empty lines
Fix online help for gnt-backup import
The help string missed drbd as a disk template option. Adding it.
Check that we have a valid export list
Before iterating over the list of exports present on a node, check that whatganeti returned is actually a list. This solves the case when one of the nodesis down, and an error value is returned.
This fixes issue 21...
Two small style fixes
This is a merge from the 1.2 branch
Add mac="auto" at import time
Mac is now a mandatory option for OpCreateInstance. Add it when we call thisopcode at import time too. This is a quick fix for the code, but probably morework needs to be done to integrate mac addresses with the import/export...
Fix gnt-backup import -s option
Update gnt-backup import to be in line with gnt-instance add about the os disksize option. Thanks to Gunnar Wagenknecht for spotting the issue.
Fix --node option for “gnt-backup list”.
Change --nodes to --node
The --nodes option in gnt-backup really accepts only one node at a time.Change it to --node, for added clarity and consistency with a similaroption in gnt-cluster. This patch also updates the relevant man page.
Reviewed-By: iustinp
Remove --secondary-node option.
Replace --secondary-node option with an optional parameter for --node.
Pass required ip_check parameter to OpCreateInstance in gnt-backup.
Allow 'add instance' to not start the new instance
This patch allows 'gnt-instance add' to not start the newly-createdinstance. It also allow 'gnt-instance add' and 'gnt-backup import' tonot check for IP conflicts (only when not starting the instance)....
Style changes for pep-8 and python-3000 compliance.
This changes the raising of exceptions from: raise Exception, valueto raise Exception(value)
as the first form will be removed in python-3000 and the second form ispreferred now.
The changes also involve a few cases of changing from raising standard...
- Move --force option to cli.py- Implement “gnt-instance reinstall”- Fix two typos
Comment formatting updates.
Add the gnt-backup script and man-pages.