- Dec 27, 2012
-
-
Iustin Pop authored
This is the first step of the test files reorganisation: moving test/* (except test/data) to new directory test/py/. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
- Oct 11, 2012
-
-
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>
-
- Sep 28, 2012
-
-
Michael Hanselmann authored
Some parts of the code still use a hardcoded user name: root. This patch replaces all with a constant specified at build time. The end goal is to make it possible to run a Ganeti cluster without any special privileges (of course this will prevent some functionality from working). Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
- Sep 12, 2012
-
-
René Nussbaumer authored
This makes it possible to better untangle the IAllocator code, which would otherwise lead to a recursive import structure as we need those helpers there as well. Signed-off-by:
René Nussbaumer <rn@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
- Aug 07, 2012
-
-
Iustin Pop authored
This has been a long-standing cleanup item, which we've always refrained from doing due to the high estimated effort needed. In reality, it turned out that after some infrastructure improvements (the previous patches), the actual job queue-related changes are quite small. We will need to update the NEWS file later, but so far the RAPI documentation doesn't mention that the job ID is a string (it only says it is "a number"), so it doesn't look like it needs update. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
René Nussbaumer <rn@google.com>
-
Iustin Pop authored
This patch removes/abstracts some hardcoded values in the jqueue unittests. Currently we have a per-resource type name field, but the name field values are hardcoded at the call sites, instead of being abstracted into separate variables. This will become a problem later, so let's just introduce some new vars holding these; modifying the tests later will be therefore easier. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
René Nussbaumer <rn@google.com>
-
- Jun 15, 2012
-
-
Michael Hanselmann authored
This patch adds the necessary conversions for comparing split timestamps (such as used by jobs) and job IDs (by defining custom converters). Unittests are included. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
René Nussbaumer <rn@google.com>
-
- Jun 14, 2012
-
-
Michael Hanselmann authored
These can be used, for example, to get jobs submitted after a certain timestamp. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
- May 14, 2012
-
-
René Nussbaumer authored
Signed-off-by:
René Nussbaumer <rn@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
- May 11, 2012
-
-
René Nussbaumer authored
Signed-off-by:
René Nussbaumer <rn@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
- Apr 19, 2012
-
-
Michael Hanselmann authored
This solves one case where locks are acquired during LUXI queries. Pretty late into the transition I noticed that OpBackupQuery had a “use_locking” parameter for a long time, but didn't use it. Since most of the other changes were already and this allows exports to be listed via RAPI (/2/query) I decided to finish. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
- Mar 30, 2012
-
-
Michael Hanselmann authored
I missed these among some shelltest-related failures. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
René Nussbaumer <rn@google.com>
-
- Feb 21, 2012
-
-
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>
-
- Dec 08, 2011
-
-
Agata Murawska authored
Signed-off-by:
Agata Murawska <agatamurawska@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
- Nov 22, 2011
-
-
Guido Trotter authored
Signed-off-by:
Guido Trotter <ultrotter@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
- Nov 16, 2011
-
-
Agata Murawska authored
Signed-off-by:
Agata Murawska <agatamurawska@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Agata Murawska authored
Signed-off-by:
Agata Murawska <agatamurawska@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
- Nov 07, 2011
-
-
Michael Hanselmann authored
Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
René Nussbaumer <rn@google.com>
-
- Oct 12, 2011
-
-
Iustin Pop authored
We currently use 'filter' as the OpCode, QueryRequest and RAPI field name for representing a query filter. However, since 'filter' is a built-in function, we actually have to use filter_ throughout the code in order to not override the built-in function. This patch simply goes and does a global sed over the code. Due to the fact that the RAPI interface already exposed this field, we add compatibility code for now which handles both forms. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
- Aug 02, 2011
-
-
Michael Hanselmann authored
These will be very useful for ganeti-watcher as it needs to retrieve instances by group. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
- Apr 18, 2011
-
-
Michael Hanselmann authored
These were not available as a query field before. Update unittests and description text for the other “..params” fields. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
- Apr 05, 2011
-
-
Michael Hanselmann authored
So far this operator was not implemented. This patch adds an additional value preparation function to the function table for binary operators, used to compile the regular expression. Unittests are included. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
René Nussbaumer <rn@google.com>
-
- Mar 14, 2011
-
-
Michael Hanselmann authored
Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
- Mar 07, 2011
-
-
Michael Hanselmann authored
The “?” operator is the equivalent of “if var” in Python. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
- Mar 02, 2011
-
-
Michael Hanselmann authored
If the client/caller would specify names through the use of a filter, the result would be sorted. This is a regression over earlier Ganeti versions and verified in QA. This patch adds an optional parameter to control the sorting and provides unittests. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
René Nussbaumer <rn@google.com>
-
- Mar 01, 2011
-
-
Michael Hanselmann authored
This patch adds a “compiler” for query filters, converting them to a callable function used while preparing the query result. In addition, a hints call allows some analysis to be done on the query (e.g. referenced names), making data collection more efficient. The depth of filters is limited to avoid exceeding the runtime's maximum recursion depth. More operators and other improvements can be implemented using this base. Extensive unittests are provided. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
René Nussbaumer <rn@google.com>
-
Michael Hanselmann authored
Some fields (e.g. “name”) should be treated specially when comparing for equality. Hypervisor names should use normal rules, but for node names, “node2” should be equivalent with “node2.example.com”. To make these differences, a new field for flags is added to the query fields. It is not added to ”objects.QueryFieldDefinition” (the first item) as it would be exported to clients, something not desired for these internal rules. Instead, an additional field is added. Other special rules, e.g. “a list of strings” for an instance's secondary nodes, can be implemented as flags, too. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
René Nussbaumer <rn@google.com>
-
- Feb 28, 2011
-
-
René Nussbaumer authored
This patch covers the testing of _GetNodePower of query.py not only for unavailable but also for OOB support and returning the right node.powered. Signed-off-by:
René Nussbaumer <rn@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
- Feb 24, 2011
-
-
Michael Hanselmann authored
- Make “doc” parameter to MakeField non-optional - Add descriptions for all fields Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
René Nussbaumer <rn@google.com>
-
- Feb 23, 2011
-
-
Michael Hanselmann authored
Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Michael Hanselmann authored
They've been hardcoded for too long. 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
Commit e431074f introduced an uncatched bug. This patch fixes this. The set is expecting a list or iteratable to work on, so it splitted the provided instance name into a set of characters. This caused the exp_status never been set and therefore not catched in one assert rule further below who checks that every status was tested. Signed-off-by:
René Nussbaumer <rn@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>
-
- Feb 17, 2011
-
-
Iustin Pop authored
Since we don't have the data per design, UNAVAIL is appropriate here, while NODATA is not. The patch also adds a comment: if we extend the live fields list to contain other data in the future, we need to reevaluate this solution. This should fix issue 143. The listing now shows (node2==ofline, node3==not vm_capable): Node DTotal DFree MTotal MNode MFree Pinst Sinst node1 698.6G 630.5G 32.0G 1.0G 30.0G 8 7 node2 (offline) (offline) (offline) (offline) (offline) 9 4 node3 (unavail) (unavail) (unavail) (unavail) (unavail) 0 0 Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
- Jan 28, 2011
-
-
Michael Hanselmann authored
This makes it possible to get the console information via a LUXI query. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
René Nussbaumer authored
If for some reason (e.g. failed migration) one instance is running on multiple nodes the output can become inconsistent. To get that error and make it consistent between runs we make the call on the secondary too and look if it's running there. If so we report the instance as ERROR_wrongnode. Signed-off-by:
René Nussbaumer <rn@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
- Jan 21, 2011
-
-
René Nussbaumer authored
This patch renames QRFS_* to RS_* fields so they can be used in other places (i.e. LUs) without confusion, as this was initially meant for query operations. Signed-off-by:
René Nussbaumer <rn@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
- Jan 20, 2011
-
-
Iustin Pop authored
Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
René Nussbaumer <rn@google.com>
-
- Jan 18, 2011
-
-
Iustin Pop authored
While looking at the query library, I realized that while we have five field statuses, making this a 5-dimensional space, four of them are shrunk to a single possible value (None). Hence it should be possible to convert this into a single value space plus extra 4 special constants. This patch implements this, making (IMHO) the return value of normal functions much simpler: you simply return the desired value, instead of (QRFS_NORMAL, value); for the special results, you simply return _FS_UNAVAIL, instead of (QRFS_UNAVAIL, None). This I believe does simplify the code. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
- Jan 13, 2011
-
-
René Nussbaumer authored
Signed-off-by:
René Nussbaumer <rn@google.com> Reviewed-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-