- Dec 20, 2012
-
-
Michael Hanselmann authored
Addresses issue 147. Only the hostnames resolved using “netutils.Hostname($name)” were normalized, but those returned by the class method “GetSysName” weren't. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Helga Velroyen <helgav@google.com>
-
Iustin Pop authored
By abstracting the command/personality formatting, we can easily switch htools to the same output as the rest of the commands. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Helga Velroyen <helgav@google.com>
-
Michael Hanselmann authored
Error message formatting, else/if merging to elif, docstrings. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Helga Velroyen <helgav@google.com>
-
Michael Hanselmann authored
Some rewording, some clarifications, and a new item on opportunistic locking. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Helga Velroyen <helgav@google.com>
-
Michael Hanselmann authored
If opportunistic locking is requested in the opcode, but no iallocator is used (not specified or no default), an error will be raised. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Helga Velroyen <helgav@google.com>
-
- Dec 19, 2012
-
-
Michael Hanselmann authored
If, for one reason or another, a module named "ganeti.ganeti" can be succesfully imported (e.g. through a symlink in the wrong place), error which are diffcult to debug can occur. This piece of code tests for the unlikely case of that happening. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Guido Trotter authored
This is highly incomplete, as per the manpage BUGS section. Signed-off-by:
Guido Trotter <ultrotter@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Guido Trotter authored
This is a new personality that for the moment doesn't do anything. Signed-off-by:
Guido Trotter <ultrotter@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Guido Trotter authored
The previous patch series made it simpler to deal with ERROR_up offline instances, but didn't fix qa, that had the old expectations. This fixes that, and adds more testing about the expected behavior. Signed-off-by:
Guido Trotter <ultrotter@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Guido Trotter authored
Currently gnt-instance shutdown --force of an offline instance resets the offline status. Which of course is bad and completely unintended. Fix. (caught by the new qa tests) Signed-off-by:
Guido Trotter <ultrotter@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
Iustin Pop authored
Currently, most network LUs simply use EINVAL instead of correct error codes; this patch tries to adjust the obvious cases. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
Michael Hanselmann authored
The code can loop directly over “self.wanted”, saving a lookup. An explicit loop is also replaced with a generator. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Michael Hanselmann authored
LUNetworkConnect and LUNetworkDisconnect had very similar code to detect conflicts between instance's network interfaces and networks. This code factorizes the common part and does some cleanup: - Remove single-letter variable for lambda (“l”) - Don't repeat instance name in warning output - Fixed error messages to match style guide Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Michael Hanselmann authored
The style guide says to use “import foo”-style imports, not “from foo import bar” unless it's a Ganeti module. There are some places with exceptions, but this one certainly isn't warranted. Also fix the import order. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Michael Hanselmann authored
Also do some minor code re-formatting. 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
This was not only copied for the networking fields in commit 306bed0e, but commit cfcea7ef fixed wrongly ordered parameters and didn't fix the original. Either way, this patch merges the two cases again. The newly added function is already tested through the tests for _GetLiveNodeField. 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
This makes entering the command easier. 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
The list of query fields can be automatically generated. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Michael Hanselmann authored
They should be in the same style as other descriptions. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Michael Hanselmann authored
This is not a trivial s/frozenset/compat.UniqueFrozenset/, but rather only replaces “frozenset” where appropriate. Most of the places are “static” information that doesn't change after the module has been loaded. Some docstrings and code formatting (e.g. empty lines) issues are addressed as well. Some lines got too long and were wrapped. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Helga Velroyen authored
Small renaming to make the test more readable. Signed-off-by:
Helga Velroyen <helgav@google.com> Reviewed-by:
Michele Tartara <mtartara@google.com>
-
Helga Velroyen authored
This creates a number of node groups with up to 3 networks, serializes them and compares them with their python equvalents. Signed-off-by:
Helga Velroyen <helgav@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Helga Velroyen authored
This adds a network field to the NIC params and a list of networks to the node group type. It adjusts the nodegroup's unit tests accordingly. Signed-off-by:
Helga Velroyen <helgav@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Helga Velroyen authored
Networks will be properties of NicParams and NodeGroups. Therefore they need to be defined before those. Signed-off-by:
Helga Velroyen <helgav@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Iustin Pop authored
This patch removes code which is no longer used due to refactoring: - http.InitSsl, last usage removed in commit 33231500 (“Convert RPC client to PycURL”) - rapi.baserlib.MakeParamsDict, last usage remove in commit 4e5a68f8 (“RAPI: rlib1 removal”) - rapi.baserlib.ExtractField, last usage removed in commit 028c6b76 (“RAPI:Fix root list and unittest for it.”) - qa.qa_utils.AssertNotEqual, last real usage removed in commit 2f4b4f78 (“Simplify QA commands”) (but it was still imported for a while, until we extended pylint to run over the QA code as well) - qlang._IsHostname, added in commit f8638e28 (“Detect globbing patterns as query arguments”) but never used - cmdlib._BuildNetworkHookEnvByObject, last usage removed in commit f22433c0 (“Locking related fixes for networks”) - NLD constants, which are obsolete—the nbma project is no longer maintained and it's not working with current ganeti Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
Iustin Pop authored
This patch is enabling split queries for jobs for gnt-node and rapi access (only for job listing, not job waiting). Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Helga Velroyen <helgav@google.com>
-
Iustin Pop authored
This shouldn't live in the main Query module, since it's too node specific. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Helga Velroyen <helgav@google.com>
-
Iustin Pop authored
This adds support for job queries, including (basic) unit-tests. I've tested this for memory and cpu usage as follows: - 3600 jobs (live queue): - via masterd, default: ~1.1s (masterd: ~60MB ram) - via confd, default: ~1.1s (hconfd: ~25MB ram) - via masterd, id only: ~1.0s (masterd: ~57MB ram) - via confd, id only: ~0.2s (hconfd: ~15MB ram) - all jobs (128K in total, around 570MB size on disk): - via masterd, default: 1m22s (masterd cpu: 48s), masterd: 1.4G ram - via confd, default: 1m16s (hconfd cpu: 51s), hconfd: 570MB ram peak (peak only right before starting luxi send, hconfd decreases in RSS as results are streamed over luxi, back to ~18MB after the send) - via masterd, id only: ~49s (masterd cpu: 45s), masterd: 1.3G ram - via confd, id only: ~39s (hconfd cpu: 35s), hconfd: 110MB ram peak (right before luxi send, decreasing as results are sent, back to ~14MB after the send) Given this, and that in production it's not likely to have hundreds of thousand of job files, I believe the implementation is safe from this point of view. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Helga Velroyen <helgav@google.com>
-
Iustin Pop authored
This is required for QueryJobs implementation; we change makeSimpleFilter to support both string and integers as names. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Helga Velroyen <helgav@google.com>
-
Iustin Pop authored
This patch adds implementation for a read-only job queue module, together with "full" test (as full as can be in a lazy language…). One note about the behaviour of the job queue is the handling of opcodes that fail validation: the 'input' opcode actually is a meta-type, which can hold either a real opcode or a plain JSValue, so that we can still load jobs with invalid opcodes for querying. The only downside of this is that, as opposed to Python code, we can't show the correct summary for such an opcode - we try to parse the OP_ID but not the extended OP_DSC_FIELD-equivalent. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Helga Velroyen <helgav@google.com>
-
Iustin Pop authored
I am very very unhappy with this patch. We have to do this, in order to be compatible with the Python code and behaviour, but there's lots of duplication; both the Python and the Haskell code will need to be cleaned up and simplified (we don't need QFF_* at all). For now though, this implements QffTimestamp and associated code. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
Bernardo Dal Seno authored
Unit tests updated and expanded with an inheritance check. The flag has no effect yet. Signed-off-by:
Bernardo Dal Seno <bdalseno@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Bernardo Dal Seno authored
PVs don't need to be marked as unallocatable, as the code will ignore partially used PVs. exclusive_storage made a node parameter. Signed-off-by:
Bernardo Dal Seno <bdalseno@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Helga Velroyen authored
Forgot to fix that after the review of patch "Haskell/python compatibility test for networks". Signed-off-by:
Helga Velroyen <helgav@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Iustin Pop authored
Since this is a type that behaves non-standard, let's add some more test for "wrong" input values. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Helga Velroyen <helgav@google.com>
-
Iustin Pop authored
As OpParams definitions are used at Template Haskell type, they don't get any coverage (although the values defined by them are actually used in unittests). However, we can at least test some of the functions defined in the module. This patch tests the failure modes of a few of the custom types in this module. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
Iustin Pop authored
"Use comparing" was not needed, and "Use on" can be solved by actually using on in the single case we have (the patch also reorders imports in that file). Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-