- Mar 04, 2008
-
-
Guido Trotter authored
Includes some locking-related constants and explanations on how the LockManager 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 - functions to add and remove list of locks at modifiable levels - dynamic checks against out-of-order acquisitions and other illegal ops Its testing library checks that the LockManager behaves correctly and that the external assumptions it relies on are respected. Reviewed-by: imsnah
-
- Feb 28, 2008
-
-
Guido Trotter authored
A LockSet represents locking for a set of resources of the same type. A thread can acquire multiple resources at the same time, and release some or all of them, but cannot acquire more resources incrementally at different times without releasing all of them in between. Internally a LockSet uses a SharedLock for each resource to be able to grant both exclusive and shared acquisition. It also supports safe addition and removal of resources at runtime. Acquisitions are ordered alphabetically in order to grant them to be deadlock-free. A lot of assumptions about how the code interacts are made in order to grant both safety and speed; in order to document all of them the code features pretty lenghty comments. The test suit tries to catch most common interactions but cannot really tests tight race conditions, for which we still need to rely on human checking. This is the second basic building block for the Ganeti Lock Manager. Instance and Node locks will be put in LockSets to manage their acquisition and release. Reviewed-by: imsnah
-
- Feb 26, 2008
-
-
Michael Hanselmann authored
Reviewed-by: iustinp
-
- Feb 21, 2008
-
-
Guido Trotter authored
- 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. Reviewed-by: iustinp
-
- Feb 20, 2008
-
-
Guido Trotter authored
The _doItDelete helper code was supposed to be used to dispatch threads that deleted the SharedLock. It actually just acquired it exclusively. This remained unnoticed as the helper thread is just used to test interaction, not the delete code by itself, and delete requires an exclusive acquire anyway. Reviewed-by: imsnah
-
- Feb 19, 2008
-
-
Guido Trotter authored
This new operation lets a lock be cleanly deleted. The lock will be exclusively held before deletion, and after it pending and future acquires will raise an exception. Other SharedLock operations are modify to deal with delete() and to avoid code duplication. This patch also adds unit testing for the new function and its interaction with the other lock features. The helper threads are sligtly modified to handle and report the condition of a deleted lock. As a bonus a non-related unit test about not supporting non-blocking mode yet has been added as well. This feature will be used by the LockSet in order to support deadlock-free delete of resources. This in turn will be useful to gracefully handle the removal of instances and nodes from the cluster dealing with the fact that other operations may be pending on them. Reviewed-by: iustinp
-
- Feb 18, 2008
-
-
Guido Trotter authored
Use the actual class name rather than a spaced version of it. Reviewed-by: iustinp
-
- Feb 08, 2008
-
-
Guido Trotter authored
Adding a locking.py file for the ganeti locking library. Its first component is the implementation of a non-recursive blocking shared lock complete with a testing library. Reviewed-by: imsnah, iustinp
-
- Jan 18, 2008
-
-
Iustin Pop authored
In revision 459 I added a bug in the make dist rule in the sense that the archive will include *all* of test/data directory, including the .svn directory if it exists. This patch fixes that problem and adds a distcheck hook that tests for such errors in the future (files/directories matching the .svn and .git patterns). It also fixes a typo in the NEWS file. Reviewed-by: imsnah
-
- Jan 07, 2008
-
-
Iustin Pop authored
This patch fixes the ‘make distcheck’ breakage caused by missing test data in the archive and missing handling of builddir!=srcdir case. Reviewed-by: schreiberal
-
Iustin Pop authored
This patch changes the bdev.DRBD8._GetDevInfo to take a string instead of a minor, separates the `drbdsetup show` invocation into a new separate method (bdev.DRBD8._GetShowData) and modifies the rest of the DRBD8 class to make the appropriate calls. It also adds a unittest script and data files for testing various cases of device output. Reviewed-by: imsnah
-
- Dec 03, 2007
-
-
Alexander Schreiber authored
Reviewed-by: imsnah
-
- Nov 20, 2007
-
-
Michael Hanselmann authored
Reviewed-by: iustinp
-
Michael Hanselmann authored
Reviewed-by: ultrotter
-
- Nov 16, 2007
-
-
Michael Hanselmann authored
Reviewed-by: schreiberal
-
- Nov 14, 2007
-
-
Michael Hanselmann authored
Reviewed-by: schreiberal
-
Michael Hanselmann authored
Reviewed-by: ultrotter
-
Michael Hanselmann authored
Reviewed-by: schreiberal, ultrotter
-
- Nov 13, 2007
-
-
Michael Hanselmann authored
Reviewed-by: schreiberal
-
- Nov 12, 2007
-
-
Michael Hanselmann authored
- Combine hostname and aliases on one line - Fix bug with wrongfully removed newline characters - Use wrapper for SetEtcHostsEntry in cmdlib Reviewed-by: iustin
-
Michael Hanselmann authored
-
Michael Hanselmann authored
Reviewed-by: TODO
-
- Nov 09, 2007
-
-
Iustin Pop authored
Currently, an unreachable node (or one that return undetermined failure) in the hooks pre-phase will abort the curren operation. This is not good, as a down node could prevent many operation on the cluster. This patch changes a RPC-level failure (and not a hook execution failure) into a warning. It also modifies the related test cases. This fixes issue 11. Reviewed-by: ultrotter
-
Michael Hanselmann authored
Reviewed-by: schreiberal
-
- Nov 05, 2007
-
-
Michael Hanselmann authored
Reviewed-by: schreiberal
-
- Oct 17, 2007
-
-
Alexander Schreiber authored
Reviewed-by: imsnah
-
- Oct 11, 2007
-
-
Michael Hanselmann authored
This removes the dependency on either the uuid module or e2fsprogs' uuidgen. Reviewed-by: iustinp
-
- Oct 10, 2007
-
-
Alexander Schreiber authored
This patch completely gets rid of fping - replace all fping invocations with TcpPing calls - update documentation accordingly. - associated cleanups (use constant for localhost IP, use more sensible defaults for TcpPing and _use_ those) Reviewed-by: iustinp
-
Iustin Pop authored
Since modules are not directly executables, remove the shebang from them. This helps with lintian warnings. Also make the autogenerated _autoconf.py contain two comment lines at the beginning, like the other modules. Reviewed-by: ultrotter
-
- Oct 08, 2007
-
-
Michael Hanselmann authored
- 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 Reviewed-by: iustinp
-
Michael Hanselmann authored
dot. Reviewed-by: iustinp
-
- Oct 01, 2007
-
-
Michael Hanselmann authored
Reviewed-by: schreiberal
-
- Sep 21, 2007
-
-
Iustin Pop authored
We currently require that hostnames are FQDN not short names (node1.example.com instead of node1). We can allow short names as long as: - we always resolve the names as returned by socket.gethostname() - we rely on having a working resolver These issues are not as big as may seem, as we only did gethostname() in a few places in order to check for the master; we already required working resolver all over the code for the other nodes names (and thus requiring the same for the current node name is normal). The patch moves some resolver calls from within execution path to the checking path (which can abort without any problems). It is important that after this patch is applied, no name resolving is called from the execution path (LU.Exec() or other code that is called from within those methods) as in this case we get much better code flow. This patch also changes the functions for doing name lookups and encapsulates all functionality in a single class. The final change is that, by requiring working resolver at all times, we can change the 'return None' into an exception and thus we don't have to check manually each time; only some special cases will check (ganeti-daemon and ganeti-watcher which are not covered by the generalized exception handling in cli.py). The code is cleaner this way. Reviewed-by: imsnah
-
- Sep 17, 2007
-
-
Alexander Schreiber authored
Reviewed-by: iustinp, imsnah
-
Alexander Schreiber authored
To be used to replace the currently fping(8) based reachability test. Reviewed-by: imsnah
-
- Sep 12, 2007
-
-
Michael Hanselmann authored
-