History | View | Annotate | Download (54.4 kB)
gnt-instance batch-create: use the job executor
This small patch changed the batch create functionality to use the jobexecutor instead of single-job submits.
Signed-off-by: Iustin Pop <iustin@google.com>Reviewed-by: Guido Trotter <ultrotter@google.com>
Convert instance reinstall to multi instance model
This patch converts ‘gnt-instance reinstall’ from single-instance tomulti-instance model; since this is dangerours, it's required to pass“--force --force-multiple” to skip the confirmation.
Signed-off-by: Iustin Pop <iustin@google.com>...
Merge branch 'master' into branch-2.1
Add -H/-B startup parameters to gnt-instance
This patch modifies the start instance script, opcode and logical unitto support temporary startup parameters.
Different from 1.2, where only the kernel arguments were supportingchanges (and thus xen-pvm specific), this version supports changing all...
Remove an unused function
The _TransformPath function is not used anymore in 2.0, let's remove it.
gnt-instance info --all
Don't show all instances info by default, but require --all to be passedfor this time consuming operation.
Reviewed-by: iustinp
A bunch of doc and other small fixes
This patch adds a couple of both externally and internally reportedissues: - missing SGML tags (Issue 54), report and patch by superdupont - wrong variable used in the init.d script, report and patch by Karsten Keil <karsten-keil@t-online.de>...
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...
Fix the --net option to gnt-instance add
Similar to the --disk fixes a while ago, --net is broken too. This patchfixes it.
Reviewed-by: imsnah
Remove the extra_args parameter in instance start
This patch removes the extra_args parameter and instead switches theinstance to the HV_KERNEL_ARGS hypervisor option.
This is a big change, but it's a needed cleanup, this extra parameter onall RPC calls is not generic and we also need to have a persistent value...
gnt-instance info: remove hvattr descriptions
Having hvattr descriptions is only confusing for the user, because evenif they explain better what an attribute is about, they don't help indeciding what keyword should be used to actually set it. If in the...
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....
Always use the same short option for iallocator
This patch changes the scripts so that the short name for the“--iallocator” option is always ‘-I’.
Reviewed-by: ultrotter
Some batcher fixes
Currently the batcher hypervisor parameter must be a dict with oneelement (e.g. {"xen-hvm": { "acpi": true }}). This is overly complex andhard to validate correctly; the patch splits it in two: - one "hypervisor" string parameter, with the name of the hypervisor...
gnt-instance fix a typo in AddInstance
It's hvparams, not opts.hvparams.
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...
Add a new instance query flag ‘disk_usage’
This patch adds a new instance query flag called disk_usage thatretrieves the overall space used by an instance on each of its nodes.This can be used when balancing the cluster or checking N+1 status.
The flag is also exported in RAPI. Note the flag is currently broken for...
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:...
gnt-instance: support no_PARAMETER value
Since parameters get set to False if a no_ is prefixed don't try tointerpret those boolean values, and pass them unchanged.
gnt-instance list: accept input names
Currently gnt-instance list will refuse to take arguments, and alwaysreturn the full list of instances. This patch allows it to pass names toLUQueryInstances, so that we restrict the input to a given set ofinstances....
Check that instance exists before confirm. queries
Currently we ask the user for confirmation, and only after (try to)remove, failover or migrate the instance. This doesn't work nicely ifthe instance doesn't exist, so we make a query for the instance before...
Rework the multi-instance gnt commands
This patch changes the multi-instance gnt-* commands (gnt-instancestart/stop, gnt-node evacuate/failover) such that the individualoperations are submitted in parallel, ideally improving the speed of theexecution....
Sort the instance names in batcher
In case we submit multiple instances via batcher, it's nicer to have thesorted nicely.
Fix batcher for 2.0-style disks and nics
This patch fixes the gnt-instance batch-create command, and in doing soalso slightly changes two other functions: - we change utils.ParseUnit so that it accepts integer values also (both ParseUnit(5) and ParseUnit("5") return the same value)...
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....
Fix a couple of epydoc warnings
Forward port the live migration from 1.2 branch
This is forward port via copy (and not individual patches cherry-pick)of the latest code on the 1.2 branch related to the migration.
The changes compared to 1.2 are the fact that we don't need theIdentifyDisks step anymore (the drbd rpc calls are independent now), and...
Heavy redo of gnt-instance info output
In 2.0, we have more parameters in drbd's logical_id, and passing theresults over json makes them unicode which looks worse with the defaultformatting. As such, a redo of the output is needed.
This patch: - adds a separate function to format the logical_id of devices...
Cleanup replace-disks modes and options
In 1.2, due to the md+drbd7 legacy, we had a complex choice of replacemodes, and the new drbd8 modes where forced into this syntax, with somecomplicated rules of transition from one mode to another (if REPLACE_ALL...
SetInstanceParams: handle default/none values
If the hv/be parameter lowercase value is set to "default" we'll passconstants.VALUE_DEFAULT, if it's set to "none" we'll passconstants.VALUE_NONE.
gnt-instance add: Remove "--os-size" and "--swap-size"
They're not used anymore.
Allow network-less instances
Currently there's no way to specify no NICs for an instance, even thoughthis is a supported configuration.
The patch adds a --no-nics option to gnt-instance add.
Reviewed-by: amishchenko
Fix instance creation
This patch fixes the diskless and drbd/file based instances. Sorry :(
Implement support for multi devices changes
This big patch adds support for: - changing NIC/disks in the multi-device model - adding/removing NICs - adding/removing disks
The patch is big and not very nice; the error checking paths are notvery clear....
Show disk access mode in gnt-instance info
The mode parameter needs to be exported and shown in the info output.
Slighly improve multi-nic in gnt-instance info
Previously we had only one nic, so the NIC information was all on oneline. This patch changes it to:
- NICs: - nic/0: MAC: aa:00:00:e8:b2:ef, IP: None, bridge: None - nic/1: MAC: aa:00:00:53:ca:92, IP: None, bridge: xen-br0...
Enable auto-unit formatting in script output
This patch enables by default the old 'human-readable' option, but in aslightly different model.
The option is now called "units" and takes either: - 'h' for automatic formatting - 'm', 'g' or 't' for mebi/gibi/tebibytes...
Improvements to CLI output
This patch adds nicer formatting for some gnt-instance list operations.
Make cli.py use FieldSet for matching fields
This changes cli.py to FieldSet usage so that gnt-instance list willformat nicely the disk.size/*, and the count of disks/nics.
Change GrowDisk to work with multi-disk
This patch changes the instance.FindDisk method to take index arguments(instead of iv_names), and changes GrowDisk and list instancesaccordingly.
Convert replace-disks (same nodes) to multi-disk
This patch changes the drbd8 replace disk only (no secondary change) towork in with multi-disk. This mode of replaces works correctly withreplacing only a subset of disks.
Initial multi-disk/multi-nic support
This patch adds support for mult-disk/multi-nic in: - instance add - burnin
The start/stop/failover/cluster verify work as expected. Replace diskand grow disk are TODO.
There's also a change gnt-job to allow dictionaries to be listed in...
Documentation updates for gnt-instance
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.
Fix gnt-instance modify with beparams
The gnt-instance modify didn't work correctly w.r.t the be parameters.There was also a typo in the corresponding LU.
Adding batch-create to gnt-instance
This change is part of the integration of tools/batcher fromGaneti 1.2 into Ganeti 2.0 core code. It has a compatiblesubmission interface to the version from 1.2 with these differences:
gnt-instance fix ValidateBeParams call
ValidateBeParams does not return, but its return value is assigned to avariable which is never used. Avoid this assignment.
gnt-instance remove deprecated flags
kernel, initrd, hvm_boot_order and vnc_bind_address are now hypervisorparameters and should not have their own flag. Moreover querying ofvnc_bind_address should of course pass through the hv/ namespace.
grow-disk: wait until resync is completed
The patch adds a new ‘--no-wait-for-sync’ parameter to grow-disk similarto the one in instance add, and changes the default to wait.
This is cleaner as at the moment when the command returns, we eitherhave a fully synced disk or there is an error....
Some fixes related to auto_balance
Change the constant name to match the value (autobalance ->auto_balance).
Also add the auto_balance header so that gnt-instance can list it.
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.
Allow instance info to only query the config file
This patch adds a new '-s' parameter to ‘gnt-instance info’ that makesit return only 'static' information. This is much faster, especially fordrbd instances.
This is a forward-port of rev 1570 on the ganeti-1.2 branch, resending...
Convert gnt-instance info to the hvparams model
Some informations are not printed nicely (e.g. “virtual CDROM: False”),but this is the first step.
Change gnt-instance modify to the hvparams model
Change gnt-instance list to the hvparams model
This is just a change of the various hvm_ and pvm parameters to the hvmodel. Parameters are queried via hv/$name or via the whole dict asreturned by hvparams.
Reviewed-by: ultrotter,imsnah
Switch instance hypervisor parameters to hvparams
This big patch changes instance create to the new hvparams structure.Old parameters are removed, so old jobs or old instances file will breakcurrent clusters.
Move the hypervisor attribute to the instances
This (big) patch moves the hypervisor type from the cluster to theinstance level; the cluster attribute remains as the default hypervisor,and will be renamed accordingly in a next patch. The cluster also gains...
Change default instance reboot type to hard.
Merged r1777 from branches/ganeti/ganeti-1.2
Allow listing of the serial_no via gnt-* list
This patch adds listing of the serial_no attribute in gnt-instance andgnt-node list, and updates to the manpages to reflect the change.
gnt-instance: fix tags commands online help
It used to refer to "nodes", which was confusing.
Add gnt-instance (start|stop) --submit
Finish the --submit changes with these two, which (because they aremulti-opcode commands) require special handling.
Do not use jobs in gnt-instance _ExpandNames()
In the gnt-instance script, _ExpandNames() uses jobs to query instancenames. This is not optimal, so we change it to use queries.
Implement "--submit" on gnt-instance
This patch adds support for the “--submit” parameter in the gnt-instancescript, for the commands where it makes sense.
merge r1568 from branches/ganeti/ganeti-1.2
Add more fields to gnt-instance list
merge r1542, r1543, r1573 from branches/ganeti/ganeti-1.2
Implement interactive instance OS reinstall.
merge r1539 from branches/ganeti/ganeti-1.2
Display VNC console port in gnt-instance info.
Pass the force param to SetInstanceParms
It was already allowed in gnt-instance modify, but ignored.It will be used to force skipping parameter checks.
This is a forward-port from branches/ganeti-1.2
Original-Reviewed-by: imsnahReviewed-by: iustinp
Merge r1537 from branches/ganeti/ganeti-1.2
Add HVM device type flags 3/4
merge r997 from branches/ganeti/ganeti-1.2
Fix gnt-instance modify for HVM parameters
This patch makes gnt-instance modify work again for the advancedHVM parameters after it was broken by other changes.
Use new query RPC call in “gnt-instance list”
Remove custom locking code from gnt-instance
The gnt-instance script doesn't run in the same process anymore, so wecan't and don't have to unlock.
Cleanup old DRBD 0.7.x code
Apparently there were still some leftovers. While removing an instance,I got the message "unhandled exception 'module' object has no attribute'LD_MD_R1'".
Add a ‘tags’ field to instance and node listing
Currently there isn't any easy way to list all nodes or instance andtheir tags; you have to query each node in turn, or list all the tagsvia something like “gnt-cluster search-tags '.*'”. Of course, this is...
Implement gnt-instance grow-disk
This patch exposes at command line level the grow-disk operation.
Forward-port: Another for gnt-instance modify & HVM parameters
Another tiny fix. Anybody got a nice brown paper bag I can wear?
Author: schreiberalReviewed-by: iustinp
Forward-port: show only parameters relevant to the instance
This patch modifies the code for "gnt-instance info .." to only displayinstance parameters that actually apply to that instance, i.e. for PVMinstances no HVM parameters are shown and vice versa....
Forward-port: patch 2/4 extended HVM features for 1.2
This patch adds the commandline extensions and the code to storeand display the extended HVM features.
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...
Improve the gnt-* list field selection
This patch allows the '-o' option to the list subcommands to add morefields to the default list instead of replacing the default list byprefixing the fields list with '+'.
The patch also moves the listing (in the help output) of the default...
Add check for major/minor in _FormatBlockDevInfo
bdev.FileStorage does not have major or minor fields, so gnt-instanceinfo for file backed instances fails with a TypeError. This patchadds checks to prevent that and print 'N/A' instead.
Implement replace secondary via the iallocator
This patch implements secondary replace via the iallocator. The newopcode parameter 'iallocator' behaves like this: if passed, it willalways compute and assign a new secondary, behaving in effect as if the...
A pure whitespace change for style compliance
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....
Modify gnt-instance to support file backend
Fix gnt-instance failover help message
The message used to misleadingly say that failover just works with remote_raid1instances, while of course it works for drbd as well. Since remote_raid1 hasbeen removed from the main development branch only drbd will be shown. Thanks...
parms->params Refactoring
- Substitute all occurences of name 'parms' with 'params'- Small codestyle fix
Fix a bug in interactive confirmation of instances
This oneliner fixes a bug in listing more than twenty instances formultiple operations (shutdown, startup, etc.).
Add --print parameter to “gnt-instance console”
This enables us to run automated tests on “gnt-instance console”, at leastto some degree.
Return first parameter of console command only once
Remove the option to create md/drbd7 instances
This patch removes the options that allow to create local_raid1 orremote_raid1 instances. It also modifies the documentation and removesthese disk templates from burnin and from qa.
Remove the add/remove mirror operations
These two operations are related to md/drbd7 code (remote_raid1). Removethem as part of the md/drbd7 removal.
Fix gnt-instance replace-disks online help
The "quick" online help just reported the option to change secondary node. Addthe ones to just replace the disk locally on-primary or on-secondary. It is ofcourse impossible to espress in one line everything needed to use this command,...
Codestyle fixes: adding a few empty lines
Clarify online help for xc-instance reinstall.
Add another 1.1->1.2 compatibility alias
gnt-instance replace-disks used to be called replace_disks.
Modify the default output of gnt-instance list
This patch adds a new field available for selection in gnt-instance listnames "status" which represents the combined value of "admin_state" and"oper_state". Since this is much easier to parse (e.g. gnt-instance list...
tiny typo fix