- May 10, 2012
-
-
Michael Hanselmann authored
This script can be used to check if an instance is running or stopped at various points during a QA run. Environment variables are used to pass the most essential information. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Michael Hanselmann authored
Until now this wasn't possible. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
- May 09, 2012
-
-
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:
Iustin Pop <iustin@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
Iustin Pop authored
The pyeval role generates literal (e.g. ``OP_CLUSTER…``) formatting, which differs from the other headers. This is confusing, so let's add a note that these are virtual operations, which makes the output more consistent. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
- May 08, 2012
-
-
Iustin Pop authored
This patch adds a hand-coded decoder for LuxiCall arguments, as the data-structure is not uniform enough for automated generation (even for the serialisation, we had to add hints for some fields, de-serialisation is even harder). It also fixes a tiny issue with WaitForJobChange job ID encoding, and adds unittests for the encoding/decoding of LuxiOp structures. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
René Nussbaumer <rn@google.com>
-
Iustin Pop authored
In preparation for unit-testing the Luxi definitions, this improves the auto-generation of OpCodes: currently this uses unbounded plain Strings for names and fields, and this creates too big test sizes (e.g. when automatically generating job sets). Furthermore, there are some more cleanups: switching from liftM to applicative style for easier definition, and some improvements in generators. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
René Nussbaumer <rn@google.com>
-
Iustin Pop authored
We currently auto-generate a LuxiOp data type, which holds the entire operation (including parameters). However, having a data type just for the method call would be useful, so let's change THH to also defineSADT for the Luxi constructors. Currently I don't know how to match automatically a LuxiReq to its LuxiOp counterpart (not even sure we need that), so any matching will remain manual. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
René Nussbaumer <rn@google.com>
-
Iustin Pop authored
Now that luxi.py constants are exported, we can use them for more consistency. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
René Nussbaumer <rn@google.com>
-
Iustin Pop authored
I was wondering why my changes to luxi.py did not trigger the rebuild… Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
René Nussbaumer <rn@google.com>
-
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:
Iustin Pop <iustin@google.com> Reviewed-by:
René Nussbaumer <rn@google.com>
-
Iustin Pop authored
And its associated unittests. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
René Nussbaumer <rn@google.com>
-
- May 07, 2012
-
-
Iustin Pop authored
Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
René Nussbaumer <rn@google.com>
-
Iustin Pop authored
This adds a bit of dumb mapping of values to names, while trying to be safe. This is the best we can do without resorting to parsing or interpreting ASTs. The difference in the output is: -- | Converted from Python list or set ADMINST_ALL adminstAll :: [String] -adminstAll = ["down", "offline", "up"] +adminstAll = [adminstDown, adminstOffline, adminstUp] Since for most such values we use strings, we don't gain in type safety on the Haskell side. But it makes the output more readable and it might open up other opportunities later. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
Iustin Pop authored
This add support for exporting constants from multiple modules (as opposed to hard-coding constants), and also makes the output more readable by skipping things we know for sure we don't want to convert (as opposed to things we would like to but don't know _how_ to convert). Additionally, we export the constants from the luxi module too. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
- May 04, 2012
-
-
Michael Hanselmann authored
The file was there and listed in Makefile.am, but I forgot to add it to commit a0c3e726. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
René Nussbaumer <rn@google.com>
-
Michael Hanselmann authored
The “RunTestIf” uses an AND association between the passed test names, so the instance would be be shut down if both rename and reinstall were enabled. Since this is not necessarily the case, OR must be used. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Michael Hanselmann authored
Until now “TestRunIf” and “TestEnabled” could only handle AND. With this patch a new class named “Either” is added to “qa_config” and allows OR. The name “Either” was chosen instead of “Or” as the latter is very close to the reserved keyword “or”. Examples: ["rapi", Either(["instance-rename", "instance-reboot"])] Either(["node-list", "instance-list", "job-list"]) Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
- May 01, 2012
-
-
Iustin Pop authored
Commit 30d25dd8 moved the htools code to new-style exception handling, but the hconfd code hasn't been, which fails when compiling on newer GHC versions. This patch does the rest of the move; however, the situation is not very nice, we should have a better way to handle this (introduce catchIO? or something like that). Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
- Apr 30, 2012
-
-
Iustin Pop authored
Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Bernardo Dal Seno <bdalseno@google.com>
-
- Apr 27, 2012
-
-
Iustin Pop authored
The reason why grow-disk was doing: $ gnt-instance grow-disk instance3 0 -64 Unhandled Ganeti error: Invalid format Is because it does it's own ParseUnit call, and doesn't transform that into a nicer message. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
René Nussbaumer <rn@google.com>
-
Iustin Pop authored
Since we use a testutils.InputTestClient(), then the actual error expected is VerificationError, and not GanetiApiError (which is used at real run-time). Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
René Nussbaumer <rn@google.com>
-
Iustin Pop authored
So while testing my previous patch I run setup-ssh manually without any arguments, and it did nothing (no complains, no messages, anything). That was very surprising, so let's make it behave better if no nodes are passed. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
Iustin Pop authored
This works around a problem in Paramiko, but which looks like it's a Ganeti problem: [cluster] root@node4:~# gnt-node add --readd node3 /usr/lib/python2.6/dist-packages/Crypto/Util/randpool.py:40: RandomPool_DeprecationWarning: This application uses RandomPool, which is BROKEN in older releases. See http://www.pycrypto.org/randpool-broken RandomPool_DeprecationWarning) To silence this, we do an ugly thing (since Python 2.4 doesn't support context managers): manually reset the warnings filter, which resets any -W command line flags (hopefully noone calls this tool manually so often). Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
- Apr 26, 2012
-
-
Michael Hanselmann authored
This script shows a few examples on how to use the RAPI input test client. It is also run at “make check” time to ensure it's not completely broken. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
René Nussbaumer <rn@google.com>
-
Michael Hanselmann authored
This patch adds a mock RAPI client to test input values to methods. All methods either raise an exception if there was a problem or return None. Third-party code can use this to test their input values to the RAPI client. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Michael Hanselmann authored
With this patch headers are constructed from the PycURL options and passed to the mock implementation. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
René Nussbaumer <rn@google.com>
-
René Nussbaumer authored
This is preparation for the mock system, where we need the same cURL mock. Signed-off-by:
René Nussbaumer <rn@google.com> Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
René Nussbaumer <rn@google.com>
-
Michael Hanselmann authored
This exception is raised to abort before actually sending a LUXI call (there is no LUXI server involved in the test). The testing utilities catch the exception to report a success (i.e. the code didn't throw an exception before due to invalid types, etc.). To allow the exception to be thrown all the way to the test utilities, the HTTP server library must ignore it. Also some overly generic exception handling is removed from the RAPI request handler. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Michael Hanselmann authored
This will be used in a unittest for RAPI testing utilities. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
René Nussbaumer <rn@google.com>
-
Michael Hanselmann authored
By moving the code loading RAPI users from a file into a standalone function it becomes easier to use the RAPI request handler in tests. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
René Nussbaumer <rn@google.com>
-
Michael Hanselmann authored
This will be used for providing a type-checking RAPI client for tests. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Iustin Pop authored
Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
Iustin Pop authored
Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
Iustin Pop authored
Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
Iustin Pop authored
This also improves the log messages for the (default) relative mode ("by %s to %s"). Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
Iustin Pop authored
The CLI currently doesn't permit this, but a direct job submission would allow it. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
Iustin Pop authored
This logs all external commands in normal (non-debug) mode. This will leak the DRBD secrets, but in any case we do log failed commands, so it's not a significant change. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
- Apr 23, 2012
-
-
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:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
- Apr 20, 2012
-
-
Chris Schrier authored
Signed-off-by:
Chris Schrier <schrierc@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
Chris Schrier authored
Signed-off-by:
Chris Schrier <schrierc@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-