Skip to content
Snippets Groups Projects
  1. Jan 22, 2013
  2. Jan 09, 2013
  3. Dec 27, 2012
  4. Nov 21, 2012
  5. Nov 14, 2012
  6. Oct 25, 2012
  7. Oct 05, 2012
  8. Jan 23, 2012
  9. Dec 06, 2011
    • Andrea Spadaccini's avatar
      Add DRBD barriers disk parameters · 8a69b3a8
      Andrea Spadaccini authored
      
      Add the disk-barriers and meta-barriers parameters described in the
      design doc.
      
      constants.py:
      * add the needed LD and DT-level parameters, use the defaults provided
        at ./configure time;
      * add constants representing which barriers should be disabled and the
        set of valid options.
      
      lib/bdev.py:
      * factor the barriers handling code to a class method, for testing
        purposes;
      * implement the more granular version checking logic;
      * use the LD level parameters;
      * add stricter check on DRBD version (8.0, 8.2 or 8.3), as we do not
        support 8.4 yet.
      
      lib/cmdlib.py:
      * translate DT level parameters to LD level ones.
      
      configure.ac, Makefile.am:
      * set both disk and meta barriers parameters depending on the value of
        --enable-drbd-barriers.
      
      test/ganeti.bdev_unittest.py:
      * unit tests for the code that sets DRBD barrier parameters depending on
        the version.
      
      doc/design-resource-model.rst:
      * reword the description of meta-barriers;
      * change all disk parameters names to use dashes instead of underscores.
      
      Signed-off-by: default avatarAndrea Spadaccini <spadaccio@google.com>
      Reviewed-by: default avatarIustin Pop <iustin@google.com>
      8a69b3a8
  10. Aug 23, 2011
  11. Aug 05, 2010
  12. Jul 12, 2010
  13. Jul 06, 2010
  14. Jun 30, 2010
  15. Nov 03, 2009
  16. Aug 21, 2009
  17. May 05, 2009
    • Iustin Pop's avatar
      Fix compatibility with DRBD 8.3 · 01e2ce3a
      Iustin Pop authored
      
      DRBD 8.3 changes two more things compared to 8.2:
        - /proc/drbd format changed in multiple ways; the part we're
          interested is the ‘st:’ to ‘ro:‘ change (in the changelog named as
          “Renamed 'state' to 'role'”
        - “drbdsetup /dev/drbdN show” changed the ‘device’ stanza from:
            device "/dev/drbd0";
          to:
            device                  minor 0;
      
      This patch fixes these both and adds data files and unittests for DRBD
      8.3.1.
      
      Signed-off-by: default avatarIustin Pop <iustin@google.com>
      01e2ce3a
  18. Feb 16, 2009
    • Iustin Pop's avatar
      Convert IOErrors for /proc/drbd into our errors · f6eaed12
      Iustin Pop authored
      If /proc/drbd can't be opened, this raises an IOError, but all the
      error-handling behaviour in backend treats only BlockDeviceErrors. This
      creates a plain failure in cluster verify and in other RPC calls.
      
      This patch simply converts EnvironmentErrors into BlockDeviceErrors, and
      also changes the RPC result for NV_DRBDLIST and its handling to be able
      to show the error. The other RPC calls work by default now, due the
      existing error handling.
      
      Reviewed-by: ultrotter
      f6eaed12
  19. Jan 20, 2009
    • Iustin Pop's avatar
      DRBD: check for in-use minor during Create · 767d52d3
      Iustin Pop authored
      In order to prevent errors with old, in-use DRBD minors, we check and
      abort at create time if our minor is already in use. For this we need to
      also modify DRBD8Status to be able to parse cs:Unconfigured devices.
      
      Reviewed-by: ultrotter
      767d52d3
    • Iustin Pop's avatar
      Unify some unittest functions · 51596eb2
      Iustin Pop authored
      This patch adds unified temporary file handling to the
      testutils.GanetiTestCase class, which adds easy creation and automated
      cleanup of temporary files.
      
      The patch allows a simpler handling in a couple of test cases but
      requires all child classes to call the parent setUp and tearDown
      methods.
      
      Reviewed-by: ultrotter
      51596eb2
  20. Oct 20, 2008
    • Iustin Pop's avatar
      Generalize the reading of test file data · 149a5439
      Iustin Pop authored
      Currently we have two methods in ganeti.bdev_unittest.py of computing
      the test data file name - and, of course, they don't give the same
      results.
      
      The patch moves the functions to compute the test file name and reading
      of its contents to the GanetiTestCase class in testutils, which allows
      running the tests from the command line as well.
      
      We also change assertFileContent to use utils.ReadFile.
      
      Reviewed-by: imsnah
      149a5439
  21. Jun 19, 2008
  22. Jun 18, 2008
    • Iustin Pop's avatar
      Fix bdev unittest when run under distcheck · ae9da390
      Iustin Pop authored
      The path to the filename for drbd8 proc data is not correctly computed
      when using distcheck. The patch duplicates it from the other drbd tests.
      
      Reviewed-by: ultrotter
      ae9da390
    • Iustin Pop's avatar
      Rework the DRBD8 device status computation · 6b90c22e
      Iustin Pop authored
      Currently, compute the status of a drbd8 device in GetSyncStatus and
      return only the values that we need (and fit in the framework of
      GetSyncStatus). However, the full status details are useful (and needed)
      in other places, so the patch attempts to improve this situation.
      
      We abstract the status of a device outside in a separate class, that
      knows how to parse contents from /proc/drbd and set easily accessible
      attributes. We then simplify the GetSyncStatus to use this and return
      the values that it needs, and add a separate method that returns the
      full status object.
      
      The move to a separate class cleans up a little bit the old
      sync-progress computation from GetSyncStatus, but it's still many
      regexes.
      
      The patch also adds unittests for a few statuses, and modifies one
      BaseDRBD call to accept a custom filename instead of '/proc/drbd' to
      ease unittests.
      
      Reviewed-by: imsnah
      6b90c22e
  23. 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
Loading