- Jan 25, 2013
-
-
Michael Hanselmann authored
Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Helga Velroyen <helgav@google.com>
-
Michael Hanselmann authored
Instead of using the “XEN_CMD” constant in multiple places, that is now all in a single place and can easily be changed for unit tests (through a parameter given to the constructor). Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Helga Velroyen <helgav@google.com>
-
- Jan 24, 2013
-
-
Helga Velroyen authored
This way, it is easier to make it call the haskell implementation of the network queries. Signed-off-by:
Helga Velroyen <helgav@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
Michael Hanselmann authored
If stopping an instance failed, the configuration would already be gone and other operations depending on it (e.g. migration) would no longer work. With this patch the configuration file is only removed once the instance was succesfully stopped or destroyed. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Michele Tartara <mtartara@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
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>
-
- 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>
-
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
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
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>
-
- 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
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>
-
Constantinos Venetsanopoulos authored
Signed-off-by:
Constantinos Venetsanopoulos <cven@grnet.gr> Reviewed-by:
Guido Trotter <ultrotter@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>
-
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>
-
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>
-