- Apr 30, 2013
-
-
Iustin Pop authored
Since we use the primitive string type for group UUIDs, the group fields have a bug where we pass the group name as filter for node tests, whereas the nodes themselves use the group UUID. This results in zero node count, empty node list, and no instances being reported as assigned to groups. The patch fixes this and adds a test for the node count. It does some test generation improvement, and also cleans up whitespace issues in Test/G/Q/Query.hs (the functions case_queryNode_allfields, prop_queryGroup_noUnknown and case_queryGroup_allfields are unchanged but simply have indentation fixed). Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com> Cherry-pick of e7124835, fixes issue 436 Signed-off-by:
Klaus Aehlig <aehlig@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com> Conflicts: test/hs/Test/Ganeti/Objects.hs test/hs/Test/Ganeti/Query/Query.hs
-
- Apr 29, 2013
-
-
Klaus Aehlig authored
So far, any successful query was only logged at debug level, thus leaving no traces in the logs, unless debugging was enabled. Therefore, we add a notes about successful completion at info level. Also, repeat a failed request at WARN level, so that, even if debugging disabled, the request is available together with the error message in the logs. Signed-off-by:
Klaus Aehlig <aehlig@google.com> Reviewed-by:
Helga Velroyen <helgav@google.com>
-
Klaus Aehlig authored
Signed-off-by:
Klaus Aehlig <aehlig@google.com> Reviewed-by:
Helga Velroyen <helgav@google.com>
-
- Apr 11, 2013
-
-
Klaus Aehlig authored
In that way, tools building on Instance will benefit from the corrected verification semantics of the instance policy on disk space. Signed-off-by:
Klaus Aehlig <aehlig@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
Klaus Aehlig authored
Instance policy on disks is specified on a per-disk basis. So extend the instance description by the sizes of the individual disks and modify the instance policy verification to correctly check individual disks. Signed-off-by:
Klaus Aehlig <aehlig@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
Michele Tartara authored
Importing an instance, like JSON, automatically allows the names of all its functions to be used. If one of this functions (namely showJSON) is imported separately, GHC 6 is fine with that, but GHC 7 emits a warning (therefore, the compilation of Ganeti fails because it requires no warnings). This patch fixes the build for GHC 7 and has no impact on GHC 6. Note that the same does not apply to the import of readJSON, because that function is actually used in the same file, so it must be imported separately. Signed-off-by:
Michele Tartara <mtartara@google.com> Reviewed-by:
Helga Velroyen <helgav@google.com>
-
- Apr 08, 2013
-
-
Michele Tartara authored
The code introduced by the previous commit triggered a possible library conflict in Ubuntu Lucid. This patch introduces an equivalent but more widely acceptable version of the same code. Signed-off-by:
Michele Tartara <mtartara@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
Michele Tartara authored
In case of problems while reading the job list from disk (such as permission errors) confd would silently fail, writing a warning on the log file but sending an empty list and no error message to the client. Also, tests have been updated in accordance to the new interface of the modified functions. This commit fixes this problem [Issue 405]. Signed-off-by:
Michele Tartara <mtartara@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
Michele Tartara authored
Signed-off-by:
Michele Tartara <mtartara@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
- Mar 08, 2013
-
-
Iustin Pop authored
Currently, hbal exits with status 1 if early exit is requested, even when all jobs are successful. This is counter-intuitive behaviour, so let's fix it (Issue 386). Note that the man page had conflicting information already, so it's a good thing to clean this up. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
- Mar 05, 2013
-
-
Iustin Pop authored
Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Michele Tartara <mtartara@google.com>
-
- Mar 04, 2013
-
-
Iustin Pop authored
In a few cases, we tested the verbosity level for (== 0), instead of higher/lower than a certain value. If the user passes multiple "--quiet" options, this can result in negative verbosity levels, which behave like "extra verbosity". Sigh for plain data types as opposed to proper verbosity levels… Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
Michele Tartara authored
Change the docstring of chompPrefix to prevent the error "doc comment parse failed" that was raised by some version of haddock while generating the documentation for this function. Signed-off-by:
Michele Tartara <mtartara@google.com> Reviewed-by:
Helga Velroyen <helgav@google.com> (cherry picked from commit 94042ae4) Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Bernardo Dal Seno <bdalseno@google.com>
-
Dimitris Aragiorgis authored
If cluster is initialized with --no-lvm-storage then volume_group_name does not exist in config.data. Thus we must define it as optional in confd. Signed-off-by:
Dimitris Aragiorgis <dimara@grnet.gr> [iustin@google.com: fixed Haskell RPC definition] Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
- Feb 22, 2013
-
-
Iustin Pop authored
… no comment :) Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Helga Velroyen <helgav@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
- Feb 12, 2013
-
-
Iustin Pop authored
This patch adds the option to hbal, and uses it to tweak the submitted jobs. There are also two small shelltests for testing the parsing. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
Iustin Pop authored
This just defined the new priority, with the same name as the Python one. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
Iustin Pop authored
The current serialisation format for submit priorities is integer-based, same as the opcode json serialisation. But for CLI level, we need to support a string-based format, so we add functions to parse and format this representation. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
Iustin Pop authored
This simply updates the metaopcode submit priority. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
Iustin Pop authored
Currently, hbal code always uses annotateOpCode function, which means we would have to pass the options data to all function in the call chain if we wanted to make this more flexible. By abstracting the type of the annotator and passing it as an argument to the function, we can be more flexible. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
Helga Velroyen authored
This removes the check for conflicts from the Haskell version of the OpCode NetworkDisconnect. This alignes the Haskell code with the patch "Force conflicts check in LUNetworkDisconnect" (which is currently under review). I will submit these patches together then. This is a cherry-pick of commit 0ae4b355. Signed-off-by:
Helga Velroyen <helgav@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Michele Tartara <mtartara@google.com>
-
- Feb 11, 2013
-
-
Dimitris Aragiorgis authored
This info is not used by Ganeti and therefore is removed. Signed-off-by:
Dimitris Aragiorgis <dimara@grnet.gr> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
Dimitris Aragiorgis authored
This slot was not used by Ganeti so the same info can be provided via tags. In order not to break configuration data we add a FromDict() method in Network config object that removes the deprecated network_type (if found) and then invoke the parent's method (which does the validation). Signed-off-by:
Dimitris Aragiorgis <dimara@grnet.gr> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
- Feb 08, 2013
-
-
Guido Trotter authored
This was applied to "master" along with extra changes affecting the master branch only. Cherry-picking just the Objects.hs change. Signed-off-by:
Guido Trotter <ultrotter@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
- Feb 07, 2013
-
-
Iustin Pop authored
Since 'head' is unsafe to use in most cases, this patch removes its use from most of the code, adds a lint warning for it (and for tail as well), and adds override annotations in the few cases where it's actually OK to use it (mainly when using head over the result of functions which guarantee to return a non-empty list by documentation, not type). Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Helga Velroyen <helgav@google.com>
-
- Feb 05, 2013
-
-
Iustin Pop authored
Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Michele Tartara <mtartara@google.com>
-
Iustin Pop authored
Commit 3329f4de changed the Haskell log file from constants to functions, but introduced a bug: it uses now the daemon name instead of the correct log file, which means "ganeti-confd.log" instead of "conf-daemon.log". In order to fix this, we need to abstract the log file base (in constants.py) into a separate set of constants, so that we can reuse it in the Haskell code. This fixes issue 343. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
- Jan 29, 2013
-
-
Dato Simó authored
Some help strings with continuation backslashes ('\') were providing a space both before and after the backslash, resulting in double spaces in help output. Provide it only after the backslash, which fixes the issue and is consistent with the rest of the file. Signed-off-by:
Dato Simó <dato@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
- Jan 21, 2013
-
-
Iustin Pop authored
The current names are quite confusing; this patch cleans up the confusion by making sure we use different terms for the two threads, etc. No actual code changes besides the renames. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
Iustin Pop authored
Currently, the polling thread sleeps at the end of its body; the original reason was that when the thread initially starts, we want to load the config immediately (in the old-style config load model). However, now we explicitly load the config, so we can make this thread behave like the watcher thread: sleep first, then do the work. This model improves for example the startup of the thread, by not redoing a config check immediately after switching to polling mode. We also increase the max idle poll rounds interval from 2 to 3; the new behaviour means that we revert from polling to inotify after around one second of no changes. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
Iustin Pop authored
This patch changes the resolution of the timers: the watcher timer goes from 60s to 17s, and the polling-mode timer goes from 2 seconds to 250ms. The code changes a bit more due to the changes in the units of the various constants. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
Iustin Pop authored
Currently the Haskell logging goes with the default time formatting, which lacks sub-second resolution. This is not good, as it's too coarse. The patch adds picoseconds to the log; they will contain usually too many zeroes, but the other option is to use a log format that (for precisely zero fractional part) omits the separator, so it's not consistent from line to line, and which also uses a dot as a separator, different from the Python code. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
Iustin Pop authored
In some cases we need higher resolution that seconds; I've settled on microseconds as that is what 'threadDelay' wants, for exactly, so it's easier if we keep the same units. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Michele Tartara <mtartara@google.com>
-
Iustin Pop authored
This patch changes the default model—where confd is always started in polling mode—to a model where if possible we enable inotify mode before starting any of the background threads. There are some tricky details here: if we enable inotify, we should not modify the server state after wards, as inotify events could have already fired and took ownership; therefore we presume that inotify will work and set reloadModel=ReloadNotify, and only if we fail to enable it we change it back to polling mode. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
Iustin Pop authored
Currently, confd main function doesn't load the config, but simply forks the individual timer threads, which will—as a side effect-also load the configuration as soon as they start. However, this makes codes to the startup more complex, so let's explicitly (try to) load the configuration as first thing. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
- Jan 18, 2013
-
-
Yiannis Tsiouris authored
This adds two functions in Utils.hs: 'wrap' and 'trim' along with some simple tests. 'wrap' is used in Common.hs for wrapping command descriptions to a fixed line length, e.g. useful for the "--help" option. Signed-off-by:
Yiannis Tsiouris <gtsiour@softlab.ntua.gr> Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
- Jan 16, 2013
-
-
Michele Tartara authored
With this commit, the DRBD data collector does not only print the data it extracts, but includes them in the proper JSON structure common to all the data collectors, as prescribed by the design document. Signed-off-by:
Michele Tartara <mtartara@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Michele Tartara authored
This commit adds the part of the JSON report generation code that will be common to all the data collectors, according to the format specified in the design document. Signed-off-by:
Michele Tartara <mtartara@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Michele Tartara authored
The getCurrentTime function is of wide interest, so its moved to a more appropriate position. Signed-off-by:
Michele Tartara <mtartara@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
- Jan 15, 2013
-
-
Iustin Pop authored
Currently, niceSort behaves differently than niceSortKey in cases where the parsed groups are equal but the original not, as it uses both members of the tuple as opposed to just the first one. Both niceSortKey and the Python code use only the first one, so in corner cases we can have different behaviour of these functions. To rectify this, we change niceSort to be a simple wrapper over "niceSortKey id", so that we get consistent behaviour. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-