- Jun 02, 2010
-
-
Iustin Pop authored
Currently, we define the LuxiOp type as a simple enumeration, and leave the arguments structure to the users of the Ganeti.Luxi module. This is suboptimal for a couple of reasons: first, we decouple the operation type from operation arguments, and that means we don't use the type system for validation of the arguments; second, the clients themselves have to know about the JSON encoding of the protocol. For the above arguments, we change the operation type to contain the arguments too, and then the entire conversion/serialization is restricted to the Ganeti.Luxi module. Also, the removal of the JSON encoding from the clients results in an overall simplification of the code.
-
- Jun 01, 2010
-
-
Iustin Pop authored
Incomplete pattern match…
-
Iustin Pop authored
These are not comprehensive, but at least we have a start.
-
- May 30, 2010
-
-
Iustin Pop authored
QuickCheck's batch driver (at least v1) doesn't show the test aborts, but simply discards the specific exception and increases the abort count. This makes it hard to debug the tests, so we modify our own test wrapper (which so far only tracked total failures) to show any exceptions.
-
- May 28, 2010
-
-
Iustin Pop authored
Since the unittests are not 'clean' from the p.o.v. of type declarations, and cannot be made clean in all respects (e.g. orphan instances), we silence some warnings for the test target, to have a cleaner output.
-
- May 27, 2010
-
-
Iustin Pop authored
The tests are moved to a separate data structure, and we can select a subset of tests to run.
-
Iustin Pop authored
-
Iustin Pop authored
Some keys are optional in the Ganeti opcodes (e.g. ‘node’ in the OpReplaceDisks), and as such we need to transform them in a Maybe value, instead of failing. The patch reworks a bit fromObj and adds maybeFromObj which parses such optional values. It then uses it in the opcode reading.
-
Iustin Pop authored
This patch removes all old uses of fromJResult with the annotated version, and removes the non-annotated version. All JSON parsing points should now have annotated errors.
-
Iustin Pop authored
This allows, for example, the RAPI backend to detail which information (instance or node data) fails to parse.
-
Iustin Pop authored
Currently fromObj doesn't detail what we're trying to read, which can lead to cryptic messages: "Cannot read Int". The patch changes this function to annotate the error messages with the key/value we're trying to convert, by using a new version of fromJResult. Since the display of the key in tryFromObj is now redundant (it was already redundant in the 'not found' case), we remove it. The new version of fromJResult (annotateJResult) simply prepends a description string to the actual error message.
-
- May 26, 2010
-
-
Iustin Pop authored
-
- May 25, 2010
-
-
Iustin Pop authored
Instance, Node and Text modules have improved coverage.
-
- May 20, 2010
-
-
Iustin Pop authored
The patch adds some simple unit-tests for both the allocation function (we can allocate small instances on an empty cluster, we can allocate in tiered more starting from any size) and the balancing functions (one single instance is placed optimally, a full cluster plus an empty node can be rebalanced). The coverage has increased greatly, since this is the bulk of the algorithm/code. Also, the cluster tests are now being run with different options, since they are much slower.
-
Iustin Pop authored
This is done so we can test a longer pipeline.
-
Iustin Pop authored
This helps debugging via ghci.
-
Iustin Pop authored
After the name patches, we can pass in either the short or the full name, so update the hbal man page accordingly.
-
Iustin Pop authored
-
Iustin Pop authored
This patch introduces some new functionality in the base Element type and in Container which supports searching for all 'known' names of an element, such that both short and full names are accept for various options like '-O' and '--excluded-instances'.
-
Iustin Pop authored
Currently the name used internally is modified and holds the shortened name of the nodes/instances. This has caused issues before, since we always have to strip the suffix from input data and reapply it if we need to send data back to Ganeti. This patch changes the code such that the names are never modified, only the alias, and all the internal computations can forget about the common suffix addition/removal.
-
Iustin Pop authored
This new field ('alias') will hold the shortened/beautified display name. When resetting the name, the alias is reset too, and there's a new function to update only the alias.
-
Iustin Pop authored
First, we reduce the max size of the disks, since Int on 32bits will overflow for big simulated clusters. This is a real issue, that will need fixing in real life, but for now we just "silence" this test. Second, we increase the amount of time a test is allowed to run, otherwise on slower computers some tests might time-out.
-
- May 19, 2010
-
-
Iustin Pop authored
-
Iustin Pop authored
This increases the overall coverage by 5%-10% (depending on coverage type). Some modules are still not unittested at all, as HUnit is a better choice for them.
-
Iustin Pop authored
… and export more functions. This will help with unit testing.
-
- May 18, 2010
-
-
Iustin Pop authored
This patch moves from allowing no-limits for disk/cpu ratios, and always use a real limit. For disk, it's simple since we use 0, which means no reservations for disks. For CPU, we set an (arbitrary) limit of 64 v/p, which should be reasonable as a default limit (it can be changed via the command line).
-
- May 17, 2010
-
-
Iustin Pop authored
Currently we just print a fake result and exit early. This is bad, since it doesn't use the same codepaths for all the result printing, and has already led to a bug where hspace looks like completely ignoring the tiered specs request. This patch changes the code to override the computation, instead of the printout, thus allowing tiered specs results for such cases.
-
- May 04, 2010
-
-
Iustin Pop authored
We returned the KM_POOL_* metrics as the final state, not as the delta between the final and the initial state.
-
- Apr 26, 2010
-
-
Iustin Pop authored
-
- Apr 15, 2010
-
-
Iustin Pop authored
-
Iustin Pop authored
This patch adds the metrics of used/allocable/unallocable resources.
-
Iustin Pop authored
In case we're not enabling limits, let's restrict this to -1, instead of -1 times the number of pcpus.
-
Iustin Pop authored
Given two cluster states, the new function can answer the following questions: - how much resources currently allocated - how much resources finally allocated (delta from above is how much we can actually allocate on the cluster) - unallocable resources (whatever is left free after the previous step)
-
Iustin Pop authored
We add a new field that tracks the available virtual cpus (expressed as node cpus times the vcpu ratio).
-
- Apr 14, 2010
-
-
Iustin Pop authored
* master: Fix iallocator crash when no solutions exist Fix IAllocator multi-evacuate message
-
- Mar 31, 2010
-
-
Iustin Pop authored
Commit 54365762 added an un-guarded `head' call, which crashes with “Prelude.head: empty list” when no results exists for the per-instance allocation/relocation calls. This patch fixes this, and also adds another check for an unguarded `head' call during parsing of input data. (cherry picked from commit e41f4ba0)
-
Iustin Pop authored
Since Ganeti passes full host names (not common-suffix-stripped), we need to remove the suffix from the evac_nodes keys too. In case one node is not part of the cluster, it will lead to a wrong error message, but for now it fixes the problem.
-
- Mar 09, 2010
-
-
Iustin Pop authored
Commit 54365762 added an un-guarded `head' call, which crashes with “Prelude.head: empty list” when no results exists for the per-instance allocation/relocation calls. This patch fixes this, and also adds another check for an unguarded `head' call during parsing of input data.
-
- Feb 26, 2010
-
-
Iustin Pop authored
For some versions of haddock, this can create problems.
-
- Feb 25, 2010
-
-
Iustin Pop authored
This removes some manual checks from a few places in the code with a single list defined once.
-