Skip to content
Snippets Groups Projects
  1. Oct 16, 2012
  2. Aug 10, 2012
  3. Jun 28, 2012
  4. Jun 27, 2012
  5. Jun 25, 2012
  6. Jun 20, 2012
  7. Jun 15, 2012
  8. Jun 14, 2012
  9. Jun 11, 2012
  10. May 23, 2012
  11. May 15, 2012
  12. May 14, 2012
  13. May 11, 2012
  14. May 10, 2012
  15. May 09, 2012
    • Iustin Pop's avatar
      Fix exception re-raising in Python Luxi clients · 98dfcaff
      Iustin Pop authored
      
      Commit e687ec01 (present in 2.5 since the 2.5 beta 3) did consistency
      fixes across the code-base. Unfortunately this was done without enough
      checks on the actual meaning of one of the fixes, which means error
      re-raising in lib/errors.py is broken.
      
      The problem is that:
      
        raise cls, args
      
      is different than:
      
        raise cls(args)
      
      And our unit-tests didn't catch this (this patch updates the tests).
      
      This breakage is usually trivial, like wrong error messages:
      
        $ gnt-instance remove no-such-instance
        Failure: prerequisites not met for this operation:
        ("Instance 'no-such-instance' not known", 'unknown_entity')
      
      versus:
      
        $ gnt-instance remove no-such-instance
        Failure: prerequisites not met for this operation:
        error type: unknown_entity, error details:
        Instance 'no-such-instance' not known
      
      or:
      
        $ gnt-instance add … no-such-instance
        Failure: prerequisites not met for this operation:
        ('The given name (no-such-instance) does not resolve: Name or service not known', 'resolver_error')
      
      versus:
      
        $ gnt-instance add … no-such-instance
        Failure: prerequisites not met for this operation:
        error type: resolver_error, error details:
        The given name (no-such-instance) does not resolve: Name or service not known
      
      But in some cases where we rely on a certain data representation
      (e.g. HooksAbort), this actually breaks because we try to iterate over
      the wrong type:
      
        File "/usr/lib/python2.6/dist-packages/ganeti/cli.py", line 1907, in FormatError
           for node, script, out in err.args[0]:
        ValueError: need more than 1 value to unpack
      
      Signed-off-by: default avatarIustin Pop <iustin@google.com>
      Reviewed-by: default avatarMichael Hanselmann <hansmi@google.com>
      98dfcaff
    • Iustin Pop's avatar
      Allow clock skews in certificate verification · f97a7ada
      Iustin Pop authored
      
      Currently we allow for up to NODE_MAX_CLOCK_SKEW time difference
      between nodes in some operations, but not everywhere: SSL certificate
      verification (import/export, both intra and inter-cluster) has a zero
      limit (downwards), and a week upwards. This can cause even
      intra-cluster backup problems, if the source node has a time even two
      seconds in the future.
      
      To fix this, when we verify certificates compare with a time offset
      with the max skew, which fixes the lower bound and reduces the upper
      bound by an insignificant amount (0.04%).
      
      Signed-off-by: default avatarIustin Pop <iustin@google.com>
      Reviewed-by: default avatarMichael Hanselmann <hansmi@google.com>
      f97a7ada
  16. May 08, 2012
    • Iustin Pop's avatar
      Correct capitalisation of two Luxi calls · 83c046a2
      Iustin Pop authored
      
      Two Luxi calls have inconsistent an name/value mapping (in the Python
      code):
      
      - REQ_AUTOARCHIVE_JOBS versus AutoArchiveJobs (versus AutoarchiveJobs)
      - REQ_QUEUE_SET_DRAIN_FLAG versus SetDrainFlag (no Queue)
      
      While these are only a consistency issue, let's fix them so that the
      Haskell code (which uses the auto-generated camel-case form) doesn't
      need to handle them case specially, and looks more like the Python
      code (hah, joke!).
      
      Signed-off-by: default avatarIustin Pop <iustin@google.com>
      Reviewed-by: default avatarRené Nussbaumer <rn@google.com>
      83c046a2
  17. May 04, 2012
  18. Apr 27, 2012
  19. Apr 26, 2012
  20. Apr 19, 2012
  21. Apr 16, 2012
  22. Mar 30, 2012
  23. Mar 28, 2012
  24. Mar 26, 2012
    • Iustin Pop's avatar
      Add trivial tests for gnt-* cli · 30f2802f
      Iustin Pop authored
      
      While testing some other stuff, I realised that the gnt-* commands
      could be broken (as in, the script fails with syntax errors), but make
      check doesn't detect it. Since we have shelltest, we can now add
      trivial tests for this case.
      
      One downside is that starting the scripts seems to be much slower
      than the htools binaries, so we can't add as many tests.
      
      The other downside is that shelltest is now required for all
      development work, but I think this is a small disadvantage compared to
      the increased testing possibilities.
      
      Signed-off-by: default avatarIustin Pop <iustin@google.com>
      Reviewed-by: default avatarMichael Hanselmann <hansmi@google.com>
      30f2802f
  25. Mar 22, 2012
    • Michael Hanselmann's avatar
      cmdlib: Stop forking in LUClusterQuery · a20e4768
      Michael Hanselmann authored
      
      While debugging another issue we realized that LUClusterQuery forks.
      This turned out to be the “platform.architecture” function from the
      Python library. It uses the “file” command to determine the architecture
      of the Python binary.
      
      This patch adds two new functions to the “runtime” module to get this
      information once per process instead of doing it every single time
      LUClusterQuery is used. Forking is a no-go in a multi-threaded
      environment anyway.
      
      A future change will also have to change the terminology in “gnt-cluster
      info”: it reports the binary architecture simply as “architecture”, when
      it's actually the binaries' architecture. Kernel and userland can be
      different.
      
      Signed-off-by: default avatarMichael Hanselmann <hansmi@google.com>
      Reviewed-by: default avatarBernardo Dal Seno <bdalseno@google.com>
      a20e4768
    • Iustin Pop's avatar
      Convert manual shell tests to shelltestrunner · 53d4cdf1
      Iustin Pop authored
      
      This is more of a RFC… Basically most of the shell-based tests are
      converted from exec+grep to shelltestrunner.
      
      Things are not all fine and nice though:
      
      - we have dependencies between tests, as some generate some data files
        needed later; this is not nice, and we depend on serial execution in
        testrunner
      - we can still fail with no so nice messages in the offline-test
        script (when we generate most of the data)
      
      But overall, I think the tests are much nicer to
      define/read/debug:
      
      - each test is standalone, with the only dependency being an optional
        input data file; this is much better than a single monolithic shell
        script
      - in case of failures, the failure is clearly shown by shell test,
        both for exit code and stdout/stderr
      - shelltest can run in --debug mode, where the exact details are shown
        much better than the alternative of "set -x" for the shell script
      
      Comments welcome!
      
      Signed-off-by: default avatarIustin Pop <iustin@google.com>
      Reviewed-by: default avatarGuido Trotter <ultrotter@google.com>
      53d4cdf1
    • Michael Hanselmann's avatar
      locking: Handle spurious notifications on lock acquire · 8d7d8b57
      Michael Hanselmann authored
      
      This was already a TODO since the implementation of lock priorities in
      September 2010. Under certain conditions a waiting acquire can be
      notified at a time when it can't actually get the lock. In this case it
      would try and fail to acquire the lock and then return to the caller
      before the timeout ends.
      
      While this is not bad (nothing breaks), it isn't nice either. A separate
      patch will prevent unnecessary notifications when shared locks are
      released.
      
      Signed-off-by: default avatarMichael Hanselmann <hansmi@google.com>
      Reviewed-by: default avatarBernardo Dal Seno <bdalseno@google.com>
      8d7d8b57
Loading