- Mar 07, 2012
-
-
Iustin Pop authored
Currently we don't set a boundary on the length of the score field, which breaks all our nicely-aligned output efforts. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
Iustin Pop authored
Currently Cluster.printSolutionLine function always wants to print the old and new secondary, and as such it fails (ugly) for moves of non-DRBD instances. Change it so that it looks explicitly for noSecondary nodes, and format the output different in that case. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
Iustin Pop authored
Currently we track the mirroring type as simply yes/no, with "yes" meaning DRBD. This is not enough for handling shared storage, so we need to add a type that gives the exact mirroring type (none, internal, external), and a function that ties the disk template type to the mirroring type. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
Iustin Pop authored
Instead of computing the bad/good node lists separately (in effect iterating twice over the all_nodes list and also creating that list twice from the container), let's use 'partition' and do a small improvement. 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
Currently, the code in Loader.hs marks as un-movable any instances which don't have a secondary. This is not valid for any shared storage templates, so let's remove that check completely. The initial state of the instance will reflect correctly the movable status, based on the disk template of the instance, so we don't need to re-do this check. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
Iustin Pop authored
Our current cluster model is based on per-node storage, and as such we don't handle shared disk templates. Until we can improve the model, let's handle nodes without local storage better: in order to still compute a valid cluster score, we need to handle nodes with tDsk == 0. For this, we abstract the in-line computation of pDsk (which is used in the cluster score) to a separate function which, for tDsk == 0, returns instead 1 (i.e. disk fully used). Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
- Mar 03, 2012
-
-
René Nussbaumer authored
This make it possible to load from an Ialloc file Signed-off-by:
René Nussbaumer <rn@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
René Nussbaumer authored
Signed-off-by:
René Nussbaumer <rn@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
René Nussbaumer authored
Signed-off-by:
René Nussbaumer <rn@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
René Nussbaumer authored
This makes it possible to reuse that function when we want to use IAlloc as a data source backend Signed-off-by:
René Nussbaumer <rn@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
René Nussbaumer authored
Signed-off-by:
René Nussbaumer <rn@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
- Mar 01, 2012
-
-
René Nussbaumer authored
Signed-off-by:
René Nussbaumer <rn@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
- Feb 29, 2012
-
-
René Nussbaumer authored
This helper abstract away all the unlines and unwords call you've to do after you got a formatTable back. Signed-off-by:
René Nussbaumer <rn@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Iustin Pop authored
This fixes the prop_Node_rMem test, which cares about memory only; otherwise we could fail due to other problems (e.g. not enough disk). Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
René Nussbaumer <rn@google.com>
-
Iustin Pop authored
This is not perfect, as the override applies identical target test values to both the 'fast' and 'slow' tests (making the slow tests take a long time), but it allows a quick override for manual runs. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
René Nussbaumer <rn@google.com>
-
Iustin Pop authored
These just test that add/remove are idempotent. This is not perfect, as we use unsorted lists for some values (instead of sets), so when using non-empty nodes this would break (but for empty nodes, a 1-element list is sorted, so it's fine). Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
René Nussbaumer <rn@google.com>
-
Iustin Pop authored
This makes balancing use the new metric. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
René Nussbaumer <rn@google.com>
-
Iustin Pop authored
This simply tracks the instance-used spindles (using hard-coded '1' per instance), and additionally prevents additions in soft-mode when we go over the limit. Note: there's an assymetry between addSec and removeSec (basically secondaries should only exist with DTDrbd8, so the check for uses_disk is superflous), will be cleaned up later. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
René Nussbaumer <rn@google.com>
-
Iustin Pop authored
Since we use the functions always module-qualified, let's drop the `instance` prefix and use a shorter one. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
Iustin Pop authored
This patch adds two helper functions and uses them for a somewhat simplified logic in the add/remove pri/sec node functions. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
René Nussbaumer <rn@google.com>
-
Iustin Pop authored
Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
René Nussbaumer <rn@google.com>
-
Iustin Pop authored
If missing, we'll default to 1 spindle. This also updates the text file format with the ipolicy, which was forgotten. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
René Nussbaumer <rn@google.com>
-
Iustin Pop authored
Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
René Nussbaumer <rn@google.com>
-
Iustin Pop authored
This adds the spindleCount, hiSpindles and instSpindles attributes. The spindleCount is equivalent to spindle_count on the ganeti side (a node parameter). hiSpindles is the maximum instance-used spindles, and instSpindles will be used to track spindles as used by instances (in later patches). The patch also reads spindleCount from the live backends. The text and simu backends currently set it to 1, hard-coded. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
René Nussbaumer <rn@google.com>
-
Iustin Pop authored
Just the usual data/type declarations, read/save in the text backend, etc. Also does a bit of unit-test cleanup (the way we build ipolicies). Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
René Nussbaumer <rn@google.com>
-
- Feb 28, 2012
-
-
René Nussbaumer authored
Also rename some functions as they don't reflect their actions anymore Signed-off-by:
René Nussbaumer <rn@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
René Nussbaumer authored
It prints the information which hbal prints in a nice formatted manner and of course without doing any actions. An example output looks like this: $ hinfo -m xen.example.com Loaded 4 nodes, 2 instances Cluster has 1 node group(s) Cluster coefficients: Field Value Weight free_mem_cv 0.00195342 x1.00 free_disk_cv 0.00000000 x1.00 n1_cnt 0.00000000 x1.00 reserved_mem_cv 0.00195342 x1.00 offline_all_cnt 0.00000000 x4.00 offline_pri_cnt 0.00000000 x16.00 vcpu_ratio_cv 0.12500000 x1.00 cpu_load_cv 0.50000000 x1.00 mem_load_cv 0.50000000 x1.00 disk_load_cv 0.00000000 x1.00 net_load_cv 0.50000000 x1.00 pri_tags_score 0.00000000 x2.00 Cluster score: 1.62890685 Signed-off-by:
René Nussbaumer <rn@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
- Feb 13, 2012
-
-
Guido Trotter authored
Notes: - it'd be nice if there was a way to automatically generate the DiskTemplate list instead of manually specifying it. After all we have C.diskTemplates - Of course this actually does nothing, as for other "half-implemented" templates :( Signed-off-by:
Guido Trotter <ultrotter@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Iustin Pop authored
Sorry, I missed this when I wrote the code originally. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
- Jan 26, 2012
-
-
Iustin Pop authored
When using a really random "extra cpus" variable, this can overflow (especially on 32 bit) and thus the final value can be < 0, thus the test will fail to fail. It doesn't make sense to test with huge values, so let's just generate a reasonable value. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
Iustin Pop authored
This was missing before, so with the new metric (NCpus), it's a good time to test this. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
René Nussbaumer <rn@google.com>
-
Iustin Pop authored
This patch changes the allocation delta stats from RSpec to AllocInfo. There's nothing interesting about it, but it should allow more correct computations of Npus in hspace. I also moved the AllocStats type alias from Cluster.hs to Types.hs (just makes more sense). Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
René Nussbaumer <rn@google.com>
-
Iustin Pop authored
The current RSpec type doesn't cut it anymore (and it's used in other places), so let's introduce a separate type for holding these statistics. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
René Nussbaumer <rn@google.com>
-
Iustin Pop authored
This will be used in hspace for proper tracking of used/pool/unavail npus. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
René Nussbaumer <rn@google.com>
-
Iustin Pop authored
Otherwise the docstrings for members take too many lines. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
Iustin Pop authored
This is superseded now. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
René Nussbaumer <rn@google.com>
-
Iustin Pop authored
Instead of always overriding, we should update the nodes's maxcpu setting only when the option is specified. Otherwise this will be read from the cluster or from the Ganeti constant for non-live backends. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
René Nussbaumer <rn@google.com>
-
Iustin Pop authored
hspace computes the NPU (normalised CPU units) via the (used|pool|avail) VCPU divided by the (currently cluster-wide) max vcpu_ratio. However, in the future we'll have variable vcpu_ratios, so we can't the calculation as such. We temporarily change to computing the average vcpu_ratio across the cluster, however long-term this needs to be improved, as ∑ (Vi/Pi) ≠ ∑ Vi / ∑ Pi. In the meantime we implement this patch to remove the use of a global mcpu variable. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
René Nussbaumer <rn@google.com>
-
Iustin Pop authored
Since the iPolicy contains the vcpu_ratio now, we can remove the per-node mCpu value (which was the initial way to set this attribute). Furthermore, we need to re-set the hiCpu value when changing the policy. And of course some associated unittest changes. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
René Nussbaumer <rn@google.com>
-