Add SS_FILE_STORAGE_DIR to ssconf
Author: manuel.franceschiniReviewed-by: iustinp
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
Reviewed-by: ultrotter
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
Reviewed-by: imsnah
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.
Reviewed-by: iustinp
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.
Reviewed-by: schreiberal
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.
Parse double protocol version in drbd8.2
DRBD 8.2 uses a double integer field ad protocol version, rather than a singleone. This patch fixes the ganeti parsing code, allowing both the old and thenew version type. In order to do so the internal _GetVersion function is...
Fix a wrong OP_ID added in r261
Shared Lock implementation and unit tests.
Adding a locking.py file for the ganeti locking library. Its first component isthe implementation of a non-recursive blocking shared lock complete with atesting library.
Reviewed-by: imsnah, iustinp
Document the client API protocol, first version
This patch adds some documentation about the proposed client API. It'snot yet complete, but should be a usable draft for the initialimplementation.
Add a test opcode that sleeps for a given duration
This can be used for testing purposes.
Reviewed-by: ultrotter,imsnah
Reduce the chance of DRBD errors with stale primaries
This patch is a first step in reducing the chance of causing DRBDactivation failures when the primary node has not-perfect data.
This issue is more seen with DRBD8, which has an 'outdate' state (inwhich it can get more often). But it can (and before this patch, usually...
Fix some indendation issues
Fix incomplete mac address export to hooks
This patch completes the change introduced in r566 (trunk) and r568(branch-1.2).
Give mac information to instance hooks
Currently just the bridge and ip address are passed. Add an environmentvariable for the mac address.
Make the mouse more usable in VNC for HVM.
Export bridge information too
gnt-backup export used to export the ip and mac of each nic, but not whichbridge it was connected to. Adding this information.
Fix online help for gnt-backup import
The help string missed drbd as a disk template option. Adding it.
Bump version numbers for the 1.2.2 release
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...
Fix a typo in a devel/upload comment
Files are uploaded to $prefix/sbin, not $prefix/bin
Add QA tests for gnt-instance modify
This patch adds QA tests for most of the possible parameters in theinstance modify operation (exception being the MAC), and modifies thesample QA file to run this test.
It also tests the no-modification test, but that is a weak one: we only...
Add option for the number of VCPUs in instance listing
Allow selection of hypervisor type in QA
This patch allows the selection of the hypervisor type for the QAprocess; this is useful when testing hypervisor-independent changes thatdon't require a Xen setup.
The patch also fixes the OS name in the sample QA config file provided....
Fix "gnt-instance modify --initrd"
The new QA tests for instance modify uncovered a bug in the modifyinitrd operation when setting the initrd to none.
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 missing parenthesis
It was wrongly deleted when converting
if a in dict.keys():toif a in dict:
Change the install directory for the tools
Currently, the tools are installed under $prefix/share/ganeti. Thisprevents installing other things in a nice way under share/ganeti (likearch-independent OS definitions), therefore we want the tools to liveunder share/ganeti/tools....
Remove qa tests for gnt-instance start/stop
Those tests were added in the wrong place. This patch removes them. One daywe'll implement proper command line regression testing and they should go inthere.
Test start/stop aliases in qa
This tests both that those two aliases have not been removed and also thataliases handling hasn't been broken.
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.
Add support for command aliases
Passing a new aliases dict to generic main we can easily support aliases forcompatibility reasons or simply useability.
Add tool to ease testing of unsubmitted patches
The upload tool can be used to submit the current code to an arbitrary list ofnodes. This helps developers in easily testing their changes before submittingthem.
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...
Fix VG listing broken by r510
LVM code sometimes adds an extra separator at the end of the field list.Make the code strip it if exists.
Make backend._GetVGInfo check the validity of 'vgs'
Currently, the function backend._GetVGInfo only checks for errors viathe exit code of the 'vgs' command. However, there are other ways offailure so we need to also check for valid output before parsing....
Fix checking of node free disk in CreateInstance
This patch does two things: - checks that the result values from call_node_info are valid integer values and aborts otherwise - skips disk space computation for the DT_DISKLESS case
The most important point of the patch is the verification of results...