Skip to content
Snippets Groups Projects
  1. Dec 19, 2012
    • Guido Trotter's avatar
      Fix QA for --offline semantics modification · 1ba25bad
      Guido Trotter authored
      
      The previous patch series made it simpler to deal with ERROR_up offline
      instances, but didn't fix qa, that had the old expectations. This fixes
      that, and adds more testing about the expected behavior.
      
      Signed-off-by: default avatarGuido Trotter <ultrotter@google.com>
      Reviewed-by: default avatarIustin Pop <iustin@google.com>
      1ba25bad
    • Michael Hanselmann's avatar
      Replace frozenset with compat.UniqueFrozenset · b8028dcf
      Michael Hanselmann authored
      
      This is not a trivial s/frozenset/compat.UniqueFrozenset/, but rather
      only replaces “frozenset” where appropriate. Most of the places are
      “static” information that doesn't change after the module has been
      loaded.
      
      Some docstrings and code formatting (e.g. empty lines) issues are
      addressed as well. Some lines got too long and were wrapped.
      
      Signed-off-by: default avatarMichael Hanselmann <hansmi@google.com>
      Reviewed-by: default avatarIustin Pop <iustin@google.com>
      b8028dcf
    • Iustin Pop's avatar
      Remove some unused Python code · 45317e3a
      Iustin Pop authored
      
      This patch removes code which is no longer used due to refactoring:
      
      - http.InitSsl, last usage removed in commit 33231500 (“Convert RPC
        client to PycURL”)
      - rapi.baserlib.MakeParamsDict, last usage remove in commit 4e5a68f8
        (“RAPI: rlib1 removal”)
      - rapi.baserlib.ExtractField, last usage removed in commit 028c6b76
        (“RAPI:Fix root list and unittest for it.”)
      - qa.qa_utils.AssertNotEqual, last real usage removed in commit
        2f4b4f78 (“Simplify QA commands”) (but it was still imported for a
        while, until we extended pylint to run over the QA code as well)
      - qlang._IsHostname, added in commit f8638e28 (“Detect globbing
        patterns as query arguments”) but never used
      - cmdlib._BuildNetworkHookEnvByObject, last usage removed in commit
        f22433c0 (“Locking related fixes for networks”)
      - NLD constants, which are obsolete—the nbma project is no longer
        maintained and it's not working with current ganeti
      
      Signed-off-by: default avatarIustin Pop <iustin@google.com>
      Reviewed-by: default avatarMichael Hanselmann <hansmi@google.com>
      45317e3a
  2. Dec 18, 2012
  3. Nov 20, 2012
  4. Oct 19, 2012
  5. Oct 11, 2012
  6. Oct 08, 2012
  7. Oct 05, 2012
  8. Oct 03, 2012
  9. Sep 27, 2012
  10. Sep 18, 2012
  11. Sep 14, 2012
  12. 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
  13. Aug 23, 2012
    • Iustin Pop's avatar
      Bump pep8 version to 1.2 · 5ae4945a
      Iustin Pop authored
      
      Debian Wheezy will ship with this version, and it has many improved checks compared to 0.6, so let's:
      
      - bump version in the docs
      - silence some new checks that are wrong due to our indent=2 instead of 4
      - fix lots of errors in the code where the indentation was wrong by 1
        or 2 spaces
      - fix a few cases of == True, False, None and replace with 'is'
      - re-indent some cases where the code is OK, but pep8 complains
      
      Signed-off-by: default avatarIustin Pop <iustin@google.com>
      Reviewed-by: default avatarRené Nussbaumer <rn@google.com>
      5ae4945a
  14. Aug 07, 2012
    • Iustin Pop's avatar
      Switch job IDs to numeric · 76b62028
      Iustin Pop authored
      
      This has been a long-standing cleanup item, which we've always
      refrained from doing due to the high estimated effort needed.
      
      In reality, it turned out that after some infrastructure improvements
      (the previous patches), the actual job queue-related changes are quite
      small.
      
      We will need to update the NEWS file later, but so far the RAPI
      documentation doesn't mention that the job ID is a string (it only
      says it is "a number"), so it doesn't look like it needs update.
      
      Signed-off-by: default avatarIustin Pop <iustin@google.com>
      Reviewed-by: default avatarRené Nussbaumer <rn@google.com>
      76b62028
  15. Jul 26, 2012
  16. Jul 25, 2012
  17. Jul 19, 2012
  18. Jul 11, 2012
  19. Jul 05, 2012
  20. Jun 27, 2012
  21. Jun 26, 2012
  22. Jun 19, 2012
  23. Jun 15, 2012
  24. Jun 12, 2012
  25. Jun 08, 2012
  26. Jun 07, 2012
  27. Jun 05, 2012
    • Michael Hanselmann's avatar
      QA: Add default setting for tests · 69a15dd7
      Michael Hanselmann authored
      
      Commit 1010ec70 enabled all tests by default. In some scenarios where
      the configuration is static one may not want newly added tests to be
      run.
      
      Signed-off-by: default avatarMichael Hanselmann <hansmi@google.com>
      Reviewed-by: default avatarIustin Pop <iustin@google.com>
      (cherry picked from commit 59a8fe48)
      69a15dd7
    • Iustin Pop's avatar
      QA: add toggle for fewer common instance tests · b498540e
      Iustin Pop authored
      
      Currently, the "common" instance tests (shutdown, rapi stopped
      console, stopped modify, startup, rapi shutdown, rapi startup, list,
      info, modify, rapi modify , console, rapi console, reinstall, rename,
      rapi rename, rename and back, rapi rename and back, grow disk, reboot,
      tags, cluster verify, rapi test instance, node list, job list) are run
      4 times:
      
      - one time for plain instance created via RAPI, using client
      - one time for plain instance created via RAPI, without client
      - one time for plain instance created via gnt-instance
      - one time for DRBD instance created via gnt-instance
      
      This makes the QA long, and is over-doing it (for non-full QAs): an
      instance created via RAPI (either client) and via gnt-instance should
      have the same parameters, but our duplicate tests do not ensure that,
      just that instances behave OK.
      
      This patch adds a toggle so that we can skip the common tests for
      RAPI-created instances; the creation/deletion is still performed, but
      all the other operations are not. This reduces the time of a "quick"
      QA by ~20% (1h:15m → 1h).
      
      The common tests will still be run (unconditionally) for
      gnt-instance-created instances.
      
      Signed-off-by: default avatarIustin Pop <iustin@google.com>
      Reviewed-by: default avatarRené Nussbaumer <rn@google.com>
      b498540e
Loading