1. 31 Mar, 2008 1 commit
    • Manuel Franceschini's avatar
      Add lvm-storage check when creating instances · eedc99de
      Manuel Franceschini authored
      This adds a check to fail instance creation if lvm-storage is disabled
      (cluster-wide). If lvm-storage is disabled (by initializing the cluster
      with --no-lvm-storage) only instances with disk template in frozenset
      DTS_NOT_LVM are allowed to create.
      
      Reviewed-by: iustinp
      eedc99de
  2. 30 Mar, 2008 1 commit
    • Iustin Pop's avatar
      Change the order of config updates in some LUs · fe482621
      Iustin Pop authored
      In the start and stop instance LUs, the configuration update is done
      right at the end. This means that if, for example, the instance shutdown
      succeeds, but the drive deactivation fails, the next run of the watcher
      will start the instance again, as it's still marked in running mode.
      
      This patch changes these two LUs so that first the update the
      configuration to the desired state, and only then we proceed to update
      the config. This ensures that the state saved is the desired state.
      
      Because the config might be updated even though the LU failed, this
      patch also modifies the mcpu.Processor.ExecOpCode method to run the
      RunConfigUpdate hook in a finally: phase while the lu.Exec is done in
      its try phase. This ensures that config update hooks (tries to) run at
      all times when the config is updated.
      
      Reviewed-by: schreiberal
      fe482621
  3. 27 Mar, 2008 1 commit
  4. 25 Mar, 2008 2 commits
    • Iustin Pop's avatar
      Remove the option to create md/drbd7 instances · f9193417
      Iustin Pop authored
      This patch removes the options that allow to create local_raid1 or
      remote_raid1 instances. It also modifies the documentation and removes
      these disk templates from burnin and from qa.
      
      Reviewed-by: imsnah
      f9193417
    • Iustin Pop's avatar
      Remove the add/remove mirror operations · 249069a1
      Iustin Pop authored
      These two operations are related to md/drbd7 code (remote_raid1). Remove
      them as part of the md/drbd7 removal.
      
      Reviewed-by: imsnah
      249069a1
  5. 20 Mar, 2008 1 commit
    • Manuel Franceschini's avatar
      Modify cluster-init to create file-storage-dir · 2872a949
      Manuel Franceschini authored
      This patch adds three things:
      - it normalizes the file storage directory path passed to gnt-cluster init
      - if the file-storage-path doesn't exist on the master node, ganeti
        tries to create it
      - adds additional check if the passed file-storage-dir is not a directory
      
      Reviewed-by: iustinp
      2872a949
  6. 19 Mar, 2008 1 commit
  7. 18 Mar, 2008 4 commits
  8. 11 Mar, 2008 2 commits
    • Iustin Pop's avatar
      Disable cluster init with a reachable IP · 411f8ad0
      Iustin Pop authored
      Make the cluster init fail if the IP to which the cluster name resolved
      is already reachable by the master node. This is not a foolproof
      solution, but it allows a cheap method of detecting simple mistakes.
      
      It will also disallow using the master node name as cluster name (which
      is something good).
      
      The only drawbacks that I see are:
        - you are not allowed to do this, which might come in handy in cluster
          upgrades; but since we support rename, this is mitigated
        - cluster init takes longer now (+the timeout value, set to 5
          seconds), but since this is a one-off operation, it should be ok
      
      Reviewed-by: ultrotter
      411f8ad0
    • Iustin Pop's avatar
      Modify utils.TcpPing to make source address optional · b15d625f
      Iustin Pop authored
      This patch modifies TcpPing and its callers to make the source address
      selection optional. Usually, the kernel will know better what
      source address to use, just in some cases we want to enforce a given
      source address so it makes sense to make this optional.
      
      Reviewed-by: ultrotter
      b15d625f
  9. 05 Mar, 2008 1 commit
  10. 29 Feb, 2008 2 commits
    • Iustin Pop's avatar
      Fix master role stop on cluster destroy · c9064964
      Iustin Pop authored
      Currently the cluster destroy doesn't remove the master role, which
      means that the IP address of the cluster remains assigned to the master
      node.
      
      This patch fixes this and also a docstring in backend.StopMaster().
      
      Reviewed-by: imsnah
      c9064964
    • Iustin Pop's avatar
      Fix cluster rename operation · 488b540d
      Iustin Pop authored
      This one-liner fixes the cluster rename operation. As a side note, we
      should have a QA test for this too.
      
      Reviewed-by: imsnah
      488b540d
  11. 28 Feb, 2008 1 commit
    • Guido Trotter's avatar
      Don't allow renaming to an existing instance · 7bde3275
      Guido Trotter authored
      Even if the target instance is down or we are not checking for IP conflicts
      changing an instance name to a new one which is already in the cluster is
      doomed to fail, because in a lot of places (among which figures the mind of
      most users/admins) instance names are assumed to be unique.
      
      Reviewed-by: imsnah
      7bde3275
  12. 27 Feb, 2008 1 commit
  13. 25 Feb, 2008 1 commit
  14. 22 Feb, 2008 1 commit
  15. 16 Feb, 2008 1 commit
    • Guido Trotter's avatar
      Fix gnt-instance info i1 i2 ... · 515207af
      Guido Trotter authored
      Due to an indentation error only the last instance queried got returned by
      LUQueryInstanceData. Moving the append() call inside the for cycle to fix this
      issue.
      
      This is a one-liner targeted at 1.2.3
      
      Reviewed-by: iustinp
      515207af
  16. 15 Feb, 2008 1 commit
  17. 14 Feb, 2008 1 commit
    • Iustin Pop's avatar
      Modify the default output of gnt-instance list · d8052456
      Iustin Pop authored
      This patch adds a new field available for selection in gnt-instance list
      names "status" which represents the combined value of "admin_state" and
      "oper_state". Since this is much easier to parse (e.g. gnt-instance list
      |grep ERROR), we also modify the default field list to use this instead
      of the admin/oper state fields.
      
      Reviewed-by: imsnah
      d8052456
  18. 05 Feb, 2008 2 commits
    • Iustin Pop's avatar
      Add a test opcode that sleeps for a given duration · 06009e27
      Iustin Pop authored
      This can be used for testing purposes.
      
      Reviewed-by: ultrotter,imsnah
      06009e27
    • Iustin Pop's avatar
      Reduce the chance of DRBD errors with stale primaries · fdbd668d
      Iustin Pop authored
      This patch is a first step in reducing the chance of causing DRBD
      activation failures when the primary node has not-perfect data.
      
      This issue is more seen with DRBD8, which has an 'outdate' state (in
      which it can get more often). But it can (and before this patch, usually
      will) happen with both 7 and 8 in the case the primary has data to sync.
      
      The error comes from the fact that, before this patch, we activate the
      primary DRBD device and immediately (i.e. as soon as we can run another
      shell command) we try to make it primary. This might fail - since the
      primary knows it has some data to catch up to - but we ignored this
      error condition. The failure was visible later, in either md failing to
      activate over a read-only storage or by instance failing to start.
      
      The patch has two parts: one affecting bdev.py, which changes failures
      in BlockDev.Open() from returning False to raising
      errors.BlockDeviceError; noone (except a generic method inside bdev.py)
      checked this return value and we logged it but the master didn't know
      about it; now all classes raise errors from Open if they have a failure.
      
      The other part, affecting cmdlib.py, changes the activation sequence
      from:
        - activate on primary node as primary and secondary as secondary, in
          whatever order a function returns the nodes
      to the following:
        - activate all drives as secondaries, on both the primary and the
          secondary nodes of the instance
        - after that, on the primary node, re-activate the device stack as
          primary
      
      This is in order to give the chance to DRBD to connect and make the
      handshake. As noted in the comments, this just increases the chances of
      a handshake/connect, not fixing entirely the problem. However, it is a
      good first step and it passes all tests of starting with stale (either
      full or partial) primaries, with both drbd 7 and 8, and also passes a
      burnin.
      
      Note that the patch might make the device activation a little bit
      slower, but it is a reasonable trade-off.
      
      Reviewed-by: imsnah
      fdbd668d
  19. 04 Feb, 2008 2 commits
  20. 31 Jan, 2008 1 commit
  21. 28 Jan, 2008 2 commits
  22. 20 Jan, 2008 2 commits
    • Iustin Pop's avatar
      Fix checking of node free disk in CreateInstance · 8d75db10
      Iustin Pop authored
      This patch does two things:
        - checks that the result values from call_node_info are valid integer
          values and aborts otherwise
        - skips disk space computation for the DT_DISKLESS case
      
      The most important point of the patch is the verification of results
      from the rpc call, as it prepares for a patch that allows failures to be
      better reported from the remote node.
      
      Reviewed-by: ultrotter
      8d75db10
    • Iustin Pop's avatar
      Abstract node memory checking into a separate function · d4f16fd9
      Iustin Pop authored
      The checking of a node's free memory (via rpc.call_node_info) is done in
      both start instance an failover. This patch abstracts this call,
      together with the appropriate error handling, into a separate function
      called _CheckNodeFreeMemory.
      
      The patch also has some related changes:
        - the check is done in prereq and not in exec for start instance
        - the redundant check in exec for failover has been removed
      
      Reviewed-by: ultrotter
      d4f16fd9
  23. 16 Jan, 2008 1 commit
  24. 14 Jan, 2008 2 commits
    • Iustin Pop's avatar
      Fix some misspellings · ba4b62cf
      Iustin Pop authored
      This patch fixes two name typos and a style issue (which makes pylint
      complain).
      
      Reviewed-by: ultrotter
      ba4b62cf
    • Guido Trotter's avatar
      Fix CreateInstance new optional parameters · 40ed12dd
      Guido Trotter authored
      Some new paramenters of the CreateInstance opcode are optional (namely
      kernel_path, initrd_path and hvm_boot_order) but their absence makes the code
      crash. Fix this by initializing them to a default value if they're not present.
      
      Reviewed-by: iustinp
      40ed12dd
  25. 11 Jan, 2008 1 commit
  26. 08 Jan, 2008 4 commits