- Jan 24, 2013
-
-
Helga Velroyen authored
Signed-off-by:
Helga Velroyen <helgav@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Michael Hanselmann authored
Instead of calling _WriteConfigFileStatic from both derived classes, those now only return the content (minus the “do not edit” header). The configuration is then written by the base class, XenHypervisor. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
Michael Hanselmann authored
Unit tests will have to specify a custom Xen configuration directory (a temporary directory). To this end “hv_xen.XenHypervisor” and its two derived classes are modified to have fewer static and class methods. A new private attribute for the configuration directory is also added (to be used in test code). Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Bernardo Dal Seno <bdalseno@google.com>
-
Michael Hanselmann authored
The “_GetConfigFileDiskData” function is moved to module level and cleaned up (module-level constants for letters and file I/O drivers). Until now only 24 disks would be supported (e.g. “sda” to “sdx”), when the Latin alphabet actually has 26 characters. Now all 26 letters would be available for use (“constants.MAX_DISKS” is still 16). Newly added unit tests provide complete coverage for “_GetConfigFileDiskData”. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Bernardo Dal Seno <bdalseno@google.com>
-
Michael Hanselmann authored
Refactor and add tests for getting node (Domain-0) information. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Bernardo Dal Seno <bdalseno@google.com>
-
Michael Hanselmann authored
This patch refactors “_RunXmList” and adds some tests. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Bernardo Dal Seno <bdalseno@google.com>
-
Michael Hanselmann authored
* devel-2.7: hv_*: Always return from Verify, style fixes _VerifyErrors()._Error() and _ErrorIf() are now consistent Handle the result of QueryGroups() correctly Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Bernardo Dal Seno <bdalseno@google.com>
-
Michael Hanselmann authored
Change all “Verify” methods in hypervisor abstractions to explicitely return None if no problem was detected. Remove punctuation from error messages. Update docstrings with “@return” and some small mistakes. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Helga Velroyen authored
When creating a network, so far no size constraints were checked. We now limit the size of a network to a /30 or bigger, although tecnically, the ipaddr library supports even /32 networks. Signed-off-by:
Helga Velroyen <helgav@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
Helga Velroyen authored
This adds a script for the QA of 'gnt-network'. So far it covers adding/removing and connecting/disconnecting networks. Signed-off-by:
Helga Velroyen <helgav@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
Helga Velroyen authored
The additional comma makes this file invalid JSON. Signed-off-by:
Helga Velroyen <helgav@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
- Jan 23, 2013
-
-
Michael Hanselmann authored
These will be used in unittests. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Bernardo Dal Seno authored
_Error() didn't contain the logic for demoting errors to warnings and for marking an operation as failed. Now _ErrorIf() is just a minimal wrapper for _Error(). Unit tests included. Signed-off-by:
Bernardo Dal Seno <bdalseno@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
Michael Hanselmann authored
* master: Handle the result of QueryGroups() correctly Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
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> (cherry picked from commit af3aea48)
-
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>
-