Initial tests with ganeti-masterd
This patch adds a very in-progress master daemon. This needs to belaunched manually, does not background itself, but can be used foropcode execution.
Also parts of this code should be moved to luxi.py.
Reviewed-by: ultrotter
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.
Add submit function to lib/cli.py
This patch adds function that submit jobs or queries over the unix socketinterface to lib/cli.py. The will be used by the scripts instead of theSubmitOpCode function.
A dumb queue implementation
This patch adds a very dumb in-memory only queue implementation.
Reviewed-by: imsnah
Initial implementation of the client unix socket
This patch adds an initial implementation of the client-side of the unixsocket interface. The code is not yet used by other parts of ganeti.
Change the 'gnt-cluster command' execution order
This patch makes the command execute last on the master (if the masteris selected). The order for the other nodes is unchanged.
The patch also updates the man page with some explanations and anexample....
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
Reviewed-by: iustinp
Map OpSetClusterParams to correponding LU
Add OpSetClusterParams to opcodes
Skip HasValidVG when --no-lvm-storage on cluster init
This patch does two things:- Remove "vg_name" from _OP_REQP due to the introduction of --no-lvm-storage. Since vg_name option has as default now None and is only set to the DEFAULT_VG if lvm_storage is enabled, this is needed...
Add LUSetClusterParams to cmdlib
Add LUSetClusterParams, which is the LU to modify cluster options.This includes checks:- not to disable lvm storage when it's already disabled- not to enable lvm storage when it is already enabled- not to disable lvm when lvm-based instances are present...
Add method SetVGName() to config.py
Add lvm-storage check when creating instances
This adds a check to fail instance creation if lvm-storage is disabled(cluster-wide). If lvm-storage is disabled (by initializing the clusterwith --no-lvm-storage) only instances with disk template in frozenset...
Add DEFAULT_VG and DTS_NOT_LVM to constants.py
DTS_NOT_LVM:This constant is needed when checking if an instance can be created withthe given disk template if no lvm-storage is available, i.e. the ganeticluster does not have a volume group
DEFAULT_VG:...
Change the order of config updates in some LUs
In the start and stop instance LUs, the configuration update is doneright at the end. This means that if, for example, the instance shutdownsucceeds, but the drive deactivation fails, the next run of the watcher...
Fix a bug in interactive confirmation of instances
This oneliner fixes a bug in listing more than twenty instances formultiple operations (shutdown, startup, etc.).
Reduce log noise for the new http-based rpc
This patch just removes an extraneous \n from the log message making itnicer to view.
Reviewed-by: schreiberal
Add QA test for “gnt-instance console”
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
Modify Disk.GetNodes() to support LD_FILE
Add constants for file-based storage
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.
Modify cluster-init to create file-storage-dir
This patch adds three things:- it normalizes the file storage directory path passed to gnt-cluster init- if the file-storage-path doesn't exist on the master node, ganeti tries to create it- adds additional check if the passed file-storage-dir is not a directory...
Remove some deprecated code in bdev.py
The BlockDev.GetStatus() method and some associated constants were neverused in the rest of the code. This patch removes them.
Change the opcode hierarchy and implementation
This patch adds a new top-level class (BaseJO) that is used for bothopcodes and a new Job class.
This new class and the related changes to the OpCode abstract class areused to implement simple to-dict/from-dict transformations, so that we...
Add option to change default file_storage_dir
Author: manuel.franceschiniReviewed-by: iustinp
Add support for file_storage_dir to LUInitCluster
Add file_storage_dir to opcodes.OpInitCluster
Add SS_FILE_STORAGE_DIR to ssconf
Add DEFAULT_FILE_STORAGE_DIR to constants
Add FILE_STORAGE_DIR to be in lib/_autoconf.py
Add file-storage-dir to configure.ac
This adds the possibility to specify at configure-time the default file-storage-dir.
Make ganeti-noded create BDEV_CACHE_DIR automatically
Currently in order to deal with tmpfs /var/run, we create theBDEV_CACHE_DIR in the init script. However, that does not cover all thecases, and it's not a proper place to deal with it: for example, dealing...
Use constants for “ssh” and “scp” binaries instead of magic values
Use new ssh.WriteKnownHostsFile function
This replaces very old code.
Use new cluster alias in known_hosts file
Use new “tty” parameter on SshRunner.BuildCmd for “gnt-instance console”
Add “tty” parameter to SshRunner.BuildCmd
This allows callers to allocate a pseudo-TTY easily.
Order SSH options alphabetically
Move SSH functions into a class
This renames some functions and does some minor codestyle cleanup.
Add function to write cluster SSH key to known_hosts file
The whole Ganeti cluster has a single SSH key. Its fingerprint iswritten to Ganeti's known_hosts file, together with an alias. Thisallows us to always use that alias instead of the real hostname,...
Locking: remove an empty space at End Of Line
Increase SharedLock fairness
Previously if a shared thread was notified, together with the rest, and was notfast enough in waking up and acquiring the lock, another one could release it,decide there were no more sharers, and let an exclusive one in instead. With...
Specify better gnt-instance(8) replace-disks
The -s option when changing secondary node on a drbd template is implied, andthus optional. Specify this in the manpage.
Disable cluster init with a reachable IP
Make the cluster init fail if the IP to which the cluster name resolvedis already reachable by the master node. This is not a foolproofsolution, but it allows a cheap method of detecting simple mistakes.
It will also disallow using the master node name as cluster name (which...
Modify utils.TcpPing to make source address optional
This patch modifies TcpPing and its callers to make the source addressselection optional. Usually, the kernel will know better whatsource address to use, just in some cases we want to enforce a given...
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,...
Replace custom file writing code with utils.WriteFile
Codestyle fixes: adding a few empty lines
LockSet: handle empty case
A LockSet is mostly useful when it has some locks in it. On the other handthere are cases in which it must function even when empty. For example if acluster has no instances in it there's no reason why locking all of themshouldn't work anyway. This patch adds test code for that situation and...
LockSet: add missing check code
This check that no operation had been performed before release() was missing inthe test code. Adding it.
LockSet: collapse two try/except into one
SharedLock: remove wrong assertion in code
r644 contained some cleanup code for LockSet. Among other things it removed asyntax error that allowed an assertion that previously wan't really checked totrigger. It turns out that even though the spirit of that assertion was correct...
Codestyle updates for locking code
LockSet: make acquire() able to get the whole set
This new functionality makes it possible to acquire a whole set, by passing"None" to the acquire() function as the list of elements. This will avoid newadditions to the set, and then acquire all the current elements. The list of...
LockSet: encapsulate acquire() in try-except
This patch adds a try/except area around most of the acquire() code (everythingafter the intial condition checks). Since the except: clause contains just a'raise' nothing really changes except the indentation of the code....
Make LockSet.__names() return a list, not a set
Previously the private version of the __names function returned directly a set.We'll keep this in the public interface but change the private version to alist in order to be able to sort() its result and then loop on it, even though...
LockSet: improve remove() api
Lockset's remove() function used to return a list of locks we failed to remove.Rather than doing this we'll return a list of removed locks, so it's moresimilar to how acquire() behaves. This patch also fixes the relevant unit tests....
LockSet: make acquire() return the set of names
In a LockSet acquire() returned True on success. This code changes that toreturn a set containing the names of the elements acquired. This is still atrue value if we acquired any lock but is slightly more useful (because if...
LockSet: invert try/for nesting in acquire()
This patch changes nothing to the functionality of a LockSet. Rather thantrying to do the whole for loop we try each of its steps. This opens the way tohandle differently a single failure.
Initial GanetiLockManager implementation
Includes some locking-related constants and explanations on how theLockManager should be used, the class itself and its test cases.
The class includes: - a basic constructor - functions to acquire and release lists of locks at the same level...
Fix master role stop on cluster destroy
Currently the cluster destroy doesn't remove the master role, whichmeans that the IP address of the cluster remains assigned to the masternode.
This patch fixes this and also a docstring in backend.StopMaster()....
Implement QA tests for gnt-cluster rename
Fix cluster rename operation
This one-liner fixes the cluster rename operation. As a side note, weshould have a QA test for this too.
LockSet: make acquire() fail faster on wrong locks
This patch makes acquire() first look up all the locks in the dict and then tryto acquire them later. The advantage is that if a lockname is already wrongsince the beginning we won't need to first queue and acquire other locks to...
LockSet implementation and unit tests
A LockSet represents locking for a set of resources of the same type. A threadcan acquire multiple resources at the same time, and release some or all ofthem, but cannot acquire more resources incrementally at different times...
Fix the gnt-cluster init man page
Some options were missing in the gnt-cluster init man page. This patch addsthem, removes an empty line, and clarifies a bit more some requirements.
Don't allow renaming to an existing instance
Even if the target instance is down or we are not checking for IP conflictschanging an instance name to a new one which is already in the cluster isdoomed to fail, because in a lot of places (among which figures the mind of...
Clarify online help for xc-instance reinstall.
Use constants.ETC_HOSTS instead of string for /etc/hosts
Distribute lib/locking.py
Split GanetiUnitTest into testutils.py
Update svn:ignore properties
Reviewed-by: iustin
Some changes on disk failure tests
Change comments to printed information, some cleanup. These changesare from November 2007. The test is not perfect yet.
This patch replaces some hardcoded strings with their corresponding constant in `_GenerateDiskTemplate()`.
Improve ganeti example cron file
The cron file in ganeti's example directory is now static, and executesganeti-watcher in /usr/local/sbin no matter where it's really installed. Withthis patch we generate it at build time substituting the right value of...
Small comment fix.
Fixes small spell mistakes and comments
Break trunk by removing twisted
This patch switches from the twisted usage for inter-node protocol tosimple BaseHTTPServer/httplib. The patch has more deletions because weuse no authentication, no encryption at all.
As such, this is just for trunk, and only for testing. What it brings is...
Add a few SharedLock delete() tests
- Check that even a shared acquire() fails on a deleted lock- Check that delete() fails on a lock you share (must own it or nothing)
These are assumptions I build on in future code, so better check for them.Currently no code change is necessary for them to be valid....
SharedLock: fix a wrong unit-test helper code
The _doItDelete helper code was supposed to be used to dispatch threads thatdeleted the SharedLock. It actually just acquired it exclusively. This remainedunnoticed as the helper thread is just used to test interaction, not the delete...
Add another 1.1->1.2 compatibility alias
gnt-instance replace-disks used to be called replace_disks.
Add the delete() operation to SharedLock
This new operation lets a lock be cleanly deleted. The lock will be exclusivelyheld before deletion, and after it pending and future acquires will raise anexception. Other SharedLock operations are modify to deal with delete() and to...
Fix a couple of SharedLock docstrings
Use the actual class name rather than a spaced version of it.
Update version numbers for the 1.2.3 release
Note: we don't update for now the install.sgml file with the new versionnumber, as there are no other changes. We'll update the web site toindicate that the current install.html document is valid for 1.2.3 too....
Revert "Include the DRBD upgrade tool in the dist archive"
This reverts commit 604 as the upgrade tool should not be in the 1.3 branch.
Update online help and manpage to include drbd disk type.
Include the DRBD upgrade tool in the dist archive
This patch adds the DRBD upgrade tool in the archive and in theinstalled tools dir, and its associated README in the doc_DATA target.
Fix gnt-instance info i1 i2 ...
Due to an indentation error only the last instance queried got returned byLUQueryInstanceData. Moving the append() call inside the for cycle to fix thisissue.
This is a one-liner targeted at 1.2.3
Replace version number in install.sgml during build time
Further fixes for the 'export MAC in hooks' change
QA suite which tests gnt-instance modify has uncovered another issue related tomac export.
Alter the device activation code
This tiny patch fixes the breakage that the previous patch aboutactivation did by removing the Close() call after activation.
The initial reason for that call was that if the device is alreadyactive and open, but we need it closed, we close it automatically....
Two small improvements to burnin
This tiny patch fixes the verbose option to actually work, and also whencreating instances it logs the secondary node too (even if this doesn'tapply for plain templates, it doesn't create an error).
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...
Code style updates for QA code.