Skip to content
Snippets Groups Projects
  1. Mar 23, 2012
  2. Feb 21, 2012
  3. Jan 23, 2012
  4. Dec 12, 2011
  5. Dec 08, 2011
  6. 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
  7. Dec 02, 2011
  8. Dec 01, 2011
  9. Nov 21, 2011
  10. Aug 30, 2011
  11. Aug 25, 2011
  12. Aug 23, 2011
  13. Aug 05, 2011
    • Iustin Pop's avatar
      Zero DRBD metadata before creation · 18e4dee6
      Iustin Pop authored
      The docstring of the DRBD8 class says:
      
        … The meta device is checked for valid size and is zeroed on create.
      
      which is not done today, hence we have
      http://code.google.com/p/ganeti/issues/detail?id=182
      
      :
      
        node1# mkreiserfs -f /dev/xenvg/t8
        …
        ReiserFS is successfully created on /dev/xenvg/t8.
        node1# drbdmeta --force /dev/drbd256 v08 /dev/xenvg/t8 0 create-md
        md_offset 0
        al_offset 4096
        bm_offset 36864
      
        Found reiser filesystem
      
        This would corrupt existing data.
        If you want me to do this, you need to zero out the first part
        of the device (destroy the content).
        You should be very sure that you mean it.
        Operation refused.
      
      I've tested and even just 1MB is enough to wipe the meta, but let's be
      safer and pass a 'clean' meta to drbd.
      
      Note: I didn't copy _WipeDevice from backend.py since it seemed more
      complex than needed here.
      
      Signed-off-by: default avatarIustin Pop <iustin@google.com>
      Reviewed-by: default avatarMichael Hanselmann <hansmi@google.com>
      18e4dee6
  14. Jul 25, 2011
  15. May 10, 2011
  16. Mar 08, 2011
    • Apollon Oikonomopoulos's avatar
      Shared block storage support · b6135bbc
      Apollon Oikonomopoulos authored
      
      This patch introduces basic shared block storage support.
      
      It introduces a new storage backend, bdev.PersistentBlockDevice, to
      use as a backend for shared block storage. The new bdev requires a new
      BLOCKDEV_DRIVER_MANUAL constant with the value "manual" and uses it as
      the first part of the block device unique_id.
      
      A new disk template, DT_BLOCK is introduced as well and added to
      DTS_EXT_MIRROR and DTS_MAY_ADOPT. Also added DTS_MUST_ADOPT constant
      and use it to check for the presence of the adopt keyword during LU
      invocation. We enforce the /dev/disk limitation upon adoption, but we
      allow block devices to reside anywhere under /dev.
      
      This is very basic support and includes no storage manipulation (provisioning,
      resizing, renaming) which will have to be implemented through a "driver"
      framework.
      
      Signed-off-by: default avatarApollon Oikonomopoulos <apollon@noc.grnet.gr>
      [iustin@google.com: slight changes to bdev.py]
      Signed-off-by: default avatarIustin Pop <iustin@google.com>
      Reviewed-by: default avatarIustin Pop <iustin@google.com>
      b6135bbc
  17. Mar 01, 2011
    • Apollon Oikonomopoulos's avatar
      Core shared file storage support · 4b97f902
      Apollon Oikonomopoulos authored
      
      This patch introduces core file storage support, consisting of the following:
      
      A configure-time switch for enabling/disabling shared file storage
      support and controlling the shared file storage location:
      --with-shared-file-storage-dir=.  Shared file storage configuration is then
      available as _autoconf.ENABLE_SHARED_FILE_STORAGE and
      _autoconf.SHARED_FILE_STORAGE_DIR and there is a cluster-wide ssconf
      key named "shared_file_storage_dir" for changing the file location.
      
      A new disk template named "sharedfile" (DT_SHARED_FILE), using
      ganeti.bdev.FileStorage.
      
      Auxiliary functions in lib/config.py to handle shared file storage.
      
      Signed-off-by: default avatarApollon Oikonomopoulos <apollon@noc.grnet.gr>
      [iustin@google.com: small style fixes]
      Signed-off-by: default avatarIustin Pop <iustin@google.com>
      Reviewed-by: default avatarIustin Pop <iustin@google.com>
      4b97f902
  18. Jan 11, 2011
  19. Dec 02, 2010
  20. Sep 23, 2010
  21. Sep 22, 2010
  22. Aug 18, 2010
    • Manuel Franceschini's avatar
      Introduce new IPAddress classes · 8b312c1d
      Manuel Franceschini authored
      
      This patch unifies the netutils functions dealing with IP addresses to
      three classes:
      - IPAddress: Common IP address functionality
      - IPv4Address: IPv4 specific functionality
      - IPv6address: IPv6-specific functionality
      
      Furthermore it adds methods to check whether an address is a loopback
      address, replacing the .startswith("127") for IPv4 and adding IPv6
      support.
      
      It also provides the basis for future IPv6 address handling. Methods to
      convert IP strings to their corresponding interger values will allow to
      canonicalize IPv6 addresses.
      
      Signed-off-by: default avatarManuel Franceschini <livewire@google.com>
      Reviewed-by: default avatarIustin Pop <iustin@google.com>
      8b312c1d
  23. Aug 05, 2010
  24. Jul 09, 2010
  25. Jul 06, 2010
  26. Jun 30, 2010
  27. Jun 28, 2010
    • Guido Trotter's avatar
      Remove pred from compat.any/all · 403f5172
      Guido Trotter authored
      
      This makes it compatible with the python builtin, and we can even use
      the builtin when running under the right version of python. The all and
      any functions are renamed to _all and _any, so that they can be tested,
      and (non)existing unittests are updated (translation: there are no unit
      tests, so none are updated).
      
      This patch also moves the code deciding which partial to use next to
      the definition of the _partial function, rather than after TryToRoman.
      
      Signed-off-by: default avatarGuido Trotter <ultrotter@google.com>
      Reviewed-by: default avatarMichael Hanselmann <hansmi@google.com>
      403f5172
  28. Jun 22, 2010
  29. Apr 21, 2010
  30. Mar 23, 2010
  31. Mar 22, 2010
  32. Mar 15, 2010
  33. Mar 08, 2010
    • Iustin Pop's avatar
      Add strict name validation for the LVM backend · 6136f8f0
      Iustin Pop authored
      
      Currently we don't enforce name validation for the LVM backend, on the
      idea that LVM itself will reject invalid names and we catch those
      errors.
      
      However, recent LVM documents the accepted VG/LV name space, so it's
      easy to add this in the LVM backend code.
      
      In addition, the patch changes some hardcoded /dev/ constructions with
      utils.PathJoin().
      
      Signed-off-by: default avatarIustin Pop <iustin@google.com>
      Reviewed-by: default avatarMichael Hanselmann <hansmi@google.com>
      6136f8f0
    • Iustin Pop's avatar
      Implement disabling of file-based storage · cb7c0198
      Iustin Pop authored
      
      Rationale: the file-based storage backend can add/remove files under a
      certain directory. However, the master node is also controlling the
      setting of the file-based root directory, so basically it means we can't
      prevent arbitrary modifications by the master of the node's filesystem.
      
      In order to mitigate this for setups where the file-based storage is not
      used, we introduce a new setting at ./configure time, that controls the
      enable/disable of file-based storage. Since this is not modifiable by
      the master (over RPC), it is now possible in this case to prevent
      unintended modifications of the node's filesystem from the master.
      
      The new setting is used in bdev.py to not expose the file-based storage
      at all, and in cmdlib.py to prevent attempts at creation of such
      instances.
      
      Signed-off-by: default avatarIustin Pop <iustin@google.com>
      Reviewed-by: default avatarMichael Hanselmann <hansmi@google.com>
      cb7c0198
  34. Feb 15, 2010
  35. Jan 25, 2010
    • Iustin Pop's avatar
      Add a crude disable for DRBD barriers · 89b70f39
      Iustin Pop authored
      
      Ideally we want to/will have per-device DRBD controls of disk/metadata
      flushes. In the meantime, we want at least a disable of the barrier
      functionality for cases where one has battery-backed caches.
      
      Background: DRBD has four mechanism of handling ordered disk-writes.
      From the drbdsetup man-page, these are: barrier, flush, drain and none.
      DRBD prior to 8.2 only has drain and none. This patch makes all 8.x
      versions of DRBD disable all methods, and revert to none, in case one
      fully trusts batteries (either UPS for the whole system or battery for
      NVRAM).
      
      Signed-off-by: default avatarIustin Pop <iustin@google.com>
      Reviewed-by: default avatarMichael Hanselmann <hansmi@google.com>
      89b70f39
    • Iustin Pop's avatar
      Ensure all int/float conversions are handled right · 691744c4
      Iustin Pop authored
      
      int()/float() can raise either ValueError (in case of int("a")), or
      TypeError (in case of int(None)). We had many bugs over time due to
      this, and a recent one was just diagnosed, so we go over the codebase
      and replace all 'except ValueError' with 'except (TypeError,
      ValueError)' that protect such conversions (there were no 'except
      TypeError' cases that needed a ValueError added).
      
      Signed-off-by: default avatarIustin Pop <iustin@google.com>
      Reviewed-by: default avatarMichael Hanselmann <hansmi@google.com>
      Reviewed-by: default avatarGuido Trotter <ultrotter@google.com>
      691744c4
Loading