1. 11 Jan, 2008 1 commit
  2. 08 Jan, 2008 4 commits
  3. 07 Jan, 2008 1 commit
    • Iustin Pop's avatar
      Improve verify-disks: broken/missing LV detection · b63ed789
      Iustin Pop authored
      This patch improves the ‘gnt-cluster verify-disks’ command by adding
      support for detecting broken volume groups and missing logical volume
      names.
      
      As such, we don't try anymore to activate disks for instances that are
      not likely to succeed anyway, and instead report them.
      
      Reviewed-by: schreiberal
      b63ed789
  4. 27 Dec, 2007 1 commit
  5. 20 Dec, 2007 1 commit
  6. 18 Dec, 2007 3 commits
    • Alexander Schreiber's avatar
      Internal API change for instance console access. · 30989e69
      Alexander Schreiber authored
      Change the internal hypervisor API for GetShellCommandForConsole, we
      now call it with the instance instead of just the instance name.
      
      This is a prep patch for HVM, since HVM needs more than just the instance
      name to determine a way of console access.
      
      (this is a resend due to mail adress tyop)
      
      Reviewed-by: iustinp
      
      30989e69
    • Alexander Schreiber's avatar
      cleanup for hypervisor constants · 2584d4a4
      Alexander Schreiber authored
      Move constant definitions for hypervisor into constants.py
      
      Reviewed-by: ultrotter
      
      2584d4a4
    • Guido Trotter's avatar
      Specify hint as a named argument · 79caa9ed
      Guido Trotter authored
      hint is declared as a named argument for the LogWarning function. Make its
      caller pass it naming it.
      
      Reviewed-by: iustinp
      79caa9ed
  7. 17 Dec, 2007 1 commit
  8. 12 Dec, 2007 1 commit
    • Iustin Pop's avatar
      Add LUVerifyDisks · 2c95a8d4
      Iustin Pop authored
      This patch adds a new LUVerifyDisks that implements the OpVerifyDisks.
      The algorithm is that by determining not-used logical volumes for
      instances that are supposed to be running, we presume from there that
      the DRBD devices are not online and therefore one should
      ‘activate-disks’ for those instances.
      
      Reviewed-by: imsnah
      2c95a8d4
  9. 03 Dec, 2007 1 commit
  10. 27 Nov, 2007 1 commit
  11. 26 Nov, 2007 1 commit
    • Iustin Pop's avatar
      Split the change of peer in secondary replace in two operations · 642445d9
      Iustin Pop authored
      This patch splits the single operation of replace peer into two distinct
      phases, in order to make a single change to the instance configuration:
        - detach from network
        - if at least one drbd device succeeded, make one change to the
          instance, pointing all disks to the new peer
        - attach to the new peer
      
      This should eliminate the case when a failure in the second reattach can
      leave the instance with two secondaries.
      
      Reviewed-by: imsnah
      642445d9
  12. 21 Nov, 2007 1 commit
  13. 16 Nov, 2007 2 commits
  14. 12 Nov, 2007 2 commits
    • Michael Hanselmann's avatar
      Fix functions for /etc/hosts. · 9440aeab
      Michael Hanselmann authored
      - Combine hostname and aliases on one line
      - Fix bug with wrongfully removed newline characters
      - Use wrapper for SetEtcHostsEntry in cmdlib
      
      Reviewed-by: iustin
      9440aeab
    • Iustin Pop's avatar
      Relax replace_disks_all meaning for drbd8 · 7df43a76
      Iustin Pop authored
      In order to make the replace secondary action to be done via the same
      opcode parameters for both remote_raid1 and drbd, we must allow the
      LUReplaceDisks to change replace_disks_all for drbd with non-empty
      remote_node into replace_disks_sec.
      
      This fixes gnt-node evacuate and also allows gnt-instace replace-disks
      to have the same syntax for both remote_raid1 and drbd (when replacing
      the secondary).
      
      Reviewed-by: ultrotter
      7df43a76
  15. 09 Nov, 2007 1 commit
  16. 08 Nov, 2007 1 commit
    • Iustin Pop's avatar
      Changes related to logging · 5bfac263
      Iustin Pop authored
      This patch modifes:
        - mcpu.Processor.LogWarning to have its 'hint' parameter as optional
          and only log it if not None
        - cmdlib._WaitForSync to not log directly to stdout/stderr but via the
          proc.Log(Info|Warning) methods
        - the LU attribute 'processor' is renamed to 'proc' to shorten the
          name
      
      Reviewed-by: imsnah
      5bfac263
  17. 07 Nov, 2007 2 commits
    • Iustin Pop's avatar
      Enhance secondary node replace for drbd8 · 0834c866
      Iustin Pop authored
      This (big) patch does two things:
        - add "local disk status" to the block device checks
          (BlockDevice.GetSyncStatus and the rpc calls that call this
          function, and therefore cmdlib._CheckDiskConsistency)
        - improve the drbd8 secondary replace operation using the above
          functionality
      
      The "local disk status" adds a new variable to the result of
      GetSyncStatus that shows the degradation of the local storage of the
      device. Of course, not all device support this - for now, we only modify
      LogicalVolumes and DRBD8 to return degraded in some cases, other devices
      always return non-degraded. This variable should be a subset of
      is_degraded - whenever this variable is true, the is_degraded should
      also be true.
      
      The drbd8 secondary replace uses this variable as we don't care if the
      primary drbd device is network-degraded, only if it has good local disk
      data (ldisk is False).
      
      The patch also increases the protocol version (due to rpc changes).
      
      Reviewed-by: imsnah
      0834c866
    • Michael Hanselmann's avatar
      Check whether init.d script is executable. · 7dd30006
      Michael Hanselmann authored
      Reviewed-by: schreiberal
      7dd30006
  18. 06 Nov, 2007 1 commit
  19. 05 Nov, 2007 3 commits
    • Iustin Pop's avatar
      Handle missing init script at cluster init · c7b46d59
      Iustin Pop authored
      This patch adds a check in the prereq of LUInitCluster for the existence
      of the init script.  This allows a clean abort instead of a stack dump.
      
      Based on a report by admin@steibei.net
      
      Reviewed-by: ultrotter
      c7b46d59
    • Iustin Pop's avatar
      Miscellaneous style fixes · 65fe4693
      Iustin Pop authored
      This patch fixes some minor pylint warnings (unused variables, wrong
      indentation, etc.) and a real bug in the recovery for drbd8 rename
      procedure.
      
      Reviewed-by: imsnah
      65fe4693
    • Guido Trotter's avatar
      Convert os_get to use OS rather than InvalidOS · dfa96ded
      Guido Trotter authored
      In order to do this for simplicity we leave the OSFromDisk function as-is and
      we convert the eventual exception to an OS object in ganeti-noded. The
      unmangling gets simplified and so does the code for checking whether the OS is
      valid.
      
      Reviewed-By: iustinp
      
      dfa96ded
  20. 04 Nov, 2007 1 commit
    • Guido Trotter's avatar
      Make call_os_get a single node function · 00fe9e38
      Guido Trotter authored
      call_os_get is never called with a real list of nodes, so there's no point in
      it being multi-node. Making it single-node till a usage for multi-node call is
      found.
      
      Reviewed-By: iustinp
      00fe9e38
  21. 03 Nov, 2007 1 commit
    • Iustin Pop's avatar
      Implement tag searching · 73415719
      Iustin Pop authored
      This patch adds a search command for locating tags on all objects of the
      cluster using a regex pattern.
      
      Reviewed-by: aat
      73415719
  22. 02 Nov, 2007 1 commit
    • 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
  23. 31 Oct, 2007 2 commits
    • 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
  24. 30 Oct, 2007 1 commit
  25. 29 Oct, 2007 2 commits
    • Iustin Pop's avatar
      Change the signature of some methods of mcpu.Processor · 1a8c0ce1
      Iustin Pop authored
      This patch moves the passing of the feedback_fn argument from the
      (Exec|Chain)OpCode to the initialization of the Processor instance.
      
      Reviewed-by: imsnah
      1a8c0ce1
    • Iustin Pop's avatar
      Implement replace-disks for drbd8 devices · a9e0c397
      Iustin Pop authored
      This patch adds three modes of disk replacement for drbd8:
        - replace the disk on the primary node
        - replace the disk on the secondary node
        - replace the secondary node
      
      It also adds some debugging code to backend.py and increments the
      protocol version for the recent changes of the rpc layer.
      
      Reviewed-by: imsnah
      a9e0c397
  26. 25 Oct, 2007 1 commit
    • 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
  27. 24 Oct, 2007 2 commits
    • 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
      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