Skip to content
Snippets Groups Projects
  1. Nov 07, 2012
    • Iustin Pop's avatar
      Fix compatibility with newer Haskell libraries · 1251817b
      Iustin Pop authored
      
      This small patch fixes compatibility with a few newer Haskell libraries:
      
      - base 4.6, included with ghc 7.6, removed the deprecated 'catch'
        function from Prelude, so our "import Prelude hiding (catch)" is now
        an error; we workaround by using fully-qualified
        Control.Exception.catch name
      
      - containers 0.5 changed the signature of 'deleteFindMax'; we
        workaround by using separate 'findMax' and 'deleteMax'
      
      - QuickCheck 2.5 removed the 'maxDiscards' test parameter, replacing
        it with a much better 'maxDiscardsRatio'; however, until we can
        depend on that, we workaround by just removing it (we don't control
        anymore the maxDiscards, instead leaving it default; for our default
        test size, this is no change, as the default value is already 500,
        which is our default as well) and not printing it anymore
      
      Tested on Squeeze (+extra libs), Wheezy and experimental, which covers
      all supported GHC versions.
      
      Also, merging this in master will be a pain, but unless we want to
      stop supporting 2.6…
      
      Signed-off-by: default avatarIustin Pop <iustin@google.com>
      Reviewed-by: default avatarGuido Trotter <ultrotter@google.com>
      1251817b
  2. Nov 06, 2012
  3. Nov 01, 2012
  4. Oct 30, 2012
  5. Oct 29, 2012
  6. Oct 26, 2012
  7. Oct 25, 2012
  8. Oct 19, 2012
    • 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.
      
      Tested:
      
      - 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>
      ba147ff8
  9. Oct 17, 2012
  10. Oct 12, 2012
  11. Oct 11, 2012
  12. Oct 10, 2012
  13. Oct 05, 2012
  14. Oct 03, 2012
  15. Oct 01, 2012
  16. Sep 27, 2012
  17. Sep 12, 2012
  18. Sep 07, 2012
    • Iustin Pop's avatar
      Fix bug in non-mirrored instance allocation · 14b5d45f
      Iustin Pop authored
      
      The function `allocateOnSingle' has a bug in the calculation of the
      cluster score used for deciding which of the many target nodes to use
      in placing the instance: it uses the original node list for the score
      calculation.
      
      Due to this, since the original node list is the same for all target
      nodes, it means that basically `allocateOnSingle' returns the same
      score, no matter the target node, and hence the choosing of the node
      is arbitrary, instead of being done on the basis of the algorithm.
      
      This has gone uncaught until reported because the unittests only test
      1 allocation at a time on an empty cluster, and do not check the
      consistency of the score. I'll send separate patches on the master
      branch for adding more checks to prevent this in the future.
      
      Signed-off-by: default avatarIustin Pop <iustin@google.com>
      Reviewed-by: default avatarAgata Murawska <agatamurawska@google.com>
      14b5d45f
  19. Sep 04, 2012
  20. 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
Loading