Skip to content
Snippets Groups Projects
  1. Mar 04, 2008
    • Guido Trotter's avatar
      Initial GanetiLockManager implementation · 7ee7c0c7
      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
      7ee7c0c7
  2. Feb 28, 2008
    • Guido Trotter's avatar
      LockSet implementation and unit tests · aaae9bc0
      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
      aaae9bc0
  3. Feb 26, 2008
  4. Feb 21, 2008
    • Guido Trotter's avatar
      Add a few SharedLock delete() tests · 84152b96
      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
      84152b96
  5. Feb 20, 2008
    • Guido Trotter's avatar
      SharedLock: fix a wrong unit-test helper code · 4354ab03
      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
      4354ab03
  6. Feb 19, 2008
    • Guido Trotter's avatar
      Add the delete() operation to SharedLock · a95fd5d7
      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
      a95fd5d7
  7. Feb 18, 2008
  8. Feb 08, 2008
    • Guido Trotter's avatar
      Shared Lock implementation and unit tests. · 162c1c1f
      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
      162c1c1f
  9. Jan 18, 2008
    • Iustin Pop's avatar
      Fix the make dist rule · b6f2e47f
      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
      b6f2e47f
  10. Jan 07, 2008
    • Iustin Pop's avatar
      Fix ‘make distcheck’ breakage introduced in r455 · 6634816b
      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
      6634816b
    • Iustin Pop's avatar
      Add unittest for DRBD8 drdbsetup show parser · 3840729d
      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
      3840729d
  11. Dec 03, 2007
  12. Nov 20, 2007
  13. Nov 16, 2007
  14. Nov 14, 2007
  15. Nov 13, 2007
  16. Nov 12, 2007
  17. Nov 09, 2007
    • Iustin Pop's avatar
      Soften the requirements for hooks execution · 2395c322
      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
      2395c322
    • Michael Hanselmann's avatar
      Add functions to modify /etc/hosts. · 899d2a81
      Michael Hanselmann authored
      Reviewed-by: schreiberal
      899d2a81
  18. Nov 05, 2007
  19. Oct 17, 2007
  20. Oct 11, 2007
  21. Oct 10, 2007
    • Alexander Schreiber's avatar
      Remove fping as a dependency for Ganeti. · 16abfbc2
      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
      
      16abfbc2
    • Iustin Pop's avatar
      Remove the shebang from modules · 2f31098c
      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
      2f31098c
  22. Oct 08, 2007
  23. Oct 01, 2007
  24. Sep 21, 2007
    • Iustin Pop's avatar
      Remove requirement that host names are FQDN · 89e1fc26
      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
      89e1fc26
  25. Sep 17, 2007
  26. Sep 12, 2007
Loading