Skip to content
Snippets Groups Projects
  1. Jan 11, 2011
  2. Dec 02, 2010
  3. Sep 23, 2010
  4. Sep 22, 2010
  5. 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
  6. Aug 05, 2010
  7. Jul 09, 2010
  8. Jul 06, 2010
  9. Jun 30, 2010
  10. 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
  11. Jun 22, 2010
  12. Apr 21, 2010
  13. Mar 23, 2010
  14. Mar 22, 2010
  15. Mar 15, 2010
  16. 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
  17. Feb 15, 2010
  18. 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
  19. Jan 04, 2010
  20. Dec 28, 2009
  21. Dec 01, 2009
  22. Nov 03, 2009
  23. Sep 03, 2009
  24. Aug 21, 2009
  25. Aug 06, 2009
  26. Aug 05, 2009
  27. Aug 04, 2009
  28. Jul 16, 2009
    • Iustin Pop's avatar
      Use full-stripe size in LVM growth · 38256320
      Iustin Pop authored
      
      LVM has issues when growing stripped volumes, so it's best to specify
      the growth in exact multiples of the full stripe size (as precise as
      possible). For this we need to do a couple of changes:
        - in LVM Attach(), we query additionally the VG extent size and the LV
          stripe count; since this makes lvs return a (possibly) multi-line
          output, we now split it into lines and only take the last one
        - in LVM Grow(), we round up the increase in multiples of the full
          stripe size
      
      The patch also sets the correct target size in DRBD growth.
      
      Signed-off-by: default avatarIustin Pop <iustin@google.com>
      Reviewed-by: default avatarOlivier Tharan <olive@google.com>
      38256320
  29. Jul 07, 2009
  30. Jul 01, 2009
  31. Jun 08, 2009
    • Iustin Pop's avatar
      Enable stripped LVs · fecbe9d5
      Iustin Pop authored
      
      This patch enables stripped LVs, falling back to non-stripped if the
      stripped creation fails. If the configure-time lvm-stripecount is 1,
      this patch becomes a noop (with an insignificant python-level overhead,
      but no extra lvm calls).
      
      The effect of this patch is that new instances will get stripped LVs
      from the start, whereas old instances will have their LVs stripped as
      soon as replace-disks is run for them.
      
      Signed-off-by: default avatarIustin Pop <iustin@google.com>
      Reviewed-by: default avatarGuido Trotter <ultrotter@google.com>
      fecbe9d5
    • Iustin Pop's avatar
      Add more constants for DRBD and change sync tests · 3c003d9d
      Iustin Pop authored
      
      This patch adds constants for the connection status, peer roles and disk
      status, and it changes the rules for when the disk is considered as
      “resyncing” - previously it was only for syncsource/synctarget, but
      there are many other transient statuses which could be misinterpreted as
      ‘degraded’ (because they where not considered as resyncing, but the disk
      is not consistent in these statuses).
      
      Furthermore, cmdlib.py:WaitForSync determines if a device is syncing or
      not based on sync_percent being not none. Not all DRBD resync statuses
      offer a percent done, so if we are syncing but don't have a sync
      percent, we'll report a zero sync percent (and no time estimate).
      
      The patch also removes a few unused variables (is_sync_target,
      peer_sync_target, is_resync) whose value doesn't make sense anymore with
      the new sync rules.
      
      Signed-off-by: default avatarIustin Pop <iustin@google.com>
      Reviewed-by: default avatarMichael Hanselmann <hansmi@google.com>
      3c003d9d
Loading