- Mar 22, 2012
-
-
Iustin Pop authored
The new shell tests do not succeed out-of-tree, due to static paths and other issues. This trivial patch fixes these issue, make distcheck now passes. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
Iustin Pop authored
This is more of a RFC… Basically most of the shell-based tests are converted from exec+grep to shelltestrunner. Things are not all fine and nice though: - we have dependencies between tests, as some generate some data files needed later; this is not nice, and we depend on serial execution in testrunner - we can still fail with no so nice messages in the offline-test script (when we generate most of the data) But overall, I think the tests are much nicer to define/read/debug: - each test is standalone, with the only dependency being an optional input data file; this is much better than a single monolithic shell script - in case of failures, the failure is clearly shown by shell test, both for exit code and stdout/stderr - shelltest can run in --debug mode, where the exact details are shown much better than the alternative of "set -x" for the shell script Comments welcome! Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
- Mar 21, 2012
-
-
Iustin Pop authored
A later, more complete patch, will allow selecting between either the Python version or the Haskell version. This is just a temporary solution to help building without all the needed Haskell libraries. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
Iustin Pop authored
Instead of using just shell constructs to run hpc-htools correctly (i.e. HTOOLS=role htools/hpc-htools …), let's add some shell fragments that do this for us. This will ease the running of tests directly. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
René Nussbaumer <rn@google.com>
-
- Mar 20, 2012
-
-
Iustin Pop authored
This currently has only one export function in it, which will be used for future bind address functionality in daemons. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Guido Trotter <ultrotter@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>
-
Iustin Pop authored
Sorry! Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
René Nussbaumer <rn@google.com>
-
- Mar 15, 2012
-
-
Iustin Pop authored
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
Using some hand-crafted files (manually modified from a real cluster running master branch), we test that hail behaves as we expect: doesn't load obvious wrong data, can do relocations/allocations, etc. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
René Nussbaumer <rn@google.com>
-
- Mar 14, 2012
-
-
Iustin Pop authored
With the new shell tests, we have for the first time the situation where tests require a binary built (via make), but the binary itself is not the test. Hence, we need to declare and use check_SCRIPTS for it. Also corrects a wrong file name (introduced during rebase/editing the patch series). The end result is that `make distcheck` now passes. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Michael Hanselmann <hansmi@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>
-
Iustin Pop authored
This is currently not installed anywhere, just built. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
Iustin Pop authored
This contains a more-or-less complete implementation for the server-side confd. Note that most of the code is behaving identical to the Python code, with a notable exception: the asyncore/inotify code was changed (since Haskell doesn't have asyncore) to 3-thread system. While otherwise I tried to keep the code flow identical, I found the original Python code not easily to reason about, and as such I changed the architecture in this regard. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
Iustin Pop authored
This is not complete for now, just the basic functionality has been implemented: - daemonize - check we're running under the correct user - call setup logging Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
Iustin Pop authored
This adds a dependency on hslogger 1.1+, which is not available in Debian Squeeze, only in later versions. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
Iustin Pop authored
This duplicates the lib/runtime.py functionality, allowing us to check for runtime users and groups consistency. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
Iustin Pop authored
This adds a dependency on the following new libraries: - Data.HMAC module from the 'crypto' library - Data.Text from the 'text' library - Data.ByteString from the 'bytestring' library In Debian, the bytestring library comes with the ghc compiler, whereas the other two are available separately in wheezy/unstable. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
Iustin Pop authored
While we have some of these as plain types in Constants.hs, we add proper ADT definitions for them in a new file. Furthermore, we add the ConfdRequest and ConfdReply types here (in Python they are in objects.py). Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
Iustin Pop authored
This only is able to load the configuration data for now. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
Iustin Pop authored
This is partial since not all object types can be easily converted for now (will need some changes on the Python side for this). Most importantly, the *Params types do not have a good solution now: the Python code, due to its dynamic typing, hides the fact that we actually have two different types at play: a full type which needs to have all keys, and the 'partial' type which has slightly different behaviour. I've implemented these in Haskell as two different types, Full* and Partial*, which are derived automatically from a single Parameter type, together with the associated Fill* functions. Furthermore, HVParams is even more special, as its contents is not fixed but varies per hypervisor type, plus it has the HV_GLOBALS part which should not be customisable at instance type (yay for exceptions). As such, this should be written in Haskell as a multi-constructor type, but it's the only one so far and thus we don't have support for it yet. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
- Mar 07, 2012
-
-
Iustin Pop authored
In case you just run "make htools/test" to recompile the unittests, the old .tix file should be removed, otherwise you get the message about inconsistent tick boxes. Let's make the compilation process automatically remove this, for easier testing. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Guido Trotter <ultrotter@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>
-
Iustin Pop authored
I've investigated more and it seems that .DELETE_ON_ERROR not working is a bug/regression in some versions of make; testing with make 3.82 from Debian experimental makes this special target work as expected. Also, make 3.81 works on trivial Makefiles, but not on our complex one. In the meantime, let's improve the fix for the building of man pages: make the removal implicit, instead of explicit, via the use of 'trap' on EXIT. I just hope this behaves consistently across all bash versions :) Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
René Nussbaumer <rn@google.com>
-
- Feb 29, 2012
-
-
Iustin Pop authored
Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Michael Hanselmann <hansmi@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
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 20, 2012
-
-
Iustin Pop authored
Automake 1.11.2 made the following change: * Long-standing bugs: - Automake now warns about more primary/directory invalid combinations, such as "doc_LIBRARIES" or "pkglib_PROGRAMS". Unfortunately, this breaks our Makefile.am (issue 216) exactly because we were relying on pkglib_SCRIPTS. This patch works around this by adding a new myexeclibdir variable (exec so that it is intalled at `install-exec` time, the same as the pkglibdir), and switches to that. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
- Feb 15, 2012
-
-
Iustin Pop authored
Sorry, forgot this in previous commit. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
Iustin Pop authored
The vgreduce command has changed behaviour from when we initially wrote the code (2.02.02 versus 2.02.66, 4 years delta): - if there are LVs which will be impacted, it requires --force - otherwise refuses to proceed, but it still returns exit code 0 We handle this by looking to see if it returns "Wrote out consistent volume group" (behaviour unchanged), or if it complains about "--force"; in the case it didn't complete, we retry the operation. We improve a bit the checking of "vgs", as it uses to fail silently and we didn't detect it. New tests for this function should test, I believe, all the expected variations; at the least we now have data files with the expected output. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
Michael Hanselmann authored
These can be used by third-party code to verify mock code. Further work on mocks is forthcoming, so this is only a start. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com> Reviewed-by:
René Nussbaumer <rn@google.com>
-
- Jan 26, 2012
-
-
Bernardo Dal Seno authored
Some Python scripts in /usr/lib/ganeti/ were getting the wrong permissions (their 'x' bit was cleared). This patch fixes that behavior. This patch renames the variable 'dist_tools_PYTHON' to 'python_scripts'. Some Python scripts were listed in the 'dist_tools_PYTHON' variable, but as said scripts have no .py extension in their names, Automake treated the scripts as data files, and hence no 'x' bit. Now the Python scripts are processed by the rules created for the 'dist_tools_SCRIPTS' variable, and such rules don't depend on file name extensions. Signed-off-by:
Bernardo Dal Seno <bdalseno@google.com> Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Iustin Pop <iustin@google.com> (cherry picked from commit cc120286)
-
- Jan 24, 2012
-
-
Michael Hanselmann authored
While debugging an issue recently I had the pleasure of looking at a long, single-line string of JSON data. This simple utility makes it possible to format such data into a readable format. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
- Jan 16, 2012
-
-
Iustin Pop authored
… a mini-module, actually. This is only done for unit-testing, as we don't want to duplicate the personalities list in the tests. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
René Nussbaumer <rn@google.com>
-
Iustin Pop authored
This simplifies the building of profiling-enabled htools binaries; there are two targets, one used for the initial two-stage build, and one that can be used for incremental builds. The patch adds a new internal variable for the htools/test binary, which should also simplify custom builds for the non-profiling targets. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
René Nussbaumer <rn@google.com>
-
- Jan 13, 2012
-
-
Iustin Pop authored
The 'Result' type is common and: - might be used outside of HTools-specific code too - is better split as we need these basic types for building the more complex ones in Types.hs Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
René Nussbaumer <rn@google.com>
-
- Jan 06, 2012
-
-
Guido Trotter authored
This of course was working for all the rcs, but broke with 1.0 itself. In addition: - split between running kvm --version and parsing its output - unittest parsing for various known --help outputs - updated NEWS file - happy 2012 wishes - the hope to finish this patch before it's time to say happy easter :) Signed-off-by:
Guido Trotter <ultrotter@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
- Dec 22, 2011
-
-
Bernardo Dal Seno authored
autotools/testrunner was missing in distcheck. Now some changes from 70041061 have been reverted, and testrunner is not built anymore. coverage now uses fakeroot when needed. Signed-off-by:
Bernardo Dal Seno <bdalseno@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-