- Nov 20, 2012
-
-
Iustin Pop authored
Currently, the cluster verify errors are defined as follows: CV_ECLUSTER_FOO = (TCLUSTER, "ECLUSTER_FOO", "description") This means there's no standalone name for the string "ECLUSTER_FOO", which makes it hard to derive automatically a type for this union in Haskell. There are three possible fixes: - manually separate the CV_ECLUSTER_FOO_STR = "ECLUSTER_FOO" in constants.py - manually extract the strings in Haskell code - change convert-constants to automatically export virtual constants for those After discussion on IRC, I've taken the latter approach; even though a bit hack-ish, it avoids manual work and potential errors. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
- Nov 14, 2012
-
-
Michael Hanselmann authored
This is similar to commit f5ce7613. A stable sort order makes changes between versions easier to find. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
- Oct 22, 2012
-
-
Michael Hanselmann authored
- Debian Squeeze and up have a package named “python-coverage”, but it doesn't use the same binary name as upstream (“coverage”). - Said package includes a patch to use symlinks instead of file copies for jQuery. If files from previous runs are around, an exception is raised. This is fixed by removing all regular files and symlinks before generating a report. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
- Oct 11, 2012
-
-
Iustin Pop authored
These will be needed for the serialisation of errors. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
Michael Hanselmann authored
This part of the code was duplicated by accident. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
- Oct 10, 2012
-
-
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>
-
- Oct 08, 2012
-
-
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 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
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>
-
- Oct 02, 2012
-
-
Bernardo Dal Seno authored
Tests that depend on fakeroot were not distributed in the tarball created by "make dist" when fakeroot was missing. Now all tests are distributed, and a warning is printed when a test requires fakeroot but fakeroot is missing. Signed-off-by:
Bernardo Dal Seno <bdalseno@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
- Sep 27, 2012
-
-
Michael Hanselmann authored
In older versions of GNU Bash extended patterns, such as “@(…)”, are only available with the “extglob” shell option. As pointed out in [1] and [2], “extglob” must be enabled while parsing the code. Therefore the flag must be enabled at the beginning of the script and be reset to its original value at the end as to not interfere with other code on shell initialization. [1] http://unix.stackexchange.com/questions/45957 [2] http://mywiki.wooledge.org/glob Reported by Sascha Lucas. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Bernardo Dal Seno <bdalseno@google.com> Reviewed-by:
Iustin Pop <iustin@google.com> (cherry picked from commit 893ad76d)
-
- Sep 26, 2012
-
-
Iustin Pop authored
This patch ties together the previous commits, by extending build-bash-completion to call all htools scripts and get their completion information, then use that to build fake cli_options representing them and finally generate the bash completion information. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
- Sep 25, 2012
-
-
Michael Hanselmann authored
In older versions of GNU Bash extended patterns, such as “@(…)”, are only available with the “extglob” shell option. As pointed out in [1] and [2], “extglob” must be enabled while parsing the code. Therefore the flag must be enabled at the beginning of the script and be reset to its original value at the end as to not interfere with other code on shell initialization. [1] http://unix.stackexchange.com/questions/45957 [2] http://mywiki.wooledge.org/glob Reported by Sascha Lucas. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Bernardo Dal Seno <bdalseno@google.com>
-
Michael Hanselmann authored
This reverts commit 94014b63. Turns out I misunderstood the “extglob” shell option. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Bernardo Dal Seno <bdalseno@google.com>
-
- Sep 19, 2012
-
-
Michael Hanselmann authored
First the numbers: $ stat --format '%s %n' doc/examples/bash_completion* 77847 doc/examples/bash_completion 86492 doc/examples/bash_completion-debug The non-debug version doesn't use indentation and does not have some (primitive) facilities for debugging. The savings are about 8.5 kB or 10 %. The “-debug” version is used by “devel/upload”. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
René Nussbaumer <rn@google.com>
-
Michael Hanselmann authored
In older versions of GNU Bash extended patterns, such as “@(…)” are only available with the “extglob” shell option. This patch adds a wrapper function so that extglob is always enabled while doing any completion. Due to early returns inside the main completion function this seemed like the best option. Reported by Sascha Lucas. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Bernardo Dal Seno <bdalseno@google.com>
-
- Sep 18, 2012
-
-
Michael Hanselmann authored
Future changes will change Path.hs to use an environment variable. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Michael Hanselmann authored
File system paths moved from constants to pathutils. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
- Sep 04, 2012
-
-
Iustin Pop authored
This moves the last (I think) htools-related bits out of test/ under htest/. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
René Nussbaumer <rn@google.com>
-
Iustin Pop authored
This is the first commit of a series that will attempt to cleanup the test code organisation, which evolved somewhat organically from the initial pure htools functionality. The proposed organisation of the tree will be as follows: - htools (or maybe renamed to haskell or hs): only production code - htest: top-level test directory, containing test.hs, static helper scripts, etc. - htest/Ganeti/*.hs: modules implementing the actual test properties and test cases for the correspondingly-named production code modules - htest/data: containing test data files for the test cases This particular patch moves all the test code (test.hs, hpc-htools.hs symlink) and helper scripts (offline-test.sh, etc.) from htools/ to htest/, while updating the files themselves (if they had paths mentioning htools/), .gitignore and the Makefile. The only special mention is that in Makefile, we used to have a BINARY shell variable in binary build rule; that was computed via stripping `htools/' prefix; I've cleaned that and replaced with $(notdir $@); even though it's duplicated a few times, it leads to more readable make output (and easier to copy-paste). Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Agata Murawska <agatamurawska@google.com>
-
- Sep 03, 2012
-
-
Iustin Pop authored
This enhances convert-constants to not flatten dicts completely, but also generate a so-called association list for them. This allows either direct use of the 'lookup' function, or (for performance) conversion to Data.Map and optimised lookup later. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Agata Murawska <agatamurawska@google.com>
-
Iustin Pop authored
While looking at the hypervisor types in Constants.hs, I saw that the 'hyperTypes' list is using strings instead of names. This is due to the fact that we require the entire elements in the list to be identified (homogeneous lists), but the string "xen-pvm" is declared by both 'defaultEnabledHypervisor' and 'htXenPvm'. We can improve convert-constants by adding a list of names that we know (statically) don't declare, but instead reuse values. Unless we have an ADT parser, this is the best we can do, I think. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Agata Murawska <agatamurawska@google.com>
-
- Aug 28, 2012
-
-
Iustin Pop authored
Since these will be needed for Haskell's implementation of query2. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Agata Murawska <agatamurawska@google.com>
-
- Aug 23, 2012
-
-
Iustin Pop authored
Debian Wheezy will ship with this version, and it has many improved checks compared to 0.6, so let's: - bump version in the docs - silence some new checks that are wrong due to our indent=2 instead of 4 - fix lots of errors in the code where the indentation was wrong by 1 or 2 spaces - fix a few cases of == True, False, None and replace with 'is' - re-indent some cases where the code is OK, but pep8 complains Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
René Nussbaumer <rn@google.com>
-
- Jul 23, 2012
-
-
Iustin Pop authored
Currently, the order of commands in the bash completion file is random, because the sub-commands are not sorted. This makes it harder to investigate the differences in packaged Ganeti or in installed Ganeti, since chunks in this file will have a random order. To fix this, we sort the subcommands based on the first subcommand in a given group ('first' also in sorted order); this results in a stable contents of file, as tested by building it many times and checking for differences. The patch also does a few other minor changes to the file (e.g. updating copyright years, etc.). Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
- May 22, 2012
-
-
Iustin Pop authored
Allow all errors to be displayed, instead of aborting at the first one, and don't show stacktraces anymore. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
René Nussbaumer <rn@google.com>
-
Iustin Pop authored
This is trivial, but should prevent such things in the future. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
- May 07, 2012
-
-
Iustin Pop authored
This adds a bit of dumb mapping of values to names, while trying to be safe. This is the best we can do without resorting to parsing or interpreting ASTs. The difference in the output is: -- | Converted from Python list or set ADMINST_ALL adminstAll :: [String] -adminstAll = ["down", "offline", "up"] +adminstAll = [adminstDown, adminstOffline, adminstUp] Since for most such values we use strings, we don't gain in type safety on the Haskell side. But it makes the output more readable and it might open up other opportunities later. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
Iustin Pop authored
This add support for exporting constants from multiple modules (as opposed to hard-coding constants), and also makes the output more readable by skipping things we know for sure we don't want to convert (as opposed to things we would like to but don't know _how_ to convert). Additionally, we export the constants from the luxi module too. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
- May 04, 2012
-
-
Michael Hanselmann authored
Until now “TestRunIf” and “TestEnabled” could only handle AND. With this patch a new class named “Either” is added to “qa_config” and allows OR. The name “Either” was chosen instead of “Or” as the latter is very close to the reserved keyword “or”. Examples: ["rapi", Either(["instance-rename", "instance-reboot"])] Either(["node-list", "instance-list", "job-list"]) Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
- Apr 26, 2012
-
-
Michael Hanselmann authored
This script shows a few examples on how to use the RAPI input test client. It is also run at “make check” time to ensure it's not completely broken. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
René Nussbaumer <rn@google.com>
-
- Mar 19, 2012
-
-
Iustin Pop authored
This is a stupid/trivial patch. I didn't realise when adding htools-hpc that this will "break" tab completion on htools; as in, I will have to add / manually always when completing files on the command line. So to fix my laziness, let's rename htools-hpc to hpc-htools, eliminating this completion conflict. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
René Nussbaumer <rn@google.com>
-
- Mar 13, 2012
-
-
Iustin Pop authored
This allows the offline tests to also generate coverage data, and the hs-coverage target is changed to show both unit-test and offline-tests coverage. The downside is that now we build yet-another-binary, which makes the unit-test time slower… Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
René Nussbaumer <rn@google.com>
-
Iustin Pop authored
This enables the offline-test.sh run both in the special "hs-check" rule and during normal "make check". Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
René Nussbaumer <rn@google.com>
-
- Mar 05, 2012
-
-
Iustin Pop authored
This moves the dashes check to a new check-man-dashes script. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
René Nussbaumer <rn@google.com>
-
Iustin Pop authored
Currently the check-man test is dependent on the MAN_HAS_WARNINGS test, which made sense as long as the script only did the warnings check. However, we should run the [em] tests always, and in general we could run other tests too, even if man doesn't support --warnings; so let's split the check man. As a first prerequisite, we rename check-man to check-man-warnings (and the respective Makefile variables). Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
René Nussbaumer <rn@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>
-
- Jan 13, 2012
-
-
Iustin Pop authored
This is a trivial conversion. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
René Nussbaumer <rn@google.com>
-
Iustin Pop authored
Unfortunately, we only support lists of simple types, and not even lists of tuples. If we actually needed those, it would be possible to implement them, with a bit more complexity in the converter. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
René Nussbaumer <rn@google.com>
-