Skip to content
Snippets Groups Projects
  1. Oct 11, 2012
  2. Oct 05, 2012
  3. Oct 03, 2012
  4. Sep 27, 2012
  5. Sep 12, 2012
  6. Sep 04, 2012
  7. Sep 03, 2012
    • 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>
      8ad0da1e
    • Iustin Pop's avatar
      Fix decorator uses which crash newer pylint · fc3f75dd
      Iustin Pop authored
      
      Pylint version:
      
        pylint 0.25.1,
        astng 0.23.1, common 0.58.0
      
      crashes when passing the fully-qualified decorator name with:
      
        File "/usr/lib/pymodules/python2.7/pylint/checkers/base.py", line 161, in visit_function
          if not redefined_by_decorator(node):
        File "/usr/lib/pymodules/python2.7/pylint/checkers/base.py", line 116, in redefined_by_decorator
          decorator.expr.name == node.name):
      AttributeError: 'Getattr' object has no attribute 'name'
      
      I found out that simply using a shortened name will 'fix' this issue,
      so let's do this to allow running newer pylint versions.
      
      Signed-off-by: default avatarIustin Pop <iustin@google.com>
      Reviewed-by: default avatarMichael Hanselmann <hansmi@google.com>
      fc3f75dd
  8. Aug 22, 2012
    • 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>
      6a3166cb
  9. Aug 15, 2012
    • 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
      diagnose:
      
      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
      continue.
      
      Signed-off-by: default avatarIustin Pop <iustin@google.com>
      Reviewed-by: default avatarRené Nussbaumer <rn@google.com>
      f08e5132
  10. Aug 10, 2012
  11. Jul 27, 2012
  12. Jul 26, 2012
    • 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
        node
      - 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>
      350506c6
    • 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>
      4bf27dab
  13. Jul 24, 2012
    • Iustin Pop's avatar
      Fix boot=on flag for CDROMs · 24be50e0
      Iustin Pop authored
      
      This generalises commit 4304964a to cdroms too, since they have
      somewhat the same logic. We just abstract the needs_boot_flag into a
      separate variable, and then reuse it in the cdrom section.
      
      Note that the logic of what 'if=' type to pass to KVM was very
      convoluted, and (I think) incorrect; I went and cleaned it to be more
      consistent.
      
      Signed-off-by: default avatarIustin Pop <iustin@google.com>
      Reviewed-by: default avatarGuido Trotter <ultrotter@google.com>
      24be50e0
    • Iustin Pop's avatar
      KVM: only pass boot flag once · 2b846304
      Iustin Pop authored
      
      This addresses issue 230: passing two methods of booting to KVM can,
      depending on the KVM version, confuse it.
      
      Note that commit 4304964a introduced a partial fix for this (but only
      for disks, and keyed on KVM versions). However, it didn't fix cdrom
      booting, which still fails with the same error, so let's fix it more
      generically; we still leave the per-disk check since that is about
      -boot c versus -drive …,boot=on rather than two boot methods.
      
      Patch is based on the one submitted by Vladimir Mencl, many thanks!
      
      Signed-off-by: default avatarIustin Pop <iustin@google.com>
      Reviewed-by: default avatarGuido Trotter <ultrotter@google.com>
      2b846304
  14. Jul 19, 2012
  15. Jul 18, 2012
  16. Jul 17, 2012
  17. Jul 13, 2012
  18. Jul 11, 2012
  19. Jul 07, 2012
  20. Jul 06, 2012
  21. Jul 05, 2012
  22. Jun 29, 2012
  23. Jun 28, 2012
  24. Jun 27, 2012
Loading