- Apr 26, 2012
-
-
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>
-
Michael Hanselmann authored
Fixes QA after commit cfdf561d. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Chris Schrier <schrierc@google.com>
-
Michael Hanselmann authored
Short description: This fixes an issue whereby masterd would become unresponsive on the LUXI socket, leading to client timeouts. While made worse in 2.5, the underlying issue was already present in 2.4. Longer description: Until now all LUXI queries would acquire the BGL (big Ganeti lock) in shared mode. With the exception of OpNodeAdd and OpNodeRemove, this was also the case for all opcodes before version 2.5. In 2.5 we split OpClusterVerify into multiple opcodes, one of which (OpClusterVerifyConfig) now acquires the BGL in exclusive mode. Whether or not doing so is good is a separate discussion: OpNodeAdd and OpNodeRemove, as of this writing, still require an exclusive BGL. OpClusterVerifyConfig is run more often than OpNodeAdd or OpNodeRemove in normal clusters, which is why we only recognized this issue in 2.5. What would happen is that once OpClusterVerifyConfig tried to acquire its exclusive BGL while it was actually held by other opcodes (e.g. OpInstanceReplaceDisks), the locking code would not grant shared acquires for the BGL, even when the exclusive acquire is removed from the queue for a short amount of time after a timeout. This is necessary to prevent lock starvation. In this situation further LUXI queries requiring the BGL in shared mode, e.g. OpClusterQuery, would block and the client eventually time out. Over time they fill the client request workerpool's queue and at that point even requests not requiring the BGL stop working. Once the long-running operation(s) holding the BGL in shared mode finished, OpClusterVerifyConfig gets it in exclusive mode and everything returns to normal. LUXI recovers very soon too. I'd like to thank Bernardo Dal Seno for his contribution to this bugfix. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Bernardo Dal Seno <bdalseno@google.com> Reviewed-by:
Iustin Pop <iustin@google.com> (cherry picked from commit 0fa753ba)
-
Michael Hanselmann authored
Also mark it as deprecated in NEWS as normal queries can be used instead. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Michael Hanselmann authored
The main intention of this patch is to make it possible to retrieve cluster tags via query2. While at it I decided to convert LUClusterConfigQuery right away. Some of the values returned by LUClusterQuery are also included, but the conversion of LUClusterQuery is not yet complete. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Michael Hanselmann authored
Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Michael Hanselmann authored
These are not used anywhere in Python or Haskell. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
- Apr 19, 2012
-
-
Michael Hanselmann authored
This solves one case where locks are acquired during LUXI queries. Pretty late into the transition I noticed that OpBackupQuery had a “use_locking” parameter for a long time, but didn't use it. Since most of the other changes were already and this allows exports to be listed via RAPI (/2/query) I decided to finish. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Michael Hanselmann authored
str.isdigit is about 4x faster than using a regular expression ("\d+"). This is in the inner sorting code so speed matters. $ python -m timeit -s 'import re; s = re.compile("^\d+$")' \ 's.match(""); s.match("Hello World"); s.match("1234")' 1000000 loops, best of 3: 0.937 usec per loop $ python -m timeit '"".isdigit(); "Hello World".isdigit(); "1234".isdigit()' 1000000 loops, best of 3: 0.218 usec per loop Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Chris Schrier authored
Signed-off-by:
Chris Schrier <schrierc@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
- Apr 18, 2012
-
-
Michael Hanselmann authored
It was only used in one place and wasn't really necessary. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Michael Hanselmann authored
Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Michael Hanselmann authored
Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Michael Hanselmann authored
Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Michael Hanselmann authored
Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Michael Hanselmann authored
Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Michael Hanselmann authored
Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Michael Hanselmann authored
Like “--priority” and “--dry-run”, the “--submit” option is available for many commands and can be documented in a central place. This patch also fixes a small number of style issues. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Iustin Pop authored
Hopefully these will be the last ones… Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
Michael Hanselmann authored
LUXI queries are processed without callbacks (see server.masterd.ClientOps._Query). With commit 07923a3c the logic for checking an opcode's result for jobs to submit was changed and subsequently raised an exception (“'NoneType' object has no attribute 'SubmitManyJobs'”) in such a case. Before said commit the exception would also have been raised if an opcode used by a query submitted jobs. This patch changes the logic to only resolve the method if callbacks are defined and to use an exception-raising implementation otherwise. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
- Apr 17, 2012
-
-
Alexander Schreiber authored
This patch adds support for "show" as an alias for "info" to gnt-(cluster|instance|node|os). It already exists in gnt-job. Signed-off-by:
Alexander Schreiber <als@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
- Apr 16, 2012
-
-
Michael Hanselmann authored
Before this patch, a node evacuation submitted with high priority would only compute the solution at that priority, but the actual evacuation ran at normal priority. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
- Apr 13, 2012
-
-
Michael Hanselmann authored
Jobs have no “name” field. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Michael Hanselmann authored
While “gnt-job list” would also accept filters on the command line (e.g. “'status == "error"'”, having shortcuts in the form of options comes in handy. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Michael Hanselmann authored
* devel-2.5: (29 commits) gnt-* {add,list,remove}-tags: Unify options Bump version for 2.5.0 final release configure.ac: Fix “too many arguments” error Fix extra whitespace Further fixes concerning drbd port release Fix a bug concerning TCP port release Fix extra whitespace Fix a bug concerning TCP port release ganeti.initd: Add “status” action Add whitelist for opcodes using BGL LUOobCommand: acquire BGL in shared mode Fix docstring bug LUNodeAdd: Verify version in Prereq LUNodeAdd: Verify version in Prereq Fix LV status parsing to accept newer LVM gnt-instance info: Show node group information cmdlib: Factorize checking acquired node group locks Bump version for 2.5.0~rc6 release cmdlib: Stop forking in LUClusterQuery locking: Notify only once on release ... Conflicts: NEWS: Trivial daemons/daemon-util.in: Copyright line lib/client/gnt_group.py: Tag operations lib/cmdlib.py: Not so trivial, hopefully correct Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-