Skip to content
Snippets Groups Projects
  1. Oct 11, 2012
  2. Jun 05, 2012
    • Iustin Pop's avatar
      QA: stop logging SSH arguments for each invocation · 710bc88c
      Iustin Pop authored
      
      Currently, this is how the QA log looks like:
      
      Command: ssh -oEscapeChar=none -oBatchMode=yes -l root -t -oStrictHostKeyChecking=yes -oClearAllForwardings=yes -oForwardAgent=yes -oControlPath=/tmp/ganeti-qa-multiplexer.DMzkuH -oControlMaster=no node14 exit
      Command: ssh -oEscapeChar=none -oBatchMode=yes -l root -t -oStrictHostKeyChecking=yes -oClearAllForwardings=yes -oForwardAgent=yes node8 exit
      Command: ssh -oEscapeChar=none -oBatchMode=yes -l root -t -oStrictHostKeyChecking=yes -oClearAllForwardings=yes -oForwardAgent=yes node18 exit
      
      And these arguments are repeated over and over. This patch proposes to
      log once the arguments, at the beginning of the QA (so that the SSH
      commands can be reproduced, if needed) and then drop them from the
      log. The new output looks like:
      
      SSH command for primary node: ssh -oEscapeChar=none -oBatchMode=yes -lroot -oStrictHostKeyChecking=yes -oClearAllForwardings=yes -oForwardAgent=yes -oControlPath=/tmp/ganeti-qa-multiplexer.24lgrK -oControlMaster=no node14
      SSH command for other nodes: ssh -oEscapeChar=none -oBatchMode=yes -lroot -oStrictHostKeyChecking=yes -oClearAllForwardings=yes -oForwardAgent=yes NODE
      (the above are the informational messages about parameters, then)
      Command: ssh node14 exit
      Command: ssh node8 exit
      Command: ssh node18 exit
      
      This makes the QA log much more readable, by dropping unneeded clutter
      (look how long the original lines were), and hopefully also a bit
      smaller (current QA log is > 100MB of text output).
      
      Signed-off-by: default avatarIustin Pop <iustin@google.com>
      Reviewed-by: default avatarBernardo Dal Seno <bdalseno@google.com>
      710bc88c
    • Iustin Pop's avatar
      Switch QA to tty-less mode · f14a8b15
      Iustin Pop authored
      
      This makes ssh generate much less noise when QA is run itself without
      a tty, as otherwise we get thousands of lines of:
      
        Pseudo-terminal will not be allocated because stdin is not a terminal.
      
      in the QA logs (which are already big enough).
      
      Signed-off-by: default avatarIustin Pop <iustin@google.com>
      Reviewed-by: default avatarRené Nussbaumer <rn@google.com>
      f14a8b15
  3. May 15, 2012
  4. May 14, 2012
  5. May 10, 2012
  6. Apr 19, 2012
  7. Apr 13, 2012
  8. Jan 19, 2012
  9. Aug 30, 2011
  10. Jul 25, 2011
  11. Mar 08, 2011
  12. Mar 03, 2011
    • René Nussbaumer's avatar
      LUInstanceRename: Fail if renamed hostname mismatch · 31fe5102
      René Nussbaumer authored
      
      There's a problem if you run gnt-instance rename with a non FQDN and the
      renamed LU tries to resolve the hostname to make it FQDN. It could be
      that this resolved hostname was just a CNAME to another name which leads
      to wrongly renamed instances name.
      
      Given a name of "foobar" is a CNAME to "moohost" now if you gonna rewrite an
      instance named "foobar1" to "foobar" it will pickup the host "moohost".
      This is not obvious behaviour. If we detect this case we abort with a
      prereq error. The user then however can continue with a FQDN and
      --no-name-check if he intends to force the operation.
      
      Signed-off-by: default avatarRené Nussbaumer <rn@google.com>
      Reviewed-by: default avatarIustin Pop <iustin@google.com>
      31fe5102
  13. Feb 03, 2011
  14. Jan 12, 2011
    • Iustin Pop's avatar
      Run pylint over QA code too · 3582eef6
      Iustin Pop authored
      
      Right now, the QA code is not covered by pylint, and this shows at
      least one low-impact bug.
      
      This patch does the necessary changes to make QA pylint-clean, and the
      changes the makefile to run pylint for it.
      
      Notable changes:
      
      - qa_utils.GenericQueryTest: randfields was not used at all, and my
        belief is that it was indented to be used in order not to modify the
        input list; so I replaced randfields with fields, so we only shuffle
        the our local copy
      - qa_node.TestOutOfBand was using it's own copy of AcquireNode(), so I
        replaced it with the existing version
      - qa_os: was using 'dir' in a couple of places, replaced with dirname
      
      Signed-off-by: default avatarIustin Pop <iustin@google.com>
      Reviewed-by: default avatarMichael Hanselmann <hansmi@google.com>
      3582eef6
    • Iustin Pop's avatar
      QA: use a persistent SSH connection to the master · f7e6f3c8
      Iustin Pop authored
      
      The recent additions to QA (many more tests) make QA slow if the
      machine on which the QA runs is not very close to the tested nodes —
      or in general, when the SSH handhaske is costly.
      
      We discussed before about using a persistent connection, and here is
      the patch that implements it. On a very small QA (very very small), it
      cuts down a lot of time (almost half), so it should be useful even for
      a full QA.
      
      I've also thought about changing from external ssh to paramiko, but I
      estimated that it would be more work to correctly interleave the IO
      from the remote process than just running a background SSH.
      
      Also note that yes, the global dict is ugly, but I don't know of
      another simple way to implement this.
      
      Signed-off-by: default avatarIustin Pop <iustin@google.com>
      Reviewed-by: default avatarMichael Hanselmann <hansmi@google.com>
      f7e6f3c8
  15. Jan 10, 2011
  16. Dec 21, 2010
  17. Dec 16, 2010
  18. Dec 14, 2010
  19. Dec 10, 2010
  20. Nov 29, 2010
    • Iustin Pop's avatar
      Simplify QA commands · 2f4b4f78
      Iustin Pop authored
      
      Currently, 95% of the QA commands are executed in the same way: on the
      master, based on a command list and with expectancies for succes:
      
          AssertEqual(StartSSH(master['primary'],
                               utils.ShellQuoteArgs(cmd)).wait(), 0)
      
      The rest 5% are variations on this theme (maybe the command needs to
      fail, or the node is different, etc.). Based on this, we can simplify
      the code significantly if we abstract the common theme into a new
      AssertCommand() function. This saves ~250 lines of code in the QA suite,
      around 8% of the entire QA code size.
      
      Additionally, the output was very cryptic before (the famous "QA error:
      1 != 0" messages), whereas now we show a clear error message (node,
      command, exit code and failure mode).
      
      The patch replaces single quotes with double quotes in all the parts of
      the code that I touch; let me know if that's not OK…
      
      Signed-off-by: default avatarIustin Pop <iustin@google.com>
      Reviewed-by: default avatarMichael Hanselmann <hansmi@google.com>
      2f4b4f78
  21. Nov 01, 2010
  22. Jun 14, 2010
  23. May 11, 2010
  24. Mar 26, 2010
  25. Sep 05, 2008
    • Michael Hanselmann's avatar
      QA: Remove dry run mode · 26a61f87
      Michael Hanselmann authored
      It didn't work as planned because some commands depend on the return
      value or output of some operations.
      
      Reviewed-by: iustinp
      26a61f87
  26. Aug 26, 2008
  27. Aug 18, 2008
  28. Aug 15, 2008
  29. Feb 14, 2008
  30. Dec 03, 2007
  31. Nov 22, 2007
  32. Nov 08, 2007
  33. Nov 01, 2007
  34. Oct 18, 2007
  35. Oct 15, 2007
  36. Oct 12, 2007
  37. Oct 10, 2007
  38. Sep 26, 2007
    • Michael Hanselmann's avatar
      Enhance QA. · 5d640672
      Michael Hanselmann authored
      - Test “gnt-backup export” and “gnt-backup import”.
      - Move “ResolveInstanceName” to qa_utils.py.
      - Fix tests for “ganeti-watcher”.
      - Make instance shutdown and startup configurable.
      
      Reviewed-by: schreiberal
      
      5d640672
Loading