- Jan 23, 2013
-
-
Dimitris Aragiorgis authored
If no group is given for the “gnt-network connect“/“… disconnect” commands, the client uses the result of “QueryGroups()” which is a list of lists. Use “itertools.chain()” to handle the return value correctly. Signed-off-by:
Dimitris Aragiorgis <dimara@grnet.gr> Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Dimitris Aragiorgis <dimara@grnet.gr> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
Michael Hanselmann authored
In _ReadConfigFile, the filename should be prepared outside the try/except block. Fixes bad code formatting, too. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Helga Velroyen <helgav@google.com>
-
- Jan 22, 2013
-
-
Michael Hanselmann authored
This patch moves the functions “_ReadTestData” and “_TestDataFilename” to module level. They do not depend on a class instance at all. Some cases of “utils.ReadFile(self._TestDataFilename(…))” are also corrected. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Bernardo Dal Seno <bdalseno@google.com>
-
Michael Hanselmann authored
Add a unit test for the trivial “_GetBlockDevSymlinkPath” function in backend (small changes in the function were required). Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Bernardo Dal Seno <bdalseno@google.com>
-
Michael Hanselmann authored
Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Bernardo Dal Seno <bdalseno@google.com>
-
- Jan 21, 2013
-
-
Helga Velroyen authored
This fixes a missing 's' in the format string and the wrong quotes. Those bugs were introduced in commit 6e043e60. Signed-off-by:
Helga Velroyen <helgav@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
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
-
-
Christos Stavrakakis authored
If opportunistic_locking is used, then 'node_whitelist' parameter passed to the allocator is set to the LU's owned node locks. However, LU owned_locks has type of 'set' while IReqInstanceAlloc expects type of 'ht.TMaybeListOf(ht.TNonEmptyString)'. Signed-off-by:
Christos Stavrakakis <cstavr@grnet.gr> Signed-off-by:
Guido Trotter <ultrotter@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
Michael Hanselmann authored
Add a unittest for a function formatting CPU pinning information for Xen's configuration. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Signed-off-by:
Guido Trotter <ultrotter@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
Guido Trotter authored
This was left behind because it required a different kvm invocation. Now that we can add new ones cheaply (two constants) it's easy to get rid of it. Differently than in other cases we support old version which don't have the actual option, and error out when it's invoked. This also removes two hardcoded strings, and brings them at constant level. A lot more are present, but two is megl che one (cit). Signed-off-by:
Guido Trotter <ultrotter@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
Guido Trotter authored
Signed-off-by:
Guido Trotter <ultrotter@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
Guido Trotter authored
We had the same code twice, and were about to add a third time. Better to collapse it into just one function. Signed-off-by:
Guido Trotter <ultrotter@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
Michael Hanselmann authored
Stop hardcoding the path in “hv_xen.py”. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
Michael Hanselmann authored
If the placeholder has exactly the same name as the variable used in autoconf it would be replaced as well. In the case of “@ENABLE_SPLIT_QUERY@” this led to the sed command “s#False#False#g”. Inserting additional quotes after the first @ sign prevents this. Since ENABLE_SPLIT_QUERY was not actually used it is removed. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Michele Tartara <mtartara@google.com>
-
Michael Hanselmann authored
Just determine whether it can migrate and keep that value instead of the full hypervisor class. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
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>
-
Constantinos Venetsanopoulos authored
Signed-off-by:
Constantinos Venetsanopoulos <cven@grnet.gr> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
- Jan 17, 2013
-
-
Michael Hanselmann authored
Documentation with included man pages should not be distributed as it contains fixed paths. Since the documentation with man pages is actually written to a separate directory, tarball creation is still possible. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
- Jan 16, 2013
-
-
Dimitris Aragiorgis authored
If machine version is passed as an hv param, a check is made in target node whether this version is included in the supported ones derived from kvm -M ? command. Signed-off-by:
Dimitris Aragiorgis <dimara@grnet.gr> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
Michael Hanselmann authored
This reverts commit dd60179d as it broke coverage for Python. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Bernardo Dal Seno authored
cluster-verify reports instances with disk templates not compatible with exclusive storage but that are running on nodes with the exclusive storage flag set. Signed-off-by:
Bernardo Dal Seno <bdalseno@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
Bernardo Dal Seno authored
When exclusive_storage is set, cluster-verify complains if PVs are shared among unrelated LVs. Signed-off-by:
Bernardo Dal Seno <bdalseno@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
Bernardo Dal Seno authored
This will be used for checks related to exclusive storage. Signed-off-by:
Bernardo Dal Seno <bdalseno@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
Bernardo Dal Seno authored
Almost all instance-specific checks have been moved from the Exec method to the _VerifyInstance method. This cleans up Exec, which was becoming too big even for pylint… Signed-off-by:
Bernardo Dal Seno <bdalseno@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
Bernardo Dal Seno authored
add-node now performs a few checks on LVM before adding a node to the cluster. Signed-off-by:
Bernardo Dal Seno <bdalseno@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
Bernardo Dal Seno authored
This will be used in node-add. Signed-off-by:
Bernardo Dal Seno <bdalseno@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
Bernardo Dal Seno authored
When exclusive_storage is set, cluster-verify complains if the size of PVs is not uniform across a node group. Signed-off-by:
Bernardo Dal Seno <bdalseno@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
Bernardo Dal Seno authored
utils.LvmExclusiveCheckNodePvs() now returns the size of the smallest and biggest PVs of a node. They will be used for cross-node consistency checks. Signed-off-by:
Bernardo Dal Seno <bdalseno@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
Bernardo Dal Seno authored
The value of the flag should be the same for nodes within the same group. Signed-off-by:
Bernardo Dal Seno <bdalseno@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
Bernardo Dal Seno authored
- compat.UniqueFrozenset used in one more place, for consistency. - The order of NV_XXX constants is fixed so that all values are now sorted by name. Signed-off-by:
Bernardo Dal Seno <bdalseno@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
Michael Hanselmann authored
By creating symlinks instead of actually creating files we still get the benefits of using a temporary directory, but the preparation is about three times as fast. Test used: $ time bash -c 'for ((i=0; i < 100; ++i)); do autotools/run-in-tempdir true; done' Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Bernardo Dal Seno <bdalseno@google.com>
-
Michael Hanselmann authored
To preserve disk space on copying all files to a temporary directory, the “doc” directory is only copied when building documentation. A comment describing the need is also added to Makefile.am, as well as a superfluous direct invocation of Bash removed. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
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>
-