- 13 Jul, 2011 15 commits
-
-
Iustin Pop authored
Both these backends already have the data, we just need to use it. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
Iustin Pop authored
Currently always fixed to DRBD8, as that is what we assume already. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
Iustin Pop authored
Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
Iustin Pop authored
This will be used later in the Instance type. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
Iustin Pop authored
We eliminate the local variable as it's used only once. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
Iustin Pop authored
… to autoBalance, per the recommended style. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
Iustin Pop authored
Instead of manually encoding the JSValue(s), we can use showJSON as long as we use data types that can be auto-converted. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
Iustin Pop authored
This patch extends the previous patch changes to allow that each Cluster function returns a different result type, as long as we have an auxiliary function that processes that into the standard IAllocResult type. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
Iustin Pop authored
Currently, all IAllocator requests return the same result type: a list of strings (usually nodes, but can also be instance:nodes). This won't be true in the future, with the new request types that will return opcode lists. Therefore we will need to support multiple result types in the workflow; the first step is to make the final formatResponse step result-type-indepedent, so we take out the formatRVal invocation out of this function. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
Iustin Pop authored
The logic of request processing is not separated into its own function, and (beside CLI interaction, e.g. verbosity handling) all logic is now in IAllocator.hs. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
Iustin Pop authored
This will make it easier to unittest the code, and keeps all login in a single module. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
Iustin Pop authored
This is a lot of duplication with modeMreloc, which will get sorted out once we convert mreloc to change-group. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
Iustin Pop authored
This was potentially hiding issues in the group query, so let's remove it since we're now bound to the current Ganeti version. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
Iustin Pop authored
The evac-mode goes into the Types.hs module since it needs to be available to Cluster.hs too. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
Iustin Pop authored
No code changes (except one definition being moved around in QC.hs) are contained in this patch. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
- 01 Jul, 2011 1 commit
-
-
Iustin Pop authored
Haskell has two main integer types: - Int, which is a native-type, and is guaranteed to have at least [-2²⁹, 2²⁹-1] range; on 64-bit platforms, it has much higher range - Integer, which is a software type (implemented using libgmp), and thus unbounded For performance reasons, the node/instance properties use Int for their attributes (and Double for some, but that's another story). This is all fine and doesn't cause problems. However, the CStats type which holds the overall cluster resources starts to fail when we analyse clusters with more than around 400 nodes and big memory/disk sizes on 32 bit platforms. The simple fix would be to restrict cluster sizes, but that's no nice. I've benchmarked and changing to Integer doesn't show a visible slowdown on 64-bit platforms (as far as I can read on the internets, GHC knows to optimise Integer and only use software types when the values are large enough), and it also fixes the 32-bit problem. So this patch changes the CStats types to Integer, except for the instance count (which I don't expect to overflow 2²⁹ anytime soon). Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
- 28 Jun, 2011 11 commits
-
-
Iustin Pop authored
This patch fixes a bug in the test specification where we allowed nodes with zero free memory (hence no instance can be added, at all) and adds a simple labeling of the way this test can fail. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
Iustin Pop authored
This unittest had a corner case where it could fail if the same primary/secondary node names were generated. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
Iustin Pop authored
This just adds glue to allow replaying of tests using a given RNG state and test size (both are needed for exact replayability). Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
Iustin Pop authored
Using new functionality in QuickCheck 2 (the suchThat function), we generate now better test cases, such that (heh) we have no longer incomplete tests. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
Iustin Pop authored
Currently the way we generate nodes in some cases is by creating a totally random node, then restricting the test based on whether the node 'size' (as defined by multiples of base unit) satifies some high/low rules. This results in hard-to-satisfy conditions, so we change this model to be able to specify node sizes directly in the generation process, thus no longer needed post-creation filters. This fixes prop_ClusterAllocBalance which before had at most 1-2 satisfiable tests. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
Iustin Pop authored
The new scaffolding which replaced the batch driver of QuickCheck 1 now shows how many passes we have for incomplete tests. Some tests show very low pass counts, so we rework them to have more actually valid test cases. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
Iustin Pop authored
Since current distros don't package anymore QuickCheck 1.x, let's move to 2.x. This requires also a few changes to the code: - Test.QuickCheck.Batch doesn't exist anymore, so we need to write some scaffolding code to replace it - the way test sizes are generated has changed, and we need to restrict (in some tests) the cluster size, as our code is not yet ready for hundreds of thousands of nodes in a cluster and we run out of stack (which could be a bug somewhere by itself, needs investigation) - at least with GHC 7, floating point errors make a perfect cluster score even bigger, so we need to bump up the max. rounding error allowed Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
Iustin Pop authored
Removal of duplicate parantheses, removal of extra 'do', conversion from nested if to guards, use hierarchical imports. All per hlint. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
Iustin Pop authored
filterMGResults was built using a sequence of map and filter calls; while this was logically correct, it used some incomplete pattern matching which with the new GHC 7 triggers a warning. The patch rewrites it using a single foldl that does both the filtering and the mapping, in a more type-safe way. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
Iustin Pop authored
… instead of the hardcoded test against AllocUnallocable. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
Iustin Pop authored
… that checks if a group is allocable. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
- 17 Jun, 2011 6 commits
-
-
Guido Trotter authored
Signed-off-by:
Guido Trotter <ultrotter@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Guido Trotter authored
Signed-off-by:
Guido Trotter <ultrotter@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Guido Trotter authored
This also adds docstrings for the function arguments and renames exinst to exinsts, which is how it is called in other functions, since it's a list. Signed-off-by:
Guido Trotter <ultrotter@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Guido Trotter authored
Signed-off-by:
Guido Trotter <ultrotter@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Guido Trotter authored
Signed-off-by:
Guido Trotter <ultrotter@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Guido Trotter authored
Signed-off-by:
Guido Trotter <ultrotter@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
- 01 Jun, 2011 5 commits
-
-
Iustin Pop authored
This makes the type definitions a bit more readable/simpler. 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:
Guido Trotter <ultrotter@google.com>
-
Iustin Pop authored
This is not handled yet, this patch just adds parsing of the incoming request. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
Iustin Pop authored
This can be used for debugging. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
Iustin Pop authored
Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
- 31 May, 2011 2 commits
-
-
Guido Trotter authored
Signed-off-by:
Guido Trotter <ultrotter@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Guido Trotter authored
Note that --no-disk-moves and --no-instance-moves are not incompatible, but if both are used no solution can possibly exist. Signed-off-by:
Guido Trotter <ultrotter@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-