- Feb 29, 2012
-
-
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>
-
René Nussbaumer authored
Signed-off-by:
René Nussbaumer <rn@google.com> Reviewed-by:
Iustin Pop <iustin@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>
-
Iustin Pop authored
Adds an assert and fixes a typo. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Michael Hanselmann <hansmi@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 27, 2012
-
-
Iustin Pop authored
This checks to see if any man output has [em] in it, as that will not be correctly show in ASCII. Unfortunately the check will depend on whether the other man check is done, but I didn't want to introduce yet another short script for this (can be done, no issue). Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
Iustin Pop authored
I've seen that man pages, as generated by the version of pandoc we use, show single dashes in option names instead of double ones (- versus --). After bringing it up with upstream (http://groups.google.com/group/pandoc-discuss/browse_thread/thread/9c4589a4001d42f9/95ee8dae8932dc93 ), it seems that this is a known behaviour of pandoc that has been improved in newer versions. Until then, let's use correctly double dashes; from the two options in the above thread, I chose to use \-- as that doesn't change the actual output; whereas ``--nodes`` make this a code block, which will look differently from a short option and could change how the output looks (e.g. when in a bold span). Additionally, I've removed two cases where unescape em was explicitly intended, as that makes automated checking harder and we can use other formatting. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
Michael Hanselmann authored
Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Iustin Pop authored
Since we run the post-hooks explicitly in the Exec() function (via _RunPostHook) after we removed the target node from the config, we will get a: WARNING Node 'node2', which is about to be removed, was not found in the list of all nodes in the logs every time we remove a node. The patch just removes the warning, as actually invalid configurations (for the pre hook) will be checked correctly elsewhere. Additionally, the docstrings for BuildHooksEnv and BuildHooksNodes are corrected/switched. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
René Nussbaumer <rn@google.com>
-
- Feb 23, 2012
-
-
Michael Hanselmann authored
There's no need to verify the field definitions on every query. They are static for all intents and purposes anyway and verified at module load time. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
René Nussbaumer <rn@google.com>
-
- Feb 22, 2012
-
-
Michael Hanselmann authored
This splits even more parts of the request handling code into a separate class. Doing so allows us to reuse this part of the code for tests (e.g. mocks). Unlike before now the error handling can also be reused. The patch became a bit more convoluted than intended, but the end result is easier to read than the original code. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
René Nussbaumer <rn@google.com>
-
Michael Hanselmann authored
Like before this patch moves more functionality from the actual server class into a separate handler class. At the same time the function is changed to return both content-type and body instead of relying on a class attribute. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
Michael Hanselmann authored
Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
René Nussbaumer <rn@google.com>
-
Michael Hanselmann authored
Until now HTTP requests were handled in the same class as incoming connections (http.server.HttpServer). With this change the request handling is delegated to a separate class which can be re-used in tests without creating a socket, etc. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
René Nussbaumer <rn@google.com>
-
Michael Hanselmann authored
Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
René Nussbaumer <rn@google.com>
-
Michael Hanselmann authored
This has been deprecated since Ganeti 2.4 and hasn't been used by Ganeti's code since. I'm not aware of any external users. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
- Feb 21, 2012
-
-
Michael Hanselmann authored
Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
René Nussbaumer <rn@google.com>
-
René Nussbaumer authored
Signed-off-by:
René Nussbaumer <rn@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Michael Hanselmann authored
In at least two cases "%s" is replaced with str(), too. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Iustin Pop authored
On my workstation, if I run the following two tests in this exact order: - TestSingleFileEventHandler.testError - TestSingleFileEventHandler.testReplace the second test will fail, because there is no "unregister" of previous tests (and the poll() done by asyncore will fire on the previous files which are now removed, etc. etc.). While investigating this, I realised that we don't do any cleanup of the various handlers/notifiers we setup for this test, so if we simply add a proper cleanup, the tests will work nicely (in any order :). Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
René Nussbaumer <rn@google.com>
-
Iustin Pop authored
The fast that most classes don't override the @cvars means that direct references to FillOpcode can fail (they do on my workstation, but not on buildbot?). Anyway, for safety, it's best to qualify the name. Additionally a small typo is fixed. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
René Nussbaumer <rn@google.com>
-
Iustin Pop authored
… to make even more obvious what's the difference between a declared lock level with an empty list of locks and no lock level. 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:
Michael Hanselmann <hansmi@google.com>
-
Iustin Pop authored
Also change the meaning of group ndparams to mean the actual (not custom) nd params, and add custom_ndparams for the current meaning of ndparams. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
Iustin Pop authored
Strangely, these were not exported at all before. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
Iustin Pop authored
This will represent the instance (count) per spindle_count of their node(s). Debatable whether we need to add a per-instance spindle_weight. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
Iustin Pop authored
Currently this is not handled by Ganeti, just recorded. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
Iustin Pop authored
Currently, we only upgrade the ndparams if they are missing completely, which creates problems if we add any new parameters on an already-upgraded cluster. Fix this by adding an UpgradeNDParams function. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
Iustin Pop authored
Fix a typo, and cleanup the code a bit. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
- Feb 20, 2012
-
-
Michael Hanselmann authored
Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Michael Hanselmann authored
Only whitelisted opcodes may not have a result check. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
René Nussbaumer <rn@google.com>
-
Michael Hanselmann authored
This check verifies “iv_name” of all instance disks. If one is wrong (which shouldn't happen in the first place), cluster verification will warn: “ERROR: cluster: Instance 'inst.example.com' has wrongly named disks: name of disk 1 should be 'disk/1', but is 'disk/4'” Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com> Reviewed-by:
René Nussbaumer <rn@google.com>
-
René Nussbaumer authored
The result is a list of a list with elements with size of 2. Signed-off-by:
René Nussbaumer <rn@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
- Feb 17, 2012
-
-
Michael Hanselmann authored
To remove the last disk, or to add a NIC to the end, one can use the index -1. This wouldn't work as intended as “-” is a special prefix. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Michael Hanselmann authored
The function adds an ellipse if the string was actually truncated. Also start using it in mcpu for result checks (where the message is also slightly changed to use a colon). Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
René Nussbaumer <rn@google.com>
-
Michael Hanselmann authored
Forgot “enumerate”. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Michael Hanselmann authored
When modifications are made, disks may not have the same index anymore. Updating all disks fixes this. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
René Nussbaumer <rn@google.com>
-
Michael Hanselmann authored
When adding an item the index given to the callback function would be incorrect under certain conditions. This patch also adds assertions and more tests. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
René Nussbaumer <rn@google.com>
-
Michael Hanselmann authored
Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
René Nussbaumer <rn@google.com>
-