Skip to content
Snippets Groups Projects
  1. 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
  2. Nov 01, 2010
  3. Oct 14, 2010
    • Iustin Pop's avatar
      Rework QA interaction with the watcher · 8201b996
      Iustin Pop authored
      
      The interaction with cron-launched watcher is a well-known failure mode of QA:
      
      ---- 2010-10-14 06:54:55.464839 time=0:00:56.764827 Test tools/move-instance
      
      For the following tests it's recommended to turn off the ganeti-watcher cronjob.
      
      ---- 2010-10-14 06:54:55.465255 start Test automatic restart of instance by ganeti-watcher
      …
      Error: Domain 'instance1' does not exist.
      Command: ssh -oEscapeChar=none -oBatchMode=yes -l root -t -oStrictHostKeyChecking=yes
        -oClearAllForwardings=yes -oForwardAgent=yes node2 'ganeti-watcher -d'
      2010-10-13 23:55:04,479:  pid=1659 ganeti-watcher:626
       ERROR Can't acquire lock on state file /var/lib/ganeti/watcher.data: File already locked
      ---- 2010-10-14 06:55:04.513948 time=0:00:09.048693 Test automatic restart of instance by ganeti-watcher
      
      In order to fix this, we disable the watcher during these tests, and
      re-enable it afterwards. To protect against watcher being disabled, we
      enable it unconditionally at the start of the QA (we do want it enabled,
      in order to see the interaction between the watcher and many
      creation/disk replace jobs, etc.).
      
      Note: even after this patch, if a cron-watcher was started and is still
      running during the test, we'll have locking issues. I think for now this
      is OK, we'll have to see how often that happens.
      
      Signed-off-by: default avatarIustin Pop <iustin@google.com>
      Reviewed-by: default avatarMichael Hanselmann <hansmi@google.com>
      8201b996
  4. Aug 15, 2008
  5. Feb 14, 2008
  6. Dec 03, 2007
  7. Nov 22, 2007
  8. Nov 13, 2007
  9. Nov 01, 2007
  10. Oct 10, 2007
  11. 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
  12. Sep 13, 2007
Loading