Skip to content
Snippets Groups Projects
  1. Feb 20, 2008
  2. 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
  3. Feb 18, 2008
  4. Feb 16, 2008
    • Guido Trotter's avatar
      Fix gnt-instance info i1 i2 ... · 515207af
      Guido Trotter authored
      Due to an indentation error only the last instance queried got returned by
      LUQueryInstanceData. Moving the append() call inside the for cycle to fix this
      issue.
      
      This is a one-liner targeted at 1.2.3
      
      Reviewed-by: iustinp
      515207af
  5. Feb 15, 2008
  6. Feb 14, 2008
    • Iustin Pop's avatar
      Alter the device activation code · 40a03283
      Iustin Pop authored
      This tiny patch fixes the breakage that the previous patch about
      activation did by removing the Close() call after activation.
      
      The initial reason for that call was that if the device is already
      active and open, but we need it closed, we close it automatically.
      
      This however conflicts with the 2-step open in the case the instance is
      already open.
      
      It makes sense to remove the call since in the current Ganeti setup,
      just doing Close() is not enough to change the device from (e.g.)
      primary to secondary, as some devices (e.g. md) might need Shutdown not
      Close.
      
      It also gets rid of a Close() in the CreateBlockDevice function, due to
      the same reasoning (although in Create the child should not have a
      different status anyway).
      
      Reviewed-by: imsnah
      40a03283
    • Iustin Pop's avatar
      Two small improvements to burnin · d7b47a77
      Iustin Pop authored
      This tiny patch fixes the verbose option to actually work, and also when
      creating instances it logs the secondary node too (even if this doesn't
      apply for plain templates, it doesn't create an error).
      
      Reviewed-by: imsnah
      d7b47a77
    • Iustin Pop's avatar
      Modify the default output of gnt-instance list · d8052456
      Iustin Pop authored
      This patch adds a new field available for selection in gnt-instance list
      names "status" which represents the combined value of "admin_state" and
      "oper_state". Since this is much easier to parse (e.g. gnt-instance list
      |grep ERROR), we also modify the default field list to use this instead
      of the admin/oper state fields.
      
      Reviewed-by: imsnah
      d8052456
    • Michael Hanselmann's avatar
      Code style updates for QA code. · c68d1f43
      Michael Hanselmann authored
      Reviewed-by: iustinp
      c68d1f43
  7. Feb 12, 2008
    • Guido Trotter's avatar
      Parse double protocol version in drbd8.2 · c3f9340c
      Guido Trotter authored
      DRBD 8.2 uses a double integer field ad protocol version, rather than a single
      one. This patch fixes the ganeti parsing code, allowing both the old and the
      new version type. In order to do so the internal _GetVersion function is
      changed to return a dict, rather than a list, and the second protocol field is
      added, only if present, as proto2.
      
      This is a fix for issue 24.
      
      Reviewed-by: iustinp
      c3f9340c
  8. Feb 10, 2008
  9. 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
  10. Feb 06, 2008
  11. Feb 05, 2008
    • Iustin Pop's avatar
      Add a test opcode that sleeps for a given duration · 06009e27
      Iustin Pop authored
      This can be used for testing purposes.
      
      Reviewed-by: ultrotter,imsnah
      06009e27
    • Iustin Pop's avatar
      Reduce the chance of DRBD errors with stale primaries · fdbd668d
      Iustin Pop authored
      This patch is a first step in reducing the chance of causing DRBD
      activation failures when the primary node has not-perfect data.
      
      This issue is more seen with DRBD8, which has an 'outdate' state (in
      which it can get more often). But it can (and before this patch, usually
      will) happen with both 7 and 8 in the case the primary has data to sync.
      
      The error comes from the fact that, before this patch, we activate the
      primary DRBD device and immediately (i.e. as soon as we can run another
      shell command) we try to make it primary. This might fail - since the
      primary knows it has some data to catch up to - but we ignored this
      error condition. The failure was visible later, in either md failing to
      activate over a read-only storage or by instance failing to start.
      
      The patch has two parts: one affecting bdev.py, which changes failures
      in BlockDev.Open() from returning False to raising
      errors.BlockDeviceError; noone (except a generic method inside bdev.py)
      checked this return value and we logged it but the master didn't know
      about it; now all classes raise errors from Open if they have a failure.
      
      The other part, affecting cmdlib.py, changes the activation sequence
      from:
        - activate on primary node as primary and secondary as secondary, in
          whatever order a function returns the nodes
      to the following:
        - activate all drives as secondaries, on both the primary and the
          secondary nodes of the instance
        - after that, on the primary node, re-activate the device stack as
          primary
      
      This is in order to give the chance to DRBD to connect and make the
      handshake. As noted in the comments, this just increases the chances of
      a handshake/connect, not fixing entirely the problem. However, it is a
      good first step and it passes all tests of starting with stale (either
      full or partial) primaries, with both drbd 7 and 8, and also passes a
      burnin.
      
      Note that the patch might make the device activation a little bit
      slower, but it is a reasonable trade-off.
      
      Reviewed-by: imsnah
      fdbd668d
  12. Feb 04, 2008
  13. Jan 31, 2008
  14. Jan 30, 2008
  15. Jan 28, 2008
    • Alexander Schreiber's avatar
      tiny typo fix · f2e9e0e8
      Alexander Schreiber authored
      Reviewed-by: iustinp
      
      f2e9e0e8
    • Iustin Pop's avatar
      Improve the documentation of query output fields · d8a4b51d
      Iustin Pop authored
      The gnt-node and gnt-instance list commands have a customizable list of
      output fields, but the list is not up to date (in the man page) and not
      easily understandable from the ‘--help’ output.
      
      This patch updates the man pages and adds the available fields and
      default fields in the ‘--help’ output, as part of the description.
      
      Example:
      Usage
      =====
        gnt-node list
      
      Lists the nodes in the cluster. The available fields are (see the man page for
      details): name, pinst_cnt, pinst_list, sinst_cnt, sinst_list, pip, sip,
      dtotal, dfree, mtotal, mnode, mfree, bootid. The default field list is (in
      order): name, dtotal, dfree, mtotal, mnode, mfree, pinst_cnt, sinst_cnt.
      
      Reviewed-by: imsnah,ultrotter
      d8a4b51d
    • Guido Trotter's avatar
      Fix a typo in a devel/upload comment · 4a160927
      Guido Trotter authored
      Files are uploaded to $prefix/sbin, not $prefix/bin
      
      Reviewed-by: iustinp
      4a160927
    • Iustin Pop's avatar
      Add QA tests for gnt-instance modify · c0f74c55
      Iustin Pop authored
      This patch adds QA tests for most of the possible parameters in the
      instance modify operation (exception being the MAC), and modifies the
      sample QA file to run this test.
      
      It also tests the no-modification test, but that is a weak one: we only
      test that the exit code is one, not that the command gave a proper
      response ("... please give at least one parameter") as opposed to a
      traceback.
      
      Reviewed-by: imsnah
      c0f74c55
    • Iustin Pop's avatar
      Add option for the number of VCPUs in instance listing · d6d415e8
      Iustin Pop authored
      Reviewed-by: ultrotter
      d6d415e8
    • Iustin Pop's avatar
      Allow selection of hypervisor type in QA · b32f9859
      Iustin Pop authored
      This patch allows the selection of the hypervisor type for the QA
      process; this is useful when testing hypervisor-independent changes that
      don't require a Xen setup.
      
      The patch also fixes the OS name in the sample QA config file provided.
      
      Reviewed-by: imsnah
      b32f9859
    • Iustin Pop's avatar
      Fix "gnt-instance modify --initrd" · 2bc22872
      Iustin Pop authored
      The new QA tests for instance modify uncovered a bug in the modify
      initrd operation when setting the initrd to none.
      
      Reviewed-by: imsnah
      2bc22872
  16. Jan 27, 2008
  17. Jan 25, 2008
  18. Jan 22, 2008
    • Iustin Pop's avatar
      Change the install directory for the tools · 909a0e4d
      Iustin Pop authored
      Currently, the tools are installed under $prefix/share/ganeti. This
      prevents installing other things in a nice way under share/ganeti (like
      arch-independent OS definitions), therefore we want the tools to live
      under share/ganeti/tools.
      
      A second change is that since these are programs, they would better live
      under libdir than datadir - we might have to change them later to
      binaries in which case 'share' is definitely not the way to go.
      
      This patch therefore changes the install directory for the tools to
      $prefix/lib/ganeti/tools.
      
      Reviewed-by: imsnah
      909a0e4d
  19. Jan 21, 2008
    • Guido Trotter's avatar
      Remove qa tests for gnt-instance start/stop · e0b62a26
      Guido Trotter authored
      Those tests were added in the wrong place. This patch removes them.  One day
      we'll implement proper command line regression testing and they should go in
      there.
      
      Reviewed-by: iustinp
      e0b62a26
    • Guido Trotter's avatar
      Test start/stop aliases in qa · ce9fb89d
      Guido Trotter authored
      This tests both that those two aliases have not been removed and also that
      aliases handling hasn't been broken.
      
      Reviewed-by: iustinp
      
      ce9fb89d
    • Guido Trotter's avatar
      Add a few aliases for startup/shutdown · 536fda25
      Guido Trotter authored
      These aliases are widely used to think of these operations and save some typing
      too. Even though there is some thought to make start/stop the default operation
      name I don't think this should happen for 1.2, for now adding it as an alias is
      fine.
      
      Reviewed-by: iustinp
      
      536fda25
Loading