- Oct 11, 2012
-
-
Iustin Pop authored
While grepping for htools imports in the non-htools subdirectory, I saw that our haddock prologue and title are very very old and refer to the old htools-only state. Let's cleanup a bit… Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
Iustin Pop authored
This patch removes the last HTools module imports from non-htools code (the HTools.Types module), but it requires an associated cleanup: using luxi-specific constants for luxi timeouts (the only effect is that one timeout decreases from 15 to 10, the default value in the python code), and moving of the (now) RAPI specific constants to RAPI.hs (which allows simplifying their type/usage). Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
Iustin Pop authored
This patch cleans up duplicate code in Test.Ganeti.Query.Filter and then adds a test for names consistency with Python's code behaviour (stable ordering for simple filters and otherwise niceSort'ed ordering). Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
Iustin Pop authored
… and also use it to simplify 'needsLiveData'. Additionally, add an explicit export list to Ganeti.Query.Types, since otherwise we'd (re)export all imported symbols. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Agata Murawska <agatamurawska@google.com>
-
Iustin Pop authored
This switches gnt-node/gnt-group (and their equivalent RAPI resources) to go over the query socket. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
Iustin Pop authored
This patch adds support for classic-style queries (before query2) to the query socket server. The patch is rather trivial, since as in Python we just piggy-back on the query2 implementation. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Agata Murawska <agatamurawska@google.com>
-
Iustin Pop authored
And associated unittests. This will be needed for classic-style queries. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
Iustin Pop authored
When initially implementing the node query, I thought the 'powered' field is a representation of the run-time powered status, which would make its query complex. In reality, it's a simple config query, which we can support easily. We also add a small helper, so that we don't hardcode the RSUnavail case in many places. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Agata Murawska <agatamurawska@google.com>
-
Iustin Pop authored
We don't add a type class for fully-generic handling, but we do abstract the duplicate part. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Agata Murawska <agatamurawska@google.com>
-
Iustin Pop authored
… and use it in the Query implementation, removing the last non-correct query field for Groups. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
Iustin Pop authored
This makes the "all" names queries consistent with the Python results. The change requires updating the unittests, at which point a duplicate error message is simplified. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
Iustin Pop authored
We do this not quite generically, which means we have to add another layer in the call chain, and rename the current query function, plus add special-case code for each query type. Hopefully we will be able to improve on this in the future. A (good) side effect of this patch is that we get the desired ordering when names are requested, matching the Python code. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Agata Murawska <agatamurawska@google.com>
-
Iustin Pop authored
This replicates in the Haskell Query2 implementation the behaviour of the Python code: if a "simple" filter is passed (one that contains only Or aggregators and EQ binary ops on the name field), then an failure is flagged if the given values are not known. Our implementation is pretty straightforward, with a few details: - we ignore any NumericValues passed, since that inconsistency will be flagged by the filter compiler - we return an the non-normalized names from the getRequestedNames function, and not the fully-normalized ones; this will be done later in individual query functions - we test a few of the desired behaviours of the above-mentioned function Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Agata Murawska <agatamurawska@google.com>
-
Michael Hanselmann authored
/etc/hosts is a bit special as it's a system-wide file and the virtual cluster/node root doesn't apply. The modification of /etc/hosts should be disabled in virtual clusters. If it isn't, however, the vcluster functions would raise an exception complaining about a path outside of the virtual node root. This patch adds a whitelist to exclude /etc/hosts. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Michael Hanselmann authored
… use a constant instead. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Michael Hanselmann authored
- Simplified shell command for adding hosts, too - The exception handling is also improved by re-raising any exceptions instead of swallowing qa_error.Error Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Michael Hanselmann authored
There is a constant for this purpose. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Michael Hanselmann authored
Needed for coming patches. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@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>
-
Michael Hanselmann authored
* devel-2.6: verify-disks: Explicitely state nothing has to be done Add list of design documents implemented in version 2.6 Better list of replace-disks arguments + typos fixed jqueue: Look at archived jobs when watching Show old primary/secondary node on disk replacement gnt-instance reinstall: Don't always exit with success LUClusterVerify: Ignore /proc/drbd if DRBD is disabled Fixed typos in devnotes.rst Always_failover doesn't require --allow-failover anymore bash_completion: Enable extglob while parsing file rpc: Remove duplicated logic, fix unittests Annotate disk params on instance_start cmdlib: Handle locking.ALL_SET correctly when copying locks Conflicts: Makefile.am: Sorted file lists autotools/build-bash-completion: Compact output lib/rpc_defs.py: instance_start changed on both sides qa/qa_instance.py: Modified on both sides test/ganeti.cmdlib_unittest.py: Tests added on both sides Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Michael Hanselmann authored
* stable-2.6: verify-disks: Explicitely state nothing has to be done Add list of design documents implemented in version 2.6 Better list of replace-disks arguments + typos fixed jqueue: Look at archived jobs when watching Show old primary/secondary node on disk replacement gnt-instance reinstall: Don't always exit with success LUClusterVerify: Ignore /proc/drbd if DRBD is disabled Fixed typos in devnotes.rst Always_failover doesn't require --allow-failover anymore bash_completion: Enable extglob while parsing file rpc: Remove duplicated logic, fix unittests Annotate disk params on instance_start cmdlib: Handle locking.ALL_SET correctly when copying locks Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Michael Hanselmann authored
This provides a convenience option to include archived jobs in the output list. It's equivalent to using “-o +archived”, but tab completion is nicer. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Michael Hanselmann authored
If requested via a filter or by including the “archived” output, archived jobs will be loaded and shown. This is significantly slower than just listing normal jobs, therefore by default they are not loaded at all. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Michael Hanselmann authored
All data kinds (used to restrict the data collected) referenced in a filter can be requested once it's been “compiled”. However, the kinds of fields used in boolean expressions (e.g. ["?", "xyz"]) were not recorded. This patch changes the code accordingly and provides a unit test update. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Michael Hanselmann authored
This attribute is set to True for jobs which were restored from an archived file. A new filter will act on this field. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Michael Hanselmann authored
The description was not accurate. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
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
Example output: $ gnt-cluster verify-disks Submitted jobs 4327 Waiting for job 4327 ... No disks need to be activated. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@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>
-
Michael Hanselmann authored
Each version should have its dedicated list. 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>
-