Use new RPC call in “gnt-node list”
Reviewed-by: iustinp
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.
Reviewed-by: ultrotter
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 :(
Reviewed-by: imsnah
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]
Reviwed-by: imsnah
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
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....
Allocator framework, 1st part: allocator input generation
In preparation for the introduction of automatic instance allocator,this patch adds an allocator simulation opcode, that based on the inputparameters, will return either the input message to the allocator...
Verify: make skipping checks possible
Add a general way to skip some checks at cluster-verify time and make the N+1memory redundancy check optional.
Rework the results of OpDiagnoseOS opcode
Currently, the opcode DiagnoseOS is the only opcode that return astructure of objects.OS (which is a custom class, and not a simplepython object) and furthermore all the processing of OS validity acrossnodes is left to the clients of this opcode....
Add generic opcode submit functionality to gnt-debug
This patch enhances gnt-debug to be able to submit any opcodes. Theopcodes are input from a json file containing a list of opcodes.
This allows enhanced testing of opcodes until the other gnt-* commands...
Add per-opcode results to job processing
This patch changes the definition of a job and introduces per-opcoderesults.
First, the result and status fields of a job are condensed into a single'status' attribute. Then, we introduce an opcode status and one result...
Modify gnt-instance to support file backend
Add a simple gnt-job script
This patch adds a very basic gnt-job script that allows job querying.This goes on top of the previous master daemon patches.
Currently, because of the not-changed cmd lock, you can't query the jobsas long as a job is running - you have to rm the cmd lock and then you...
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...
Add a gnt-debug tool
This patch adds a script which submits a job consisting of theOpTestDelay opcode. This can be helpful for debugging and can beextended to execute other 'debug'-like tasks.
Change the gnt-backup export help text
parms->params Refactoring
- Substitute all occurences of name 'parms' with 'params'- Small codestyle fix
gnt-cluster option to toggle lvm-storage
This patch does two things:- Add gnt-cluster modify- Add --no-lvm-storage option to gnt-cluster init
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.
Add option to change default file_storage_dir
Author: manuel.franceschiniReviewed-by: iustinp
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.
Update online help and manpage to include drbd disk type.
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...
Fix online help for gnt-backup import
The help string missed drbd as a disk template option. Adding it.
tiny typo fix
Improve the documentation of query output fields
The gnt-node and gnt-instance list commands have a customizable list ofoutput fields, but the list is not up to date (in the man page) and noteasily understandable from the ‘--help’ output.
This patch updates the man pages and adds the available fields and...
Add option for the number of VCPUs in instance listing
Fix gnt-instance modify breakage due to hvm_boot_order
As reported by hypnoce@gmail.com, this is missing a check on None. As we don'tcare about uppercase, we keep the check simple by removing the lower() call.
Add a few aliases for startup/shutdown
These aliases are widely used to think of these operations and save some typingtoo. Even though there is some thought to make start/stop the default operationname I don't think this should happen for 1.2, for now adding it as an alias is...
Add the first command alias
Alias activate_block_devs to activate-disks, for ganeti 1.1 compatibility.
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...
Show the HVM boot order in instance info
This is a merge from the 1.2 branch
Two small style fixes
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...
Support selecting the boot device order for HVM.
This patch adds support for specifying and changing the boot device order forHVM instances. The boot device order specification is ignored for non HVMinstances.
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.
Make ‘gnt-instance info’ show kernel/initrd paths
This patch changes the info subcommand to nicely show the kernel andinitrd paths.
Allow defining the kernel/initrd at creation time
This patch adds support for defining the kernel/initrd at instancecreation time, using the same interface as in instance modify.
Add support for modifying the kernel/initrd path
This patch adds support in ‘gnt-instance modify’ to set the kernel andinitrd paths. The user can pass either 'default' or 'none' (none is notvalid for kernel).
Improve verify-disks: broken/missing LV detection
This patch improves the ‘gnt-cluster verify-disks’ command by addingsupport for detecting broken volume groups and missing logical volumenames.
As such, we don't try anymore to activate disks for instances that are...
Allow instance MAC address to be set.
Allow the MAC address of an instance to be specified optionally duringinstance creation and later to be changed via instance modify.
Proof-of-Concept HVM support for Ganeti.
This patch implements a first proof-of-concept for HVM support in Ganeti.Due to the nature of this patch, it is intended for test environmentsonly.
Add instance port support.
Extends the instance object by adding a port item, also adds changesto print this port via gnt-instance info.
Add the ‘gnt-cluster verify-disks’ command
This patch adds the OpVerifyDisks handling in mcpu.py and theverify-disks command in the gnt-cluster script, which for every instancecomputed by LUVerifyDisks submits a new OpActivateInstanceDisks request.
Various code style fixes for strings.
- When line wrapping is needed, move spaces to the next line.- Remove embedded line breaks from error messages.
Reviewed-by: schreiberal
Replace disk template drbd8 with drbd where missing.
Correct the -s parameter in gnt-node output
This fixed the previous commit (-s => -s ip).
Add the -s option in the output of 'gnt-node'
Since on dual-homed clusters one always needs to add '-s' to thegnt-node add command, make this appear in the output of 'gnt-node' (whenrun without arguments).
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
Enhance secondary node replace for drbd8
This (big) patch does two things: - add "local disk status" to the block device checks (BlockDevice.GetSyncStatus and the rpc calls that call this function, and therefore cmdlib._CheckDiskConsistency) - improve the drbd8 secondary replace operation using the above...
Remove --secondary-node option.
Replace --secondary-node option with an optional parameter for --node.
Implement degraded status for logical volumes
Logical volumes can be 'degraded' in a similar way to mirrored devices,when their underlying storage has gone away (i.e. after a physical diskfailure and 'vgreduce --removemissing'). If we can detect this, we can...
Make DiagnoseOS use the modified OS objects
Modify backend.py so that DiagnoseOS only returns OS objects rather thanInvalidOS errors, and make sure gnt-os understands the new objects. Also deletethe deprecated helper functions from gnt-os.
Implement tag searching
This patch adds a search command for locating tags on all objects of thecluster using a regex pattern.
Reviewed-by: aat
Remove two trailing whitespaces
Ok, I've been battling with those for a while but it seemsin the end I forgot to get rid of them! :( Doing it explicitely now.
Move blank lines inside function messages
This patch changes whitespace only. It fixes all the functions in script/gnt-osby putting a white line at the end of all the function descriptions andremoving it from just before the code.
Add empty line after each diagnose OS-Node set
Reviewed-By: imsnah