- Oct 11, 2012
-
-
Iustin Pop authored
Sorry, this should have went in b0dcdc10, but I forgot it. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
Michael Hanselmann authored
This patch adds some unit tests for “gnt-cluster epo”. Not everything is covered, but at least the bug fixed in the previous patch is. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
- Oct 10, 2012
-
-
Iustin Pop authored
The disk free/total values are optional ones, wrapped in a Maybe, so we shouldn't directly serialise them. In order to simplify the embedded extraction, we add a small helper function. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Agata Murawska <agatamurawska@google.com>
-
Dato Simó authored
Signed-off-by:
Dato Simó <dato@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Iustin Pop authored
The usage of that variable was removed in 45a36f36, but accidentally the enumerate() was left in. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
Iustin Pop authored
We need to only query the default (first enabled) hypervisor, not all hypervisors. For this, we need to add a manual check to ensure that we don't have a corrupt config (there's no "NonEmptyList" type…). Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
Iustin Pop authored
The String parameter to 'nodeLiveFieldExtract' is the query2 field name, not the RPC-layer field name. Grrr for not having a real data type for this. Furthermore, we add some safety check that we don't return JSNull via rsNormal… Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Agata Murawska <agatamurawska@google.com>
-
Iustin Pop authored
This patch cleans up the Haskell library detection and defaults. First, it makes the base compiler/libraries required, per the email discussion. It then adds two new small autoconf macros, on to check for a required Haskell library and one to do custom action based on test results. We use these macros to cleanup and simplify a bit the module detection: - rapi, confd, and split query are auto detected and enabled if _all_ required libraries are present - unittests are enabled if _all_ required libraries are present The patch also updates the documentation regarding required libraries. After this patch, base Ganeti fully buildable on Debian Squeeze/Ubuntu Lucid. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
Iustin Pop authored
This patch makes regex-pcre optional, allowing its disable via a preprocessor define NO_REGEX_PCRE. This define will be added to config.ac/Makefile.am in the next patch. The patch also changes multi-line strings into string concatenation, due to limitations with the CPP language extension. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
Michael Hanselmann authored
Updating the “node_query_list” variable would fail if no arguments were passed and the “--all” option wasn't specified. A follow-up patch will add unit tests. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
- Oct 09, 2012
-
-
Iustin Pop authored
We try to automatically enable the htools-rapi and split query (if confd and htools-rapi are enabled) options. This is our intended default configuration, and allows easier test of the new code path. Further cleanups for checking whether confd can be enabled will come later. The move block is due to the fact that we first have to check for htools-rapi, and only then we can auto-enable the feature. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
Iustin Pop authored
This exception is documented to have three arguments, but in one case we raise it with a simple string argument. Let's fix that. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
Iustin Pop authored
It seems a few of the error classes are no longer used: - LVMError, deprecated in 8c5533a5 (before ganeti 1.2.2!) - ConfdRequestError, deprecated in b0dcdc10 - SshKeyError, introduced in the initial open source commit but never used (⁈) Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
- Oct 08, 2012
-
-
Helga Velroyen authored
Signed-off-by:
Helga Velroyen <helgav@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Iustin Pop authored
This patch adds a NiceSort equivalent and the corresponding unittest (partially copied from Python unittest). The difference between the Python version and this one is that this implementation doesn't use regular expressions, and as such it doesn't have the 8-groups limitation. The key-based version is separate from the non-key one (since we don't have default arguments in Haskell), and is tested less in its absolute properties but only that it is identical to the non-key version under some transformations (the non-key version is much more tested). This will be needed later in query name sorting. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
Michael Hanselmann authored
utils.IsBelowDir is actually tested and doesn't allow writes to “…/queue*”, like the old code here did. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Michael Hanselmann authored
An error like “invalid literal for int() with base 10” can be quite confusing. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Bernardo Dal Seno authored
Bug introduced in commit cc4b14f0: Part of a statement was missing. This makes pylint-qa fail. Signed-off-by:
Bernardo Dal Seno <bdalseno@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
Iustin Pop authored
As I wrote during/after the review on commit 2958c56e, “ganeti-cleaner: Separate queue cleaning code”, while I appreciated the permission separation, I didn't like too much the file-based approach: - it is a very simple script, and lots of the code is duplicated between the two; I wouldn't like to see "ganeti-vmcapable-cleaner", "ganeti-master-candidate-cleaner", etc. in the future - ganeti-master-cleaner "pollutes" the namespace, creating tab-completion conflicts with ganeti-masterd This patch simply merges the master-cleaner back into cleaner, while keeping the separate user permissions scheme, separate log files, etc. Additionally, it fixes two bugs in the unit-test (not run with set -u and wrong path in the master-cleaner log files test; yay for even worse safety than Python?). And finally, since we have now support for --help-completion, it adds bash completion support for this script :) (needs to be applied on top of my argument support patch series). Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
Iustin Pop authored
This was a very very thin man page; this patch expands it a bit, but it could use more help still. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
Iustin Pop authored
This allows the command completion to treat them as separate option types; this is not useful in build-bash-completion right now, but might become so in the future. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
Iustin Pop authored
This requires a few tiny changes to build-bash-completion and to Makefile rules, but is straightforward. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
Iustin Pop authored
This defines the arguments supported and then modifies the --help-completion output to include them too. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
Iustin Pop authored
Beside parsing the arguments as well, we also change the serialisation format for choices/suggests, to make the Python code simpler. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
Iustin Pop authored
This extends the current option-only support with support for arguments too. They are serialised without a without the prefix (so just with the type) and the min/max ranges (max="none" for unlimited). A few new option types have been added as well. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
Iustin Pop authored
A lot of the lists in Makefile.am were not sorted properly (or at all); let's sort them for more sanity. Additionally, check-local used to spew this big shell block, even though it does emit nice messages when failing, so we don't need to show the code; let's silence it (@). Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
Iustin Pop authored
This was missing so far… Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
Iustin Pop authored
Newer GHC refuses to allow "-O" with interactive mode, so let's filter that out. Furthermore, sometimes you don't have a clean tree exactly when you need to look up something/update the tags, so let's filter out the "-Werror" too. And finally, we need to pass the actual exact flags (including nocurl, parallel, etc.) that we use for building, so let's add those too. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
Iustin Pop authored
This is a leftover from the times when we had a single, huge test module; nowadays it's only an annoyance. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
Iustin Pop authored
This is, I believe, the last non-htools specific file that still lived in the htools directory; it's already widely used in non-htools code, so let's move it before we add more functionality to this module. All changes are related to the name change, imports fixup, etc.; there are no other changes in this patch. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
- Oct 05, 2012
-
-
Michael Hanselmann authored
My local pylint didn't complain. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Bernardo Dal Seno <bdalseno@google.com>
-
Michael Hanselmann authored
This makes differences show up in “gnt-cluster verify”. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Bernardo Dal Seno authored
Updated the man pages for the commands that accept an iallocator: "." means the default iallocator. Signed-off-by:
Bernardo Dal Seno <bdalseno@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
Bernardo Dal Seno authored
QA for recreate-disk and replace-disks now run also with the default iallocator. Signed-off-by:
Bernardo Dal Seno <bdalseno@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
Bernardo Dal Seno authored
"gnt-instance replace-disks" now behaves like the other commands, and uses the default iallocator when "." is passed as the iallocator parameter. Signed-off-by:
Bernardo Dal Seno <bdalseno@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
Bernardo Dal Seno authored
Now "gnt-instance recreate-disks" uses the default iallocator when "." is specified as the iallocator. For uniformity, the same behavior applies to these commands: gnt-node evacuate gnt-instance migrate gnt-instance add "." is used instead of "default" becuse the latter could be a valid name for an iallocator. Signed-off-by:
Bernardo Dal Seno <bdalseno@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
Michael Hanselmann authored
- LoadAllowedFileStoragePaths: Loads a list of allowed file storage paths from a file - CheckFileStoragePath: Checks a path against the list of allowed paths The unit test for “utils.IsBelowDir” is updated with cases which weren't tested before. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Michael Hanselmann authored
First: This enables the use of “gnt-job watch $id” for archived jobs. Now, the reason for actually making this work is that during sufficiently large group or node evacuations jobs are archived before the client gets to poll for their output. This led to situations where the jobs would finish successfully, but the client reported an error because it couldn't see the job anymore. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Bernardo Dal Seno <bdalseno@google.com>
-
Bernardo Dal Seno authored
Partitioned Ganeti allows to assign node resources in an exclusive manner, in order to limit interference between instances running on the same nodes. Signed-off-by:
Bernardo Dal Seno <bdalseno@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
Michael Hanselmann authored
If normal file storage was disabled but shared storage enabled, “_TransformFileStorageDir” would still throw an exception. in “opcodes._CheckStorageType” there's also a check, but I wasn't quite sure what the correct way of handling it was, so I added a TODO comment. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-