1. 30 Oct, 2012 1 commit
  2. 19 Oct, 2012 1 commit
    • Iustin Pop's avatar
      Fix disk adoption interaction with ipolicy checks · ba147ff8
      Iustin Pop authored
      In Ganeti 2.6, disk adoption is broken due to the ipolicy checks being
      done before we read volume size from remote nodes. We fix this by
      simply moving these checks to after the disk adoption code which
      updates the disk size; it's not that nice that we fail a (almost)
      config-level check after we've reserved the LVs, etc., but we need to
      do so in order to validate the ipolicy correctly.
      - normal instance creation
      - creation via adoption with good size (pass)
      - creation via adoption with wrong LV size (fail as expected)
      - QA in progress
      Signed-off-by: default avatarIustin Pop <iustin@google.com>
      Reviewed-by: default avatarMichael Hanselmann <hansmi@google.com>
  3. 03 Oct, 2012 2 commits
  4. 27 Sep, 2012 1 commit
  5. 12 Sep, 2012 1 commit
  6. 04 Sep, 2012 1 commit
  7. 03 Sep, 2012 1 commit
    • Iustin Pop's avatar
      Fix warnings/errors with newer pylint · 8ad0da1e
      Iustin Pop authored
      To help developing Ganeti on newer distributions, let's try to fix
      pylint warnings/errors. I'm using pylint from current Debian wheezy:
      pylint 0.25.1, astng 0.23.1, common 0.58.0, and we have 3 things that
      needs fixing.
      First, a really wide "except", with the silencing in the wrong
      place. I'm not sure why this doesn't have "except Exception", so let's
      add it. However, pylint still complains about "Catching too general
      exception", even though we do want to catch both system and our
      exception, so let's add a silence for W0703. It's true that we
      shouldn't catch KeyboardInterrupt and friends, but that should be
      cleaned up on the master branch.
      Second, pylint complains about "redefining name builtin tuple",
      because we do some pattern matching in the except blocks in
      netutils. This seems to be a false positive, but let's clean the code
      around this.
      And finally, type inference again goes bad, so let's silence E1103
      with its "boolean doesn't have 'get' method".
      After this, I can run "make lint", and by extension "make
      commit-check" on Debian Wheezy, yay! We might be able to bump our
      required pylint versions to something not ancient…
      Signed-off-by: default avatarIustin Pop <iustin@google.com>
      Reviewed-by: default avatarMichael Hanselmann <hansmi@google.com>
  8. 22 Aug, 2012 1 commit
    • Constantinos Venetsanopoulos's avatar
      Fix computation of disk sizes in _ComputeDiskSize · 6a3166cb
      Constantinos Venetsanopoulos authored
      Currently, hail fails with FailDisk when trying to add an instance
      of type: 'file', 'sharedfile' and 'rbd'.
      This is due to a "0" or None value in the corresponding dict inside
      _ComputeDiskSize, which results in a "O" or non Int value of the
      exported 'disk_space_total' parameter. This in turn makes hail fail,
      when trying to process the value:
       - with "Unable to read Int" if value is None (file)
       - with FailDisk if value is 0 (sharedfile, rbd)
      The latter happens because the 0 value doesn't match the instance's
      IPolicy, since it is lower than the minimum disk size.
      The second problem still exists when using adoption with 'plain'
      and 'blockdev' template and will be addressed in another commit.
      Signed-off-by: default avatarConstantinos Venetsanopoulos <cven@grnet.gr>
      Signed-off-by: default avatarIustin Pop <iustin@google.com>
      Reviewed-by: default avatarIustin Pop <iustin@google.com>
  9. 15 Aug, 2012 1 commit
    • Iustin Pop's avatar
      Add verification of RPC results in _WipeDisks · f08e5132
      Iustin Pop authored
      Due to an oversight, the pause/resume sync RPC calls in _WipeDisks
      lack the verification of the overall RPC status, and directly iterate
      over the payload. The code actually doing the wipe does verify
      correctly the results. This can result in jobs failing with a hard to
      OpExecError ['NoneType' object is not iterable]
      instead of proper "RPC failed" message.
      This patch adds a hard check on the pause call, but for the resume
      call it just logs a warning if the RPC failed; the rationale being
      that if we can't contact the node for pausing the sync, it's likely
      wiping will fail too, but after the wipe has been done, we can
      Signed-off-by: default avatarIustin Pop <iustin@google.com>
      Reviewed-by: default avatarRené Nussbaumer <rn@google.com>
  10. 26 Jul, 2012 2 commits
    • Iustin Pop's avatar
      Fix issue in LUClusterVerifyGroup with multi-group clusters · 350506c6
      Iustin Pop authored
      In case LUClusterVerifyGroup is run on a group which doesn't contain
      the master node, the following could happen:
      - master node is selected due to the explicit check
      - if the order of nodes in the 'absent_nodes' list is such that the
        master node is the first in it, then we'll select (again) the master
      - passing duplicate nodes to RPC calls will break due to RPC
        internals; this should be fixed separately, but in the meantime we
        just refrain from passing such duplicates
      This patch should not change the semantics of the code, since it
      wasn't guaranteed even before that we find a vm_capable node.
      Signed-off-by: default avatarIustin Pop <iustin@google.com>
      Reviewed-by: default avatarBernardo Dal Seno <bdalseno@google.com>
    • Iustin Pop's avatar
      Fix node group modification of node parameters · 4bf27dab
      Iustin Pop authored
      Commit 904b3bfe
       tried to fix the deletion of custom ndparams from
      group, but instead broke both modification and deletion: because we
      run ForceDictType on self.op.ndparams instead of the updated
      new_ndparams, we can neither delete nor set properly spindle_count
      (since it won't be coerced to int).
      Signed-off-by: default avatarIustin Pop <iustin@google.com>
      Reviewed-by: default avatarGuido Trotter <ultrotter@google.com>
  11. 19 Jul, 2012 1 commit
    • René Nussbaumer's avatar
      Fix setting ipolicy on node groups · 8b057218
      René Nussbaumer authored
      On node groups we don't have the std field. However, the InstancePolicy
      object always verifies that the std value is within a given range. As we
      fill it up with defaults if not set (as it happens to be on node groups)
      and the min value is higher than the default std value (taken from
      constants.py) we fail.
      We overcome this situation by simply let the function know if we want to
      verify the std value at all. If we don't want to verify std, we just set
      it to a compliant value (min_v) and continue.
      We also slightly adapt the error message provided, as we don't have std
      values on groups.
      Signed-off-by: default avatarRené Nussbaumer <rn@google.com>
      Reviewed-by: default avatarIustin Pop <iustin@google.com>
  12. 13 Jul, 2012 1 commit
  13. 11 Jul, 2012 1 commit
  14. 07 Jul, 2012 1 commit
  15. 05 Jul, 2012 2 commits
  16. 27 Jun, 2012 4 commits
  17. 20 Jun, 2012 1 commit
    • Iustin Pop's avatar
      Fix bug in instance net changes · 80b898f9
      Iustin Pop authored
      _PrepareNicModification returns the invalid type, which triggers an
      assert resulting in a mysterious error:
      Failure: command execution error:
      Without any explanation. We fix this by removing the return value from
      _PrepareNicModification, and instead returning the expected type
      (since it differs per create/modification) from the (existing)
      wrappers for this function. We don't need to return actual changes
      from this function as _ApplyNicMods is the function that
      computes/returns the formatted changes.
      Signed-off-by: default avatarIustin Pop <iustin@google.com>
      Signed-off-by: default avatarRené Nussbaumer <rn@google.com>
      Reviewed-by: default avatarMichael Hanselmann <hansmi@google.com>
  18. 15 Jun, 2012 1 commit
  19. 14 Jun, 2012 1 commit
  20. 08 Jun, 2012 1 commit
  21. 01 Jun, 2012 1 commit
    • Iustin Pop's avatar
      Fix a type issue and bad logic in cluster verification · e375fb61
      Iustin Pop authored
      Commit 2e04d454
       introduced the new offline state for the instance
      state, but being a big monolithic patch it sneaked in something that
      doesn't make sense.
      The checks for extra instances (either wrongly up or just unknown) are
      done purely on a name-basis, not on objects, so the types there are
      wrong. Furthermore, they have no relation to the admin state of the
      instance, so we just drop the entire if block. We keep the increment
      of the offline instance count, but move it to a different loop over
      Signed-off-by: default avatarIustin Pop <iustin@google.com>
      Reviewed-by: default avatarMichael Hanselmann <hansmi@google.com>
  22. 22 May, 2012 2 commits
  23. 15 May, 2012 3 commits
  24. 14 May, 2012 3 commits
  25. 11 May, 2012 2 commits
  26. 10 May, 2012 3 commits