Skip to content
Snippets Groups Projects
  1. Oct 29, 2007
  2. 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
  3. Oct 26, 2007
  4. 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
  5. 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
    • Iustin Pop's avatar
      Move some methods from DRBDev to BaseDRBD · 770fe0f9
      Iustin Pop authored
      Since some of the methods and constants are valid for both 0.7 and 8.x
      versions, we move them to the base class.
      
      Reviewed-by: imsnah
      770fe0f9
  6. Oct 19, 2007
    • Iustin Pop's avatar
      Some tiny style fixes · aa4260ca
      Iustin Pop authored
      Reviewed-by: imsnah
      aa4260ca
    • Iustin Pop's avatar
      Split some DRBD functionality based on versions · 0f7f32d9
      Iustin Pop authored
      This is a small split of some functionality from the DRBDev class into a
      base drbd class that holds just a few things, in order to make migration
      to drbd 8.x easier.
      
      Reviewed-by: imsnah
      0f7f32d9
    • Iustin Pop's avatar
      Abstract more strings values into constants · fe96220b
      Iustin Pop authored
      Currently, the disk types are defined using constants in the code.
      Convert those into constants so that we can easily find them and check
      their usage.
      
      Note that we don't rename the values of the constants as they are used
      in the configuration file, and as such it's best to leave them as they
      are.
      
      Reviewed-by: imsnah
      fe96220b
  7. Oct 18, 2007
    • Michael Hanselmann's avatar
      Implement disk failure QA test. · e8ae0c20
      Michael Hanselmann authored
      Testing failure on the primary node is currently disabled due to drbd problems.
      
      Reviewed-by: iustinp
      
      e8ae0c20
    • Alexander Schreiber's avatar
      Patch series for reboot feature, part 3 · 579d4337
      Alexander Schreiber authored
      This patch series implements the reboot command for gnt-instance. It
      supports three types of reboot: soft (hypervisor reboot), hard (instance
      config rebuild and reboot) and full (full instance shutdown and startup
      again).
      
      This patch contains the gnt-instance script and the man page for it.
      
      Reviewed-by: iustinp
      
      579d4337
    • Alexander Schreiber's avatar
      Patch series for reboot feature, part 2 · bf6929a2
      Alexander Schreiber authored
      This patch series implements the reboot command for gnt-instance. It
      supports three types of reboot: soft (hypervisor reboot), hard (instance
      config rebuild and reboot) and full (full instance shutdown and startup
      again).
      
      This patch contains the opcode and lu part.
      
      Reviewed-by: iustinp
      
      bf6929a2
  8. Oct 17, 2007
  9. Oct 16, 2007
  10. Oct 15, 2007
  11. Oct 12, 2007
    • Michael Hanselmann's avatar
      Small wording changes and fix checks. · d7e49c13
      Michael Hanselmann authored
      Reviewed-by: iustinp
      
      d7e49c13
    • Iustin Pop's avatar
      Remove some hardcoded names/paths from backend.py · 7900ed01
      Iustin Pop authored
      This patch does the following:
        - add constants.GANETI_RUNAS = "root", which is used to compute
          the homedir (and thus the .ssh directory) instead of hardcoding
          "/root/.ssh" in backend.AddNode and backend.LeaveCluster
        - add constants.SSH_CONFIG_DIR (currently hardcoded to /etc/ssh) that
          is used in backend instead of hardcoding it (preparation for
          selecting that at ./configure time)
        - some more internal cleanup in backend.AddNode
      
      Reviewed-by: imsnah
      7900ed01
    • Michael Hanselmann's avatar
      Test “gnt-node evacuate” and “gnt-node failover” in QA. · 4b62db14
      Michael Hanselmann authored
      Reviewed-by: schreiberal
      
      4b62db14
    • Iustin Pop's avatar
      Add a generic write file function · 087b34fe
      Iustin Pop authored
      Currently there are a few version of "write a file safely" in the code.
      This patch adds a generic function that should be able to replace all
      the other versions.
      
      The "take attributes from the target file" option, while useful, is not
      implemented by this patch.
      
      Reviewed-by: imsnah,ultrotter
      087b34fe
    • Iustin Pop's avatar
      Do not walk the whole DATA_DIR on node leave · 71eca7c3
      Iustin Pop authored
      Since we remove only files from DATA_DIR and not from subdirectories,
      let's not walk the entire tree, a simple listdir suffices. Also switch
      to utils.RemoveFile from simple os.unlink.
      
      Reviewed-by: imsnah
      71eca7c3
    • Iustin Pop's avatar
      Enhance GetHomeDir to accept either names or UIDs · 257f4c0a
      Iustin Pop authored
      Currently GetHomeDir accepts UIDs only. Enhance it to accept either a
      user name or a user id, to allow for nicer usage.
      
      Reviewed-by: imsnah
      257f4c0a
    • Guido Trotter's avatar
      Reorder gnt-os simplify _GetAllOS and call it _DiagnoseByOS · fbdb07b9
      Guido Trotter authored
      Put some order in gnt-os putting helper functions above and command functions
      below. Also add a new _DiagnoseOSName() function and use it to make _GetAllOS
      simplier to understand. Change its name to _DiagnoseByOS which makes more clear
      what it does.
      
      
      
      Reviewed-by: iustinp
      
      fbdb07b9
    • Guido Trotter's avatar
      Fix ListOS which was broken · 216fe2f3
      Guido Trotter authored
      To do this we abstract the creation of the all_os dictionary, which was
      produced in DiagnoseOS and use it both for listing and diagnosing.
      
      
      Reviewed-by: iustinp
      
      216fe2f3
  12. Oct 11, 2007
    • Iustin Pop's avatar
      Some small improvements to the hooks environment · 0e137c28
      Iustin Pop authored
      For the configuration update hook, it's useful to have a consistent name
      for the target of the operation. As such, the LU code is modified to
      include an GANETI_OP_TARGET that points either to the cluster (name),
      node name or instance name depending on the opcode.
      
      Also, the NoHooksLU is modified such that its build env method returns
      an empty (but conformant) result. This should improve things in case by
      mistake this class' BuildHooksEnv is called.
      
      Reviewed-by: imsnah
      0e137c28
    • Iustin Pop's avatar
      Implement post-configuration-update hook · 6a4aa7c1
      Iustin Pop authored
      This patch adds a special hook: the post-configuration update hook. This
      hook has only a post phase that runs after a top-level LU that modified
      the configuration.
      
      Since the hook is a post-phase one, no error checking is done on the
      results. The hook runs only on the master.
      
      Reviewed-by: imsnah
      6a4aa7c1
Loading