Skip to content
Snippets Groups Projects
  1. Nov 02, 2007
    • Michael Hanselmann's avatar
      Test “gnt-cluster command”. · 830da270
      Michael Hanselmann authored
      Also check whether file contents are correct for both “gnt-cluster command” and
      “gnt-cluster copyfile”.
      
      Reviewed-by: iustinp
      
      830da270
    • Iustin Pop's avatar
      Implement device to instance mapping cache · 3f78eef2
      Iustin Pop authored
      Currently, troubleshooting DRBD problems involves a manual process of going
      backwards from the DRBD device to the instance that owns it.
      
      This patch adds a weak (i.e. not guaranteed to be correct or up-to-date)
      cache of device to instance. The cache should be, in normal operation,
      having correct information as the only time when devices change paths
      are when they are started/stopped, and the code in backend.py adds cache
      updates to exactly these operations.
      
      The only drawback of this implementation is that we don't fully update
      the cache on renames of devices (we clean the old entries but we don't
      add new ones). Since the rename changes the path only for LVs (and not
      drbd and md), this is less of a problem as the target of this code is
      debugging DRBD and MD issues.
      
      The patch writes files named bdev_drbd<N> (or bdev_md<N>,
      bdev_xenvg_...) in /var/run/ganeti (more exactly, LOCALSTATEDIR/ganeti).
      The files start with 'bdev_' and continue with the path of the device
      under /dev/ (this prefix stripped), and contain the following values,
      space separated:
        - instance name
        - primary or secondary (depending on how the device is on the primary
          or secondary node)
        - instance visible name: sda or sdb or not_visible, the latter case
          when the device is not the top-level device (i.e. remote_raid1
          templates will have sd[ab] for the md, but not_visible for drbd and
          logical volumes)
      
      The cache is designed to not raise any errors, if there is an I/O error
      it will only be logged in the node daemon log file. This is in order to
      reduce the possible impact of the cache on the block device activation
      and shutdown code.
      
      Reviewed-by: imsnah
      3f78eef2
    • Iustin Pop's avatar
      Improve burnin with regard to drbd8 · 79f87a76
      Iustin Pop authored
      Allow burnin to use the new drbd8 template (for which case one needs to
      disable replacement of disks, burnin does yet support that with drbd8).
      
      The patch also changes do-replace[12] to no-replace[12] as that is what
      they actually do.
      
      Reviewed-by: imsnah
      79f87a76
    • Iustin Pop's avatar
      Update the dev_path on LVs on rename · be345db0
      Iustin Pop authored
      When renaming a logical volume, we should change the dev_path (and other
      internal variables) in order to be consistent.
      
      Reviewed-by: imsnah
      be345db0
    • Iustin Pop's avatar
      Revision 302 is broken, this fixes it · 25a915d0
      Iustin Pop authored
      I forgot a pair of parentheses in that revision which break the common
      case. This patch adds them.
      
      Reviewed-by: ultrotter
      25a915d0
  2. Nov 01, 2007
    • Iustin Pop's avatar
      Fix printing of unconfigured DRBD devices · 073ca59e
      Iustin Pop authored
      If the device is unconfigured (not yet did SetDiskID for it ever), it
      might have a physical_id of None. This patch fixes that case.
      
      Reviewed-by: ultrotter
      073ca59e
    • Guido Trotter's avatar
      Remove two trailing whitespaces · d06565e0
      Guido Trotter authored
      Ok, I've been battling with those for a while but it seems
      in the end I forgot to get rid of them! :( Doing it explicitely now.
      
      Reviewed-By: iustinp
      d06565e0
    • Guido Trotter's avatar
      Move blank lines inside function messages · 2527691a
      Guido Trotter authored
      This patch changes whitespace only. It fixes all the functions in script/gnt-os
      by putting a white line at the end of all the function descriptions and
      removing it from just before the code.
      
      Reviewed-By: iustinp
      2527691a
    • Guido Trotter's avatar
      Add empty line after each diagnose OS-Node set · dd96409a
      Guido Trotter authored
      Reviewed-By: imsnah
      dd96409a
    • Guido Trotter's avatar
      Modify the displayed format for gnt-os diagnose · 107b0ccb
      Guido Trotter authored
      Get rid of the tabulated form and create a simplier indented structure.
      Now a valid OS looks something like:
      
      OS: foo [global status: partial valid]
        Node: gsdtest4.euw.corp.google.com, status: valid (path: /usr/local/lib/ganeti/os/foo)
        Node: gsdtest5.euw.corp.google.com, status: valid (path: /usr/local/lib/ganeti/os/foo)
          [hidden] path: /usr/local/lib/ganeti/os2/foo, status: 'ganeti_api_version' file not found (ENOENT)
        Node: gsdtest3.euw.corp.google.com, status: 'ganeti_api_version' file not found (ENOENT) (path: /usr/local/lib/ganeti/os/foo)
      
      Reviewed-By: imsnah
      107b0ccb
    • Guido Trotter's avatar
      Change the way to compute the first os status message · 48f85f75
      Guido Trotter authored
      Use both _DiagnoseOSStatus and  _DiagnoseOSPath to calculate the message
      associated with the first entry found on a node for an OS. Also call the rename
      the relevant variables to _msg rather than just _status to reflect that they
      contain a bit more than just the bare status message.
      
      Reviewed-By: imsnah
      
      48f85f75
    • Guido Trotter's avatar
      Separate OS status and path · 5efc50fc
      Guido Trotter authored
      Make _DiagnoseOSStatus only return a status message for the OS diagnose object
      and create a new _DiagnoseOSPath function to get the path out. This will let us
      be more flexible in the messages we display to the user.
      
      Reviewed-By: imsnah
      5efc50fc
    • Iustin Pop's avatar
      Whitespace fixes · 5d0fe286
      Iustin Pop authored
      Reviewed-by: ultrotter
      5d0fe286
    • Michael Hanselmann's avatar
      Cleanup colouring functions. · dfe11bad
      Michael Hanselmann authored
      Make the code somewhat smaller. Disable disk failure test for master for now.
      
      Reviewed-by: schreiberal
      
      dfe11bad
    • Michael Hanselmann's avatar
      Cleanup QA scripts. · b1ffe1eb
      Michael Hanselmann authored
      - Split main() function into several small ones.
      - Current work on disk failure tests. This is not yet finished.
      - Fix small typo in qa_node.py.
      
      Reviewed-by: schreiberal
      
      b1ffe1eb
  3. Oct 31, 2007
    • Iustin Pop's avatar
      Revert "Implement multi-failover options" · 80de0e3f
      Iustin Pop authored
      This reverts commit 289, as the node failover functionality was already
      implemented in gnt-node (as opposed to gnt-instance). My mistake.
      
      Reviewed-by: ultrotter
      80de0e3f
    • Michael Hanselmann's avatar
      Fix usage of OpReplaceDisks. · 22d31e49
      Michael Hanselmann authored
      Reviewed-by: iustinp
      
      22d31e49
    • Iustin Pop's avatar
      Small improvements to multi-instance selections · bcee9cb4
      Iustin Pop authored
      This patch fixes the documentation in a few cases and adds handling of
      the situation where no instance is selected due to too restrictive
      options given.
      
      Reviewed-by: imsnah
      bcee9cb4
    • Iustin Pop's avatar
      Implement multi-failover options · 36c87212
      Iustin Pop authored
      This patch adds the same style of multi-instance selection as in
      shutdown/startup to the failover subcommand, with the exception that we
      cannot failover with --node or --all (it doesn't make sense).
      
      Reviewed-by: imsnah
      36c87212
    • Iustin Pop's avatar
      More sane handling of errors during failover · 24a40d57
      Iustin Pop authored
      Currently we ignore errors on instance shutdown (on the source node)
      during instance failover. We should do this only if the user gave a
      command line options allowing this, as it's a dangerous thing to do.
      
      This patch fixes this by using the same "--ignore-consistency" option
      for deciding whether to continue or abort. It also expands a bit the man
      page.
      
      Reviewed-by: imsnah
      24a40d57
    • Iustin Pop's avatar
      Fix bridge checking in instance failover · 50ff9a7a
      Iustin Pop authored
      The current code checks the bridge on the primary node of the instance,
      but we need to check it on the destination node.
      
      This was caught by testing failover with a down primary node.
      
      Reviewed-by: imsnah
      50ff9a7a
  4. Oct 30, 2007
  5. Oct 29, 2007
  6. Oct 28, 2007
    • Guido Trotter's avatar
      Import two itertools recipes · 78feb6fb
      Guido Trotter authored
      The two function 'any' and 'all' are copied as-is from the python 2.4
      documentation for the itertools module. They are useful (and are already
      builtin function in python 2.5).
      
      Reviewed-by: iustinp
      
      78feb6fb
  7. Oct 26, 2007
  8. Oct 25, 2007
    • Iustin Pop's avatar
      Modify two mirror-device related rpc calls · 153d9724
      Iustin Pop authored
      The two calls mirror_addchild and mirror_removechild take only one child
      for addition/removal. While this is enough for our md usage, for local
      disk replacement in drbd8, we need to be able to specify both the data
      and metadata device. This patch modifies these two rpc calls (and their
      backend implementation and their usage in cmdlib) to take a list of
      children to add/remove.
      
      Reviewed-by: imsnah
      153d9724
  9. Oct 24, 2007
    • Iustin Pop's avatar
      Initial implementation of drbd8 template type · a1f445d3
      Iustin Pop authored
      This is a partially working drbd8 template type. It does:
        - add/remove
        - startup/failover/shutdown
      
      Not working is replace disks, which needs custom code for this template.
      
      Reviewed-by: imsnah
      a1f445d3
    • Iustin Pop's avatar
      Allow DRBD8 to sync after sb1-pri with no changes · f38478b2
      Iustin Pop authored
      Currently the way we shutdown or startup disks seems to make DRBD8
      unhappy. Until we rewrite the sequence of (de)activation, allow DRBD to
      connect after a sb1-pri condition with no changes to the data.
      
      Reviewed-by: imsnah
      f38478b2
    • Iustin Pop's avatar
      Fix a disk handling bug triggered by failover · b352ab5b
      Iustin Pop authored
      This leaves an instance's disks configured for the primary node as after
      disk activation we want to start the instance anyway. As such,
      _GatherBlockDevs in backend.py will need the disks configured for the
      primary.
      
      Reviewed-by: imsnah
      b352ab5b
    • Iustin Pop's avatar
      Add DRBD8 class for handling drbd version 8.x · a2cfdea2
      Iustin Pop authored
      This duplicates some code from the DRBDev class, but not very much, and
      it will be expanded with the new functionality available for the 8.x
      version. Currently the code is not accessible outside the module.
      
      This patch introduces a dependency on the pyparsing module.
      
      Reviewed-by: imsnah
      a2cfdea2
    • Iustin Pop's avatar
      Move/rename _IsValidMeta to base drbd class · ae26a287
      Iustin Pop authored
      The DRBDev._IsValidMeta only checks for the metadata device size. Since
      this is a useful check (but not complete) for DRBD8, move it to the base
      class and name it _CheckMetaSize.
      
      Reviewed-by: imsnah
      ae26a287
    • Iustin Pop's avatar
      More abstractions from DRBD7 to base class · 5a47ad20
      Iustin Pop authored
      This moves the _SetFromMinor and _MassageProcData to the base class.
      
      Reviewed-by: imsnah
      5a47ad20
    • Iustin Pop's avatar
      Improve out-of-minors handling · 0caf6485
      Iustin Pop authored
      Currently, the out-of-minors handling is not very good: though both MD
      and DRBD functions for finding an unused minor can return None, only the
      DRBD code checks for this case.
      
      This patch improves this by making the functions _FindUnusedMinor raise
      an error instead of None, and gets rid of the one manual check for the
      return value.
      
      Reviewed-by: imsnah
      0caf6485
Loading