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.
Reviewed-by: imsnah
Documentation updates for gnt-node
The patch also adds a 'return 0' to a function that was missing it.
Documentation updates for gnt-cluster
Documentation updates for gnt-instance
Fix use of ToStderr in gnt-cluster
convert remaining print statements to ToStderr in gnt-cluster
Set default hypervisor at cluster init
During cluster init, set the default hypervisor to be used for instances.Ensure that the default hypervisor belongs to the set enabled hypervisorsfor this cluster. Also fix a small bug with setting the default enabled...
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.
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.
Remove --hypervisor-type from gnt-cluster.
We no longer use a single, cluster-wide hypervisor, but configure theactual to be used hypervisor on the instance level.
Fix gnt-cluster init to set cluster defaults.
Reviewed-by: iustinp
Enable gnt-cluster modify to hv/beparams
This patch enables the cluster modify to change: - enabled hypervisor list - hvparams (per hypervisor) - beparams (only the default group)
Syntax: gnt-cluster modify -B vcpus=3 -H xen-pvm:no_initrd_path
Validation for parameters is somewhat missing - the individual...
Show the cluster parametrs in gnt-cluster info
This is just a raw update without any special formatting.
Add an interface for the drain flag changes/query
This adds the set/reset in the jqueue and luxi modules, and a way toquery it in OpQueryConfigValues, and also the comand line interface forit:$ gnt-cluster queue infoThe drain flag is unset$ gnt-cluster queue drain...
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-backup: update for cluster parameters
- add backend and hypervisor parameters- fix beparams validation/passing- pass hypervisor and hvparams- remove deprecated flags
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.
Reviewed-by: ultrotter
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.
Update scripts and qa config for changed hypervisor names.
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
Implement job 'waiting' status
Background: when we have multiple jobs in the queue (more than just afew), many of the jobs (up to the number of threads) will be in state'running', although many of them could be actually blocked, waiting forsome locks. This is not good, as one cannot easily see what is...
Implement job auto-archiving
This patch adds a new luxi call that implements auto-archiving of jobsolder than a certain age (or -1 for all completed jobs), and the gnt-jobcommand that makes use of this (with 'all' for -1).
Change SshRunner usage
Currently the SshRunner uses a SimpleConfigReader instance, however thisis not best. We change it to use the cluster name directly (and itsconstructor now takes this as parameter, instead of SCR), and itscallers are change to pass the name directly....
Convert gnt-cluster
Replace ssconf with configuration.
Convert ssh.py
Get rid of ssconf and convert to configuration instead.
Fix ‘gnt-job info’ with no arguments
I didn't realize that my zip will break when no args are passed...
Add output of job/opcode timestamps
This patch adds posibility of selection of job/opcode timestamps ingnt-job list and info.
The code handling the possible cases (None or a valid timestamps) areugly though...
Reviwed-by: imsnah
Abstract the timestamp formatting into cli.py
Currently we format the timestamp inside the gnt-job info function. Wewill need this more times in the future, so move it to cli.py as aseparate, exported function.
Add opcode execution log in job info
This patch adds the job execution log in “gnt-job info” and also allowsits selection in “gnt-job list” (however here it's not very useful asit's not easy to parse). It does this by adding a new field in the queryjob call, named ‘oplog’....
Add a info subcommand to gnt-job
Currently, it is hard to examine a job in detail; the output of ‘gnt-joblist’ is not easy to parse.
The patch adds a ‘gnt-job info’ command that is (vaguely) similar to‘gnt-instance info’ in that it shows in a somewhat easy to understand...
Implement job summary in gnt-job list
It is not currently possibly to show a summary of the job in the outputof “gnt-job list”. The closes is listing the whole opcode(s), but thatis too verbose. Also, the default output (id, status) is not veryuseful, unless one looks for (and knows about) an exact job ID....
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.
OpVerifyDisks returns a list, not a tuple
Fixing the check in gnt-cluster, or gnt-cluster verify-disks is broken.Since the version in 1.2 used to return a tuple we'll accept both.
merge r1569 from branches/ganeti/ganeti-1.2
Implement more options for gnt-backup import
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.
LUVerifyCluster: Return boolean indication success
Reviewed-by: schreiberal
gnt-node: Add option to always accept peer's SSH key
This option will be used to add nodes to the cluster withoutasking the user to confirm the key. Together with key basedauthentication this can be used in the QA tests.
Allow kvm hypervisor in gnt-cluster init
Fix adding pristine nodes
If a node hasn't been part of the cluster before being added it'll nothave the cluster's SSH key. This patch makes sure to accept those bynot aliasing the machine name to the cluster name.
Use new query function for exports in gnt-backup
Use new RPC call in “gnt-node list”
Use new query RPC call in “gnt-instance list”
Implement job submission for scripts
This patch adds the infrastructure for executing a job in background,instead of foreground, via a new “--submit” option. The behaviour isthat the job ID is printed and the script will immediately exit.
The patch also converts gnt-node list to this model (yes, this will be a...
Fix cluster destroy
With the recent startup/shutdown changes (and with the master daemon inplace), the cluster destroy needs some fixing.
This patch moves the finalization of the destroy out from cmdlib intobootstrap, so we can nicely shutdown the rapi and master daemons....
Fix gnt-cluster getmaster
This is special in the sense that it can run on any node. As such, wejust instantiate ssconf and read the data from it.
Rework master startup/shutdown/failover
This (big) patch reworks the master startup/shutdown and the fixes themaster failover.
What does the patch do?
For master start/stop: - remove the old ganeti-master script and its associated man page - moves the ip start/stop directly into the backend.(Start|Stop)Master...
Implement “gnt-job cancel”
Make “gnt-debug delay” work again
The old API is no longer working.
Implement “gnt-job archive” to archive jobs
gnt-job: Don't treat job IDs as numbers
Fix a syntax error in gnt-backup
I broke gnt-backup in rev 1035, sorry :(
Make "gnt-job list" work again
"gnt-job list" was broken after my recent changes in the RPCbetween clients and the master. This patch makes it work again.
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.
Implement “gnt-job list -o +...”
This adds the same “-o +...” functionality in gnt-job as in the node andinstance scripts.
AddNode: move the initial setup to boostrap
From the master node we can't start ssh and connect to the remote node,nor we can do it from ganeti-noded as this ssh section will possibly askfor key confirmation and password. So the code to copy the ganeti-noded...
AddNode: Check for node existance
In the "new world" we'll need to setup ganeti-noded via ssh on the nodebefore calling the AddNode opcode. Before doing it we'll check that thenode is not already in the cluster, if --readd was not passed. Thisguarantees we're not going to restart ganeti-noded on a running node....
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'".
Fix gnt-cluster “command” and “copyfile”
Since the disabling of forking in the master daemon, the two ssh-basedsubcommands were not working anymore. However, there is no need at allfor the commands to be run from the master daemon (permissions to readthe cluster private ssh key notwithstanding), they can be run directly...
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...
Use a single Makefile.am instead of many
This change allows us to use cleaner dependencies betweendirectories. The build system is basically rewritten in large partsand may contain bugs.
Implement gnt-instance grow-disk
This patch exposes at command line level the grow-disk operation.
Move InitCluster opcode into a single function
This allows us to initialize a new cluster. The code certainly containsbugs and hooks aren't implemented yet.
Show cluster hypervisor for gnt-cluster info
Author: schreiberalReviewed-by: iustinp
Forward-port: Another for gnt-instance modify & HVM parameters
Another tiny fix. Anybody got a nice brown paper bag I can wear?
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.
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
Small style fixes
[Trunk version]
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...
Minor doc/help update
This shortens the help output in gnt-node so that the output looksnicer, and improves the manual page for gnt-instance with the new'status' field.
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 node cpu count to gnt-node list
This patch adds the backend and frontend changes needed for being ableto list the cpu count.
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 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...
Add gnt-backup remove functionality
This patch also fixes the LUExportInstance Prereq docstring.
Add --readd option to “gnt-node add”
This allows us to readd a node after it failed and required areinstallation or replacement.
A pure whitespace change for style compliance
Reviewed-by: amishchenko