- Dec 19, 2012
-
-
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>
-
Iustin Pop authored
These test the newly-changed behaviour, and fix an inconsistency in the hs-check target (versus hs-coverage). Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Michele Tartara <mtartara@google.com>
-
Iustin Pop authored
Currently, this doesn't abort if multiple arguments are passed, and the error message for errors during file read has a duplicate "Error". Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
Iustin Pop authored
This just ties in all the pieces so far and enables bash completion for it. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
Iustin Pop authored
This patch adds support for parsing the command list out of a binary (very strict format), and then iterating over that and building the sub-commands options/arguments. It also does a bit of general cleanup in the script. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
Iustin Pop authored
This will allow build-bash-completion to understand what is the list of commands that each binary supports, and then provide recursively completion support for each command. Note: by "fake", I mean we use hand-built output and hardcoded "--help-completion" matching, as opposed to automatically doing it via regular options. It could be possible in the future to use a two-staged command line parser, but for now not sure if it's worth it. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Michele Tartara <mtartara@google.com>
-
Iustin Pop authored
No need to do a boolean-based lookup, we can use the regular association list lookup. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Michele Tartara <mtartara@google.com>
-
Iustin Pop authored
This allows usage information to display nicer help (like in Python). Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Michele Tartara <mtartara@google.com>
-
Iustin Pop authored
Currently, the mon-collector binary is the only multi-command binary we have in Haskell. Not surprisingly therefore, its command line handling is not as robust as we need, not being able to support standard "--help" commands. This patch introduces generic multi-command handling, similar to the Python functionality (some parts missing, will be added in future patches), and switches mon-collector over to it. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Michele Tartara <mtartara@google.com>
-
Iustin Pop authored
The signature of the personality definitions is so ugly that, at least, we should hide it a bit behind a type alias. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Michele Tartara <mtartara@google.com>
-
Iustin Pop authored
Currently, the mon-collector binary uses the HTools/CLI module, which is OK but mean it links in lots of htools code. By copying that module to DataCollectors/CLI and removing the unneeded code, we reduce the number of modules it depends on fro 20 to 12, meaning both a shorter compiler time (24s to 9s) and a smaller binary (~9.6MB to ~7MB). Also fixes a typo in the original HTools/CLI module, thanks Michele! Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Michele Tartara <mtartara@google.com>
-
Iustin Pop authored
As noted by Guido, there are problems when using the hs-prof and hs-prof-quick targets in the default configuration (compiling all programs). The errors manifest in the form of wrong symbols during compilation. I knew that the hs-prof targets, which compiled multiple objects with the '.o' suffix, could be problematic; but the objects that are actually needed in the Template Haskell phase are very standard and don't differ between the binaries (Constants, BasicTypes, JSON, THH). What I didn't realise (although it's obvious) is that also the hs_prof_quick targets (the final binaries) are also compiled with a single suffix ('.prof_o'), which means that the object files are actually compiled for the last binary. This means that targets later in the HS_ALL_PROGS list would work correct, but early targets, especially htools/htools, would fail. So the obvious, and the single simple solution is to make these two rules only work on a single binary at a time. This should be fine, since one is looking at a specific problem usually, and it has the advantage that the hs-prof step is much faster (since it wasn't buildable in parallel anyway). Thanks to Guido for finding and making the initial diagnose on this! Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
Guido Trotter authored
If an instance is offline we definitely shouldn't start it up. But shutting it down, should it be up by mistake is not "that" bad. Still, we only allow it with --force, as it still performs an action on an instance we shouldn't touch. This should make everybody happy. Signed-off-by:
Guido Trotter <ultrotter@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Guido Trotter authored
If an instance is running (eg. ERROR_up) and at the same time offline, there's no way to either shut it down or reonline it. This allows onlining it. Offlining is still disabled for running instances. Signed-off-by:
Guido Trotter <ultrotter@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
- Dec 18, 2012
-
-
Bernardo Dal Seno authored
Some fixes, added more information in a few points, removed a stale (5+ year old) TODO comment. Signed-off-by:
Bernardo Dal Seno <bdalseno@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
Iustin Pop authored
This can be more useful than the "make" version. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
Michael Hanselmann authored
Commit 141d1489 was a bit too enthusiastic. The three parameters added to the list of parameters to be checked default to a value not evaluating to false, leading to a failure on cluster initialization. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
Dimitris Aragiorgis authored
LEVEL_NODE_ALLOC should be aquired too if LEVEL_NODE is ALL_SET. Signed-off-by:
Dimitris Aragiorgis <dimara@grnet.gr> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
Helga Velroyen authored
This patch contains the HUnit test that checks the compatibility of Haskell-generated networks with the python code. For that the generation of test instances of networks was enhanced to meet the validation steps of the python implementation. Also, so far networks were generated at two different places in the code; this is now consolidated. Signed-off-by:
Helga Velroyen <helgav@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
- Dec 17, 2012
-
-
Michael Hanselmann authored
“_SPICE_ADDITIONAL_PARAMS” is supposed to be the full list of SPICE-related KVM hypervisor parameters with the exception of “HV_KVM_SPICE_BIND”. The new test checks if all parameters starting with “HV_KVM_SPICE_*” are included. Three previously missing parameters are added to the list. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
Michael Hanselmann authored
This list is static at runtime and doesn't need to be recreated every time. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
Michael Hanselmann authored
When non-DRBD disks are used for an instance, “lu.needed_locks[locking.LEVEL_NODE]” is set to “locking.ALL_SET” (which is None). The assertion will then fail as None evaluates to False. Reported by Constantinos Venetsanopoulos. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
Michael Hanselmann authored
Doing so avoids triggering an assertion in mcpu which cross-checks the node lock and node allocation lock acquisition mode. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Iustin Pop authored
Commit f0f8d060 (“Show old primary/secondary node on disk replacement”) added two wrong uses of feedback_fn, which results in log entries such like these: "log": [ [ 7, [1351258326, 466214], "message", "Replacing disk(s) 0 for instance 'instance1.example.com'" ], [ 8, [1351258326, 749391], "Current primary node: %s", "node1" ], [ 9, [1351258326, 774829], "Current seconary node: %s", "node4" ], [ 10, [1351258329, 620410], "message", "STEP 1/6 Check device existence" ], (the first and fourth are OK, the 2nd and 3rd are broken). The API of jqueue._OpExecCallbacks.Feedback should probably be changed to prevent such an occurrence in the future. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Michele Tartara <mtartara@google.com>
-
Iustin Pop authored
Some confd types were not tested for serialisation, so let's move these (type-related) tests to their own module and extend them. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Helga Velroyen <helgav@google.com>
-
Iustin Pop authored
Commit e821050d (“Switch the Luxi interface from Strings to ByteStrings”) was designed to optimise the receive interface, but has an unfortunate side-effect: when sending non-trivial messages, it means that both the entire String and the ByteString versions must be in memory at the same time, leading to much increased memory usage. By changing the "hPut" from strict to lazy ByteStrings, it means that both the String and the ByteString values can be evaluated lazily, with significant effects: for a test query answer, instead of having a peak from ~600MB to 1.4G during the entire Luxi send operation, memory consumption actually decreased during the send operation, as the ByteString chunks are released individually and even the backing storage of the items that create the JSON string serialisation is released lazily as well. So instead of slow growth 10→550MB then quick peak to 1.4GB during Luxi send, we now have an even slower growth to ~580MB and then decrease of memory as the Luxi send progresses. The only downside is of a small increase in CPU time of a few percents for the above case; for our use cases, I think this is much desirable. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Helga Velroyen <helgav@google.com>
-
Iustin Pop authored
This allows us to ensure that query results are strict as we build them, instead of being lazy and only evaluated when the reply is sent over the Luxi interface. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Helga Velroyen <helgav@google.com>
-
Iustin Pop authored
The JSValue/JSObject types don't come with a NFData instance, so let's add one ourselves, so that we can force evaluation of JSValues (either when building or when reading them). Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Helga Velroyen <helgav@google.com>
-
Iustin Pop authored
It seems that Python code generates (sometimes) absolute job dependencies which are strings, instead of integers, so we should be able to parse these as well. We simply change from explicit int-based parsing (makeJobId) to the generic one (parseJobId). Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Helga Velroyen <helgav@google.com>
-
Iustin Pop authored
This changes deps and comment fields to always be shown, to match the Python behaviour for (at least) job listing/ops field. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Helga Velroyen <helgav@google.com>
-
Iustin Pop authored
This is not a required field, but rather an optional one; we add a new parameter and use it instead. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Helga Velroyen <helgav@google.com>
-
Iustin Pop authored
Python code sometimes sends this, so let's support it even though it's non-standard. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Helga Velroyen <helgav@google.com>
-