Make Xen DomU kernel and initrd configurable at build time.
Reviewed-by: iustinp
Add preliminary developer notes.
Remove the shebang from modules
Since modules are not directly executables, remove the shebang fromthem. This helps with lintian warnings.
Also make the autogenerated _autoconf.py contain two comment lines atthe beginning, like the other modules.
Reviewed-by: ultrotter
Detect node restarts and reactivate disks.
- Change format of watcher state file to JSON.- Move log path for watcher script to constants.py.
Implement node failover
This patch implements a simple failover command for failing over allprimary instances. This is just a batched form of gnt-instance failover.
Reviewed-by: imsnah
Do not install init script in PREFIX/bin.
Refactor DiagnoseOS
The new version debugs Hidden OSes as well.
Fix a wrong exception name
This was introduced in rev 208.
Separate error formatting out of cli.GenericMain
This patch moves the error formatting into a separate function that willbe exported so that scripts that execute multiple opcodes can create thesame output as for GenericMain. Also, GenericMain becomes more readable....
Revert a debugging 'raise' from rev 195
As far as I understand, this was just a debugging aid. Remove it so thatconfiguration errors are nicely handled.
Enhance cli.SubmitOpcode to use custom parameters
This patch allows the SubmitOpcode function to take a pre-createdProcessor instance and a different feedback function. This is helpfulwhen submitting more than one opcode from a shell script.
Add boot id to “gnt-node list”.
Add handler for errors.TagError
This patch adds a simple handler for TagError that prints the error(better than having a stack dump).
Add source file option for {add,remove}-tags
This patch adds a '--from' option to the {add,remove}-tags commands thatallows the command to read from a file or from stdin (when passing adash for the filename).
Update man pages for the tags operations
This adds documentation on the {list,add,remove}-tags commands to thegnt-{cluster,node,instance} man pages.
Change gnt-cluster.sgml to use refsect2
This brings this man page in conformity to gnt-node and (partially) tognt-instance.
Implement command-line tags support
This patch adds generic functions for tag manipulations to cli.py andmodifies gnt-{cluster,node,instance} to export {list,add,remove}-tagscommands that use those.
Change tags add/remove to process multiple tags
This patch changes the tags opcodes to work with multiple tags at onceinstead of only one. As such, the opcodes and some parameters arerenamed.
Fix super() calls for objects.Cluster
Fix tags operations for instances
Extend GenericMain with a way to override options
This allows scripts to pass options to generic functions (options thatare not visible in the command line).
Don't remove Makefile.in when doing maintainer-clean.
Use indenting if supported by simplejson.
Fix “make distcheck”.
- Move symlink to “ganeti” to top dir- Add ganeti.config_unittest.py to tests to be run- Make sure everything is built before tests are run
Add function to list files in a directory, excluding those beginning with adot.
Remove redundant check.
This isdir() check leads to a broken error message. Even fixing it creates somecases in which the error message is nebulous and unclear while removing itmakes this situation be dealt with a lot better by the _OSOndiskVersion checks....
Forgotten files from last commit, NEWS and Makefile.am.
Reviewed-by: iustinp, ultrotter
Ship (and display) path for InvalidOS errors too.
- Document the expected change to errors.InvalidOS- Always pass the additional argument- Modify DiagnoseOS output to show the path
Reviewed-by: iustinp, imsnah
Change configuration storage format from Pickle to JSON.
- Add NEWS file with major changes between versions.- Bump RPC version number- No longer serialize in RPC, but just convert to dict
Old Pickle based configuration files can be converted using the cfgupgrade...
Fix OS Diagnose in light of the new OS Search path (Part One).
As of now only the last OS was taken into consideration by diagnose, fix bystoring them all and displaying for now only the first. Also display the sourcepath for valid OSes.
Second part of the OS search path cleanup
Abstract the _OSSearch function, to look for an OS in the search pathMake OSFromDisk accept an optional base_dir, rather than the os_dir itself
Make parameter os_dir mandatory for _OSOndiskversion.
First part of the OS search path cleanup. _OSOndiskversion is only ever calledonce, and with that argument set, so let's make it mandatory.
Add warning on gnt-node add operation.
People might not have read all the documentation and might not expect their ssh configurationand specially keys to be changed. Adding this warning will inform them before it happens.
Print automake warnings.
Import utils into unittest.
Reviewed-by: schreiberal
Change constants.OS_DIR with constants.OS_SEARCH_PATH which includes all thedirectories which can contain OS scripts.
The list defaults to the current one but can be changed at configure time.
Make the default export path configurable.
This is needed to improve FHS compliance for distribution integration.The need was discussed on the alioth pkg-ganeti project.
Prevent race condition in CreateBackup().
Add more QA tests.
Added tests:- “gnt-cluster getmaster”- “gnt-cluster version”- “gnt-instance list”- “gnt-instance reinstall”
Specify in the helpstring that --with-ssh-initscripts expects an argument
Pass required ip_check parameter to OpCreateInstance in gnt-backup.
Enhance QA.
- Test “gnt-backup export” and “gnt-backup import”.- Move “ResolveInstanceName” to qa_utils.py.- Fix tests for “ganeti-watcher”.- Make instance shutdown and startup configurable.
Integrate Leonardo's LSB init script patch
Reviewed-By: imsnah
Rename constants for SSH init script by Iustin's request.
Ignore man/*.in.
Add configure option for init.d/ssh script. This is useful for distributionswith the script named differently than Debian.
Remove mkdir from man/Makefile.am because mktemp creates the directory before.
Thanks to Christoph Rauch for reporting the problem.
Reviewed-By: iustinp
Replace paths in ganeti-watcher.sgml.
Implement to/from dict conversion for ConfigObject(s)
This change allows instances of ConfigObject and its children to beconverted to and from standard python types. This will allow easierupgrade of the configuration and use of any serialization protocol (not...
Change class hierarchy in objects.py
It makes sense to make the TaggableObject a child of the ConfigObject,since in this case we can derive the Instance, Node and Cluster objectsonly from the TaggableObject and have a cleaner hierarchy.
For consistency child classes will have to declare their slots by adding...
Remove requirement that host names are FQDN
We currently require that hostnames are FQDN not short names(node1.example.com instead of node1). We can allow short names as longas: - we always resolve the names as returned by socket.gethostname() - we rely on having a working resolver...
Move a constant from ganeti-master to constants.py
The EXIT_NODESETUP_ERROR is a useful constant and ganeti-watcher coulduse it too. This patch moves it to constants.py and modifed theganeti-master script to use it from there.
Fix tools/burnin w.r.t. OpCreateInstance.ip_check
Since we added a new, required parameter to OpCreateInstance, we need toupdate burnin to build the correct opcode.
Add slots on TaggableObject
Unless we use slots on all parents, we don't get the benefits thatslots bring. This patch adds this attribute to the TaggableObject sothat Instances, Nodes and the Clusters behave as intended.
Reviewed-by: schreiberal,imsnah
Ask for confirmation when touching multiple instances
This patch makes the new startup/shutdown multi-instance operations toask for confirmation when touching more than one instance (and unless--force-multi is given).
The code is not very short, but it does present a nice (IMO) user...
Improve the cli.AskUser() function
This patch improves the AskUser function by allowing it to: - choose from multiple choices (instead of only y/n) - give help to the user - preserve line breaks and whitespace formatting in the message
With this patch, an instance removal looks like this:...
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)....
Change resolved hostname from dict to a class
The current result of utils.LookupHostname() is a dict, but this doesnot allow static checkers to check the correctness of the code. Thispatch introduces a new class names HostInfo and changes LookupHostname...
Implement cluster rename operation
This patch adds a new OpCode (and corresponding LU) that implements thecluster rename functionality.
This is done by shutting down the master role, making the needed sstoremodifications and distributing the changed files to all nodes, and then...
Fix a docstring
Cleanup up selective imports for utils and utils unit test.
A few minor fixes in backend.py
This uses the recently-added Instance.FindDisk() method instead ofhard coded find-disk code.
It also renames one parameter to AddNode from ssh to sshkey in order notto shadow the ganeti.ssh module.
Implement instance rename operation
This patch adds support for instance rename operation at all remaininglayers: RPC, OpCode/LU and CLI.
Added TcpPing to do ping-alike via TCP connect(2) with defined source address.To be used to replace the currently fping(8) based reachability test.
Add support for rename operation in the OS API
This patch adds support for renaming at OS level. Because of this, weneed to bump up the version of the OS api from 4 to 5.
The patch also documents the new script interface in theganeti-os-interface(7) man page and adds a section on upgrading the OS...
Allow start/stop of multiple instances at once
This is an initial version of the multi-instance start/stop, whichallows the gnt-instance startup and shutdown subcommands to work onmultiple instances at once.
The available selections are: - "gnt-instance startup --instance name..." which is the default, and...
Add rename instance support to ConfigWriter
This patch adds support for renaming instances to the ConfigWriterclass. It's needed in here in order to guarantee that we don't lose theinstance during the rename (the instance will be there, either with the...
Documentation fix for missing dependencies
I was getting into trouble with gnt-backup and discovered reading thecode of the debian-etch os image and the error logs that: 1 - Debian os image shipped by ganeti depends on the availabilityof dump and restore....
Change OpQueryNodes nodes attribute to names
Change this to have the exact same parameters as OpQueryInstances.
Also fix burnin which is broken since r146.
Enable LUQueryInstances to work with a given list of instances
As per the changes to LUQueryNodes, the QueryInstances LU is modified toaccept a list of instances for which to compute and return information.
Remove OpQueryNodeData and LUQueryNodeData
Now that LUQueryNodes supports all the functionality of LUQueryNodeData,let's migrate gnt-node.ShowNodeConfig to use it and remove all traces ofOpQueryNodeData and LUQueryNodeData.
Change LUQueryNodes to return raw values and support selective listing
LUQueryNodes it's very similar to LUQueryNodeData, but it lacks twofeatures: - instance list (it has count though), both primary and secondary - selective node listing
In order to support these features, we change it to return raw values...
Change _GetWanted* to return names instead of objects
On closer look, all except one of the current users of _GetWantedNodes areusing only the name of the nodes and throw away the other attributes. It makessense to make this function return only the name list (as in the future this...
Split QA script into different modules.
Move string formatting out of LUQueryInstances
Currently, LUQueryInstances will provide strings for its results. This makes ithard for other consumers than "gnt-instance list" to use the OpQueryInstancesopcode for whatever they wish to.
The change moves the formatting in five of the six cases where this happens to...
Fix the ssh change which breaks remote ssh commands
Explanation: since we use lists and not a string, every argument we giveis passed unchanged to the remote shell. So, for example, passing'/etc/init.d/ganeti restart' to the remote shell, it will try to run the...
Complete rename of testing/ to test/.
Reviewed-by: iustin
Fix typo in last commit.
Rename testing/ to test/.
Clean *.py[co] in testing/.
Move QA script from testing/ to qa/.
Change the way how locales are overridden:- Set only LC_ALL, it overrides any other variable- Restore environment after unittest
Clone cmdlib._GetWantedNodes into _GetWantedInstances
This duplicates _GetWantedNodes to _GetWantedInstances, after doing somechanges to it: - fix an indentation error that should result in only the last node name passed being chosen - change the function to have a single return statement...
Fix docstrings of many opcodes
Filters out LANG and LC_* on RunCmd
This filters out the LANG and LC_ variables from the environment of programsexecuted by RunCmd, in order to get consistent output of execute programs likelvs, etc.
- Don't build .tar.bz2, we only distribute .tar.gz anyway.- Clean generated files on “make maintainer-clean”.- Build _autoconf.py and ganeti.initd on “make all”.
Make import/export use the auxiliary ssh library to build the remote commands.
This avoids forgetting some parameters, as it's happening right now(the correct known host file is not being passed)
In order to do so we split SSHCall into an auxiliary BuildSSHCmd which builds...
Fix two errors in man page
Add function to get all local IP addresses, will be used in cmdlib.py.
Use configure's paths in the init script example.
Now that we use configure's variables, add --sysconfdir to configure.
Use _autoconf.py instead of version.py, generated by Makefile with morevariables. The underline is there to mark it as a private module.
Combine rules for manpages.
Use DESTDIR when creating additional directories.
- Generic automake cleanup- Bump version number to 1.2b2- Add version.py file generated from version.py.in by autoconf
- Add Makefile in doc/examples/
- Rename docs/ to doc/- Add Makefile in doc/examples/
Switch utils.RunCmd from popen2 to subprocess
This changes the implementation of RunCmd from using the popen2 moduleto using the (new in 2.4) subprocess module.
This is helpful because the subprocess module has more advanced featuresthan popen2, the most important ones being the ability to run code in the...
Add a small unittext extension for utils.RunCmd
Test “gnt-node volumes”.