[libvirt] [PATCH] openvz: add network interface stats
by Guido Günther
This will only work for veth devices since venet devices don't have
a target element.
---
src/openvz/openvz_driver.c | 52 ++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 52 insertions(+)
diff --git a/src/openvz/openvz_driver.c b/src/openvz/openvz_driver.c
index 7ec327d..e8b6915 100644
--- a/src/openvz/openvz_driver.c
+++ b/src/openvz/openvz_driver.c
@@ -57,6 +57,7 @@
#include "logging.h"
#include "command.h"
#include "viruri.h"
+#include "stats_linux.h"
#define VIR_FROM_THIS VIR_FROM_OPENVZ
@@ -1672,6 +1673,56 @@ cleanup:
return ret;
}
+static int
+openvzDomainInterfaceStats (virDomainPtr dom,
+ const char *path,
+ struct _virDomainInterfaceStats *stats)
+{
+ struct openvz_driver *driver = dom->conn->privateData;
+ virDomainObjPtr vm;
+ int i;
+ int ret = -1;
+
+ openvzDriverLock(driver);
+ vm = virDomainFindByUUID(&driver->domains, dom->uuid);
+ openvzDriverUnlock(driver);
+
+ if (!vm) {
+ char uuidstr[VIR_UUID_STRING_BUFLEN];
+ virUUIDFormat(dom->uuid, uuidstr);
+ openvzError(VIR_ERR_NO_DOMAIN,
+ _("no domain with matching uuid '%s'"), uuidstr);
+ goto cleanup;
+ }
+
+ if (!virDomainObjIsActive(vm)) {
+ openvzError(VIR_ERR_OPERATION_INVALID,
+ "%s", _("domain is not running"));
+ goto cleanup;
+ }
+
+ /* Check the path is one of the domain's network interfaces. */
+ for (i = 0 ; i < vm->def->nnets ; i++) {
+ if (vm->def->nets[i]->ifname &&
+ STREQ (vm->def->nets[i]->ifname, path)) {
+ ret = 0;
+ break;
+ }
+ }
+
+ if (ret == 0)
+ ret = linuxDomainInterfaceStats(path, stats);
+ else
+ openvzError(VIR_ERR_INVALID_ARG,
+ _("invalid path, '%s' is not a known interface"), path);
+
+cleanup:
+ if (vm)
+ virDomainObjUnlock(vm);
+ return ret;
+}
+
+
static virDriver openvzDriver = {
.no = VIR_DRV_OPENVZ,
.name = "OPENVZ",
@@ -1717,6 +1768,7 @@ static virDriver openvzDriver = {
.domainUndefineFlags = openvzDomainUndefineFlags, /* 0.9.4 */
.domainGetAutostart = openvzDomainGetAutostart, /* 0.4.6 */
.domainSetAutostart = openvzDomainSetAutostart, /* 0.4.6 */
+ .domainInterfaceStats = openvzDomainInterfaceStats, /* 0.9.12 */
.isEncrypted = openvzIsEncrypted, /* 0.7.3 */
.isSecure = openvzIsSecure, /* 0.7.3 */
.domainIsActive = openvzDomainIsActive, /* 0.7.3 */
--
1.7.10
12 years, 10 months
[libvirt] Should we always dump an usb controlled in XML domains
by Daniel Veillard
I realize that we have that behaviour for quite some times but I
wonder about it, basically we always dump an usb controller on the
XML domain format:
<controller type='usb' index='0'/>
even if there is no USB device connected to the machine. The drawback
I see is that if we try to reuse (or migrate) that domain to an older
verlion of libvirt without that USB controller support, then we just
fail to parse the domain, even though we don't need the missing
capability.
So I wonder if the correct thing isn't to add the USB controller
only if there is an USB device associated to the domain, then failure
to migrate on an older libvirt does make sense because we require the
feature. I would assume that application using the USB support wouldn't
need to have the USB hub exposed to allow adding an USB device, and once
the USB device is added then changing the kind of USB hub to select
a different version does make sense.
In general I'm tempted to not dump in the XML things which are there
by default and would be automatically added if changed or used in some
ways. I think there is two advantages to this:
- keep the XML smaller and somehow more readable
- avoid portability problems on unsupported but unused constructs
One drawback I could perceive though is that having defaults values not
explicitely dumped in the XML could lead to change of guest behaviour if
we changed the default meaning of such default value. But we can just
document this (like for reserved PCI default slots) and do our best to
not breakdefault behaviour.
Opinion ?
Daniel
--
Daniel Veillard | libxml Gnome XML XSLT toolkit http://xmlsoft.org/
daniel(a)veillard.com | Rpmfind RPM search engine http://rpmfind.net/
http://veillard.com/ | virtualization library http://libvirt.org/
12 years, 10 months
[libvirt] [PATCHv5 00/23] live block migration
by Eric Blake
This series shows how to do live block migration using both
streaming mirror (as proposed for upstream qemu 1.1) and
snapshot+mirror (as proposed for RHEL 6.3, although not as
actively tested, since streaming mirror seems so much nicer).
v4 (blockjob): https://www.redhat.com/archives/libvir-list/2012-April/msg00330.html
v1 (snapshot): https://www.redhat.com/archives/libvir-list/2012-March/msg00578.html
I've hopefully resolved the review comments Jiri gave against v4,
and have tested this against Paolo's proposed builds of qemu for
RHEL 6.3. Patches 1-14 are ready to apply if qemu commits to
the 'drive-mirror' interface for qemu 1.1. Patches 15-17 need
a bit more thought to decide if we also want to support partial
streaming support (similar to the optional 'base' argument to
'block-stream') in 'drive-mirror' in qemu 1.2; it might be wiser
to defer these until we know for sure what happens with qemu.
Patches 18-23 are only valid for the RHEL 6.3 build, although
patches 19-23 would be useful if qemu 1.2 enhances 'drive-mirror'
to support snapshot+mirror.
I've tried to give more details in the various commits up to 14,
which are the most important to review for purposes of backporting;
other changes in later patches include fixing a use-after-free bug
in the snapshot+mirror code, and altering patch 18 to match the
difference in what RHEL 6.3 will probably be providing.
Available here as well:
git fetch git://repo.or.cz/libvirt/ericb.git snapshot
http://repo.or.cz/w/libvirt/ericb.git/shortlog/refs/heads/snapshot
I think 1-3 can be applied without controversy, 4-7 can be applied
_if_ we think that the libvirt API is reasonable no matter what
qemu throws at us (and I'm pretty positive that it is, as I have
already been through several rounds of design changes on the qemu
side where the libvirt API still held up without problem), and 8
onwards should be delayed until we have a firm commitment on the
actual qemu 1.1 implementation.
Eric Blake (23):
virsh: minor syntactic cleanups
qemu: use consistent error when qemu binary is too old
blockjob: add virsh blockpull --wait
blockjob: add new API flags
blockjob: add 'blockcopy' to virsh
blockjob: enhance xml to track mirrors across libvirtd restart
blockjob: react to active block copy
blockjob: add qemu capabilities related to block jobs
blockjob: return appropriate event and info
blockjob: support pivot operation on cancel
blockjob: implement block copy for qemu
blockjob: relax block job behavior when setting speed up front
blockjob: allow for existing files
blockjob: allow mirroring under SELinux
blockjob: add virDomainBlockCopy
blockjob: enhance virsh 'blockcopy'
blockjob: wire up qemu and RPC for block copy
blockjob: accommodate RHEL backport names
snapshot: allow for creation of mirrored snapshots
snapshot: add new snapshot delete flags
snapshot: make it possible to check for mirrored snapshot
snapshot: implement new snapshot delete flags in qemu
snapshot: enable mirrored snapshots on transient vm
docs/apibuild.py | 1 +
docs/formatdomain.html.in | 13 +
docs/formatsnapshot.html.in | 31 +
docs/schemas/domaincommon.rng | 24 +-
docs/schemas/domainsnapshot.rng | 8 +
include/libvirt/libvirt.h.in | 50 ++-
include/libvirt/virterror.h | 1 +
src/conf/domain_conf.c | 125 ++++-
src/conf/domain_conf.h | 8 +
src/driver.h | 5 +
src/libvirt.c | 268 ++++++++-
src/libvirt_private.syms | 2 +
src/libvirt_public.syms | 5 +
src/qemu/qemu_capabilities.c | 2 +
src/qemu/qemu_capabilities.h | 2 +
src/qemu/qemu_command.c | 2 +-
src/qemu/qemu_driver.c | 624 +++++++++++++++++++-
src/qemu/qemu_hotplug.c | 9 +-
src/qemu/qemu_monitor.c | 56 ++-
src/qemu/qemu_monitor.h | 12 +
src/qemu/qemu_monitor_json.c | 94 +++
src/qemu/qemu_monitor_json.h | 19 +-
src/remote/remote_driver.c | 1 +
src/remote/remote_protocol.x | 12 +-
src/remote_protocol-structs | 9 +
src/rpc/gendispatch.pl | 1 +
src/util/virterror.c | 6 +
.../disk_snapshot_mirror.xml | 13 +
.../disk_snapshot_mirror.xml | 49 ++
tests/domainsnapshotxml2xmltest.c | 4 +-
.../qemuxml2argvdata/qemuxml2argv-disk-mirror.xml | 42 ++
.../qemuxml2xmlout-disk-mirror.xml | 40 ++
tests/qemuxml2xmltest.c | 42 +-
tools/virsh.c | 558 ++++++++++++++----
tools/virsh.pod | 84 +++-
35 files changed, 2012 insertions(+), 210 deletions(-)
create mode 100644 tests/domainsnapshotxml2xmlin/disk_snapshot_mirror.xml
create mode 100644 tests/domainsnapshotxml2xmlout/disk_snapshot_mirror.xml
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-disk-mirror.xml
create mode 100644 tests/qemuxml2xmloutdata/qemuxml2xmlout-disk-mirror.xml
--
1.7.7.6
12 years, 10 months
[libvirt] [test-API PATCH] remove original 'util' object in testcases
by Guannan Ren
---
repos/domain/cpu_affinity.py | 4 ++--
repos/domain/cpu_topology.py | 8 ++++----
repos/domain/ownership_test.py | 12 ++++++------
repos/domain/restore.py | 8 ++++----
repos/domain/save.py | 10 +++++-----
repos/libvirtd/qemu_hang.py | 12 ++++++------
repos/libvirtd/restart.py | 12 ++++++------
repos/libvirtd/upstart.py | 6 +++---
repos/network/network_list.py | 12 ++++++------
repos/remoteAccess/tcp_setup.py | 8 ++++----
repos/remoteAccess/tls_setup.py | 28 ++++++++++++++--------------
repos/sVirt/domain_nfs_start.py | 8 ++++----
12 files changed, 64 insertions(+), 64 deletions(-)
diff --git a/repos/domain/cpu_affinity.py b/repos/domain/cpu_affinity.py
index 8b65e2f..ee585e6 100644
--- a/repos/domain/cpu_affinity.py
+++ b/repos/domain/cpu_affinity.py
@@ -38,7 +38,7 @@ def redefine_vcpu_number(domobj, domain_name, vcpu):
return doc.toxml()
-def set_vcpus(util, domobj, domain_name, vcpu):
+def set_vcpus(domobj, domain_name, vcpu):
"""set the value of virtual machine to vcpu offline , then boot up
the virtual machine
"""
@@ -225,7 +225,7 @@ def cpu_affinity(params):
if vcpunum != vcpu:
logger.info("set the vcpu of the guest to %s" % vcpu)
- ret = set_vcpus(util, domobj, domain_name, vcpu)
+ ret = set_vcpus(domobj, domain_name, vcpu)
if ret != 0:
return 1
diff --git a/repos/domain/cpu_topology.py b/repos/domain/cpu_topology.py
index 120273a..f0f081c 100644
--- a/repos/domain/cpu_topology.py
+++ b/repos/domain/cpu_topology.py
@@ -86,7 +86,7 @@ def guest_define(domobj, domxml, logger):
return 0
-def guest_start(domobj, guestname, util, logger):
+def guest_start(domobj, guestname, logger):
"""start guest"""
timeout = 600
ip = ''
@@ -121,7 +121,7 @@ def guest_start(domobj, guestname, util, logger):
return 0, ip
def cpu_topology_check(ip, username, password,
- sockets, cores, threads, util, logger):
+ sockets, cores, threads, logger):
"""login the guest, run lscpu command to check the result"""
lscpu = "lscpu"
# sleep for 5 seconds
@@ -190,12 +190,12 @@ def cpu_topology(params):
if guest_define(domobj, domxml, logger):
return 1
- ret, ip = guest_start(domobj, guestname, util, logger)
+ ret, ip = guest_start(domobj, guestname, logger)
if ret:
return 1
if cpu_topology_check(ip, username, password,
- sockets, cores, threads, util, logger):
+ sockets, cores, threads, logger):
return 1
return 0
diff --git a/repos/domain/ownership_test.py b/repos/domain/ownership_test.py
index acb56c1..b479708 100644
--- a/repos/domain/ownership_test.py
+++ b/repos/domain/ownership_test.py
@@ -35,7 +35,7 @@ def check_domain_running(conn, guestname, logger):
else:
return 0
-def nfs_setup(util, logger):
+def nfs_setup(logger):
"""setup nfs on localhost
"""
logger.info("set nfs service")
@@ -57,7 +57,7 @@ def nfs_setup(util, logger):
return 0
-def chown_file(util, filepath, logger):
+def chown_file(filepath, logger):
"""touch a file and setting the chown
"""
if os.path.exists(filepath):
@@ -87,7 +87,7 @@ def chown_file(util, filepath, logger):
return 0
-def prepare_env(util, dynamic_ownership, use_nfs, logger):
+def prepare_env(dynamic_ownership, use_nfs, logger):
"""configure dynamic_ownership in /etc/libvirt/qemu.conf,
set chown of the file to save
"""
@@ -126,12 +126,12 @@ def prepare_env(util, dynamic_ownership, use_nfs, logger):
logger.error("wrong use_nfs value")
return 1
- ret = chown_file(util, filepath, logger)
+ ret = chown_file(filepath, logger)
if ret:
return 1
if use_nfs == 'enable':
- ret = nfs_setup(util, logger)
+ ret = nfs_setup(logger)
if ret:
return 1
@@ -175,7 +175,7 @@ def ownership_test(params):
# set env
logger.info("prepare the environment")
- ret = prepare_env(util, dynamic_ownership, use_nfs, logger)
+ ret = prepare_env(dynamic_ownership, use_nfs, logger)
if ret:
logger.error("failed to prepare the environment")
return 1
diff --git a/repos/domain/restore.py b/repos/domain/restore.py
index 4ac68be..3a1a5a9 100644
--- a/repos/domain/restore.py
+++ b/repos/domain/restore.py
@@ -16,7 +16,7 @@ optional_params = {}
def get_guest_ipaddr(*args):
"""Get guest ip address"""
- (guestname, util, logger) = args
+ (guestname, logger) = args
mac = utils.get_dom_mac_addr(guestname)
logger.debug("guest mac address: %s" % mac)
@@ -47,10 +47,10 @@ def check_guest_restore(*args):
"""Check restore domain result, if restore domain is successful,
guest status will not be paused and can be ping
"""
- (guestname, domobj, util, logger) = args
+ (guestname, domobj, logger) = args
if check_guest_status(domobj, logger):
- if get_guest_ipaddr(guestname, util, logger):
+ if get_guest_ipaddr(guestname, logger):
return True
else:
return False
@@ -73,7 +73,7 @@ def restore(params):
try:
conn.restore(filepath)
- if check_guest_restore(guestname, domobj, util, logger):
+ if check_guest_restore(guestname, domobj, logger):
logger.info("restore %s domain successful" % guestname)
else:
logger.error("Error: fail to check restore domain")
diff --git a/repos/domain/save.py b/repos/domain/save.py
index 677adb4..236420d 100644
--- a/repos/domain/save.py
+++ b/repos/domain/save.py
@@ -16,7 +16,7 @@ optional_params = {}
def get_guest_ipaddr(*args):
"""Get guest ip address"""
- (guestname, util, logger) = args
+ (guestname, logger) = args
mac = utils.get_dom_mac_addr(guestname)
logger.debug("guest mac address: %s" %mac)
@@ -50,10 +50,10 @@ def check_guest_save(*args):
guestname.save will exist under /tmp directory and guest
can't be ping and status is paused
"""
- (guestname, domobj, util, logger) = args
+ (guestname, domobj, logger) = args
if not check_guest_status(domobj, logger):
- if not get_guest_ipaddr(guestname, util, logger):
+ if not get_guest_ipaddr(guestname, logger):
return True
else:
return False
@@ -70,7 +70,7 @@ def save(params):
domobj = conn.lookupByName(guestname)
# Save domain
- ipaddr = get_guest_ipaddr(guestname, util, logger)
+ ipaddr = get_guest_ipaddr(guestname, logger)
if not check_guest_status(domobj, logger):
logger.error("Error: current guest status is shutoff")
@@ -82,7 +82,7 @@ def save(params):
try:
domobj.save(filepath)
- if check_guest_save(guestname, domobj, util, logger):
+ if check_guest_save(guestname, domobj, logger):
logger.info("save %s domain successful" %guestname)
else:
logger.error("Error: fail to check save domain")
diff --git a/repos/libvirtd/qemu_hang.py b/repos/libvirtd/qemu_hang.py
index 894949c..7a58f50 100644
--- a/repos/libvirtd/qemu_hang.py
+++ b/repos/libvirtd/qemu_hang.py
@@ -33,7 +33,7 @@ def check_domain_running(conn, guestname, logger):
else:
return 0
-def libvirtd_check(util, logger):
+def libvirtd_check(logger):
"""check libvirtd status
"""
cmd = "service libvirtd status"
@@ -55,7 +55,7 @@ def libvirtd_check(util, logger):
return 0
-def get_domain_pid(util, logger, guestname):
+def get_domain_pid(logger, guestname):
"""get the pid of running domain"""
logger.info("get the pid of running domain %s" % guestname)
get_pid_cmd = "cat /var/run/libvirt/qemu/%s.pid" % guestname
@@ -82,11 +82,11 @@ def qemu_hang(params):
return 1
logger.info("check the libvirtd status:")
- ret = libvirtd_check(util, logger)
+ ret = libvirtd_check(logger)
if ret:
return 1
- ret, pid = get_domain_pid(util, logger, guestname)
+ ret, pid = get_domain_pid(logger, guestname)
if ret:
return 1
@@ -98,7 +98,7 @@ def qemu_hang(params):
return 1
logger.info("recheck libvirtd status:")
- ret = libvirtd_check(util, logger)
+ ret = libvirtd_check(logger)
if ret:
return 1
@@ -109,7 +109,7 @@ def qemu_hang_clean(params):
logger = params['logger']
guestname = params['guestname']
- ret = get_domain_pid(util, logger, guestname)
+ ret = get_domain_pid(logger, guestname)
cmd = "kill -CONT %s" % ret[1]
ret = utils.exec_cmd(cmd, shell=True)
if ret[0]:
diff --git a/repos/libvirtd/restart.py b/repos/libvirtd/restart.py
index c095fc7..803fa2e 100644
--- a/repos/libvirtd/restart.py
+++ b/repos/libvirtd/restart.py
@@ -33,7 +33,7 @@ def check_domain_running(conn, guestname, logger):
else:
return 0
-def libvirtd_check(util, logger):
+def libvirtd_check(logger):
"""check libvirtd status
"""
cmd = "service libvirtd status"
@@ -55,7 +55,7 @@ def libvirtd_check(util, logger):
return 0
-def get_domain_pid(util, logger, guestname):
+def get_domain_pid(logger, guestname):
"""get the pid of running domain"""
logger.info("get the pid of running domain %s" % guestname)
get_pid_cmd = "cat /var/run/libvirt/qemu/%s.pid" % guestname
@@ -82,7 +82,7 @@ def restart(params):
return 1
logger.info("check the libvirtd status:")
- ret = libvirtd_check(util, logger)
+ ret = libvirtd_check(logger)
if ret:
return 1
@@ -102,7 +102,7 @@ def restart(params):
logger.error("fail to ping domain %s" % guestname)
return 1
- ret, pid_before = get_domain_pid(util, logger, guestname)
+ ret, pid_before = get_domain_pid(logger, guestname)
if ret:
return 1
@@ -118,7 +118,7 @@ def restart(params):
logger.info(out[i])
logger.info("recheck libvirtd status:")
- ret = libvirtd_check(util, logger)
+ ret = libvirtd_check(logger)
if ret:
return 1
@@ -129,7 +129,7 @@ def restart(params):
logger.error("fail to ping domain %s" % guestname)
return 1
- ret, pid_after = get_domain_pid(util, logger, guestname)
+ ret, pid_after = get_domain_pid(logger, guestname)
if ret:
return 1
diff --git a/repos/libvirtd/upstart.py b/repos/libvirtd/upstart.py
index 7746d20..13cb349 100644
--- a/repos/libvirtd/upstart.py
+++ b/repos/libvirtd/upstart.py
@@ -20,7 +20,7 @@ INITCTL_RELOAD_CMD = "initctl reload-configuration"
SYSTEMCTL_RELOAD_CMD = "systemctl daemon-reload"
INIT_CONF = "/etc/init/libvirtd.conf"
-def libvirtd_check(util, logger):
+def libvirtd_check(logger):
"""check libvirtd status
"""
cmd = "service libvirtd status"
@@ -133,7 +133,7 @@ def upstart(params):
time.sleep(5)
logger.info("check the libvirtd status:")
- ret = libvirtd_check(util, logger)
+ ret = libvirtd_check(logger)
if ret:
return 1
@@ -149,7 +149,7 @@ def upstart(params):
time.sleep(5)
logger.info("recheck libvirtd status:")
- ret = libvirtd_check(util, logger)
+ ret = libvirtd_check(logger)
if ret:
return 1
else:
diff --git a/repos/network/network_list.py b/repos/network/network_list.py
index c04a183..7c34f69 100644
--- a/repos/network/network_list.py
+++ b/repos/network/network_list.py
@@ -47,7 +47,7 @@ def get_output(logger, command, flag):
logger.error(ret)
return status, ret
-def check_all_option(conn, util, logger):
+def check_all_option(conn, logger):
"""check the output of virsh net-list with --all option
"""
all_network = []
@@ -73,7 +73,7 @@ def check_all_option(conn, util, logger):
return 1
return 0
-def check_inactive_option(conn, util, logger):
+def check_inactive_option(conn, logger):
"""check the output of virsh net-list with --inactive option
"""
inactive_network = []
@@ -105,7 +105,7 @@ def check_inactive_option(conn, util, logger):
return 0
-def check_default_option(conn, util, logger):
+def check_default_option(conn, logger):
"""check the output of virsh net-list
"""
active_network = []
@@ -158,7 +158,7 @@ def network_list(params):
for option in option_list:
if option == ' ':
logger.info("check the output of virsh net-list")
- if not check_default_option(conn, util, logger):
+ if not check_default_option(conn, logger):
logger.info("virsh net-list checking succeeded")
execute_virsh_netlist(option, logger)
else:
@@ -166,7 +166,7 @@ def network_list(params):
return 1
elif option == '--inactive':
logger.info("check the output of virsh net-list --inactive")
- if not check_inactive_option(conn, util, logger):
+ if not check_inactive_option(conn, logger):
logger.info("virsh net-list --inactive checking succeeded")
execute_virsh_netlist(option, logger)
else:
@@ -174,7 +174,7 @@ def network_list(params):
return 1
elif option == '--all':
logger.info("check the output of virsh net-list --all")
- if not check_all_option(conn, util, logger):
+ if not check_all_option(conn, logger):
logger.info("virsh net-list --all checking succeeded")
execute_virsh_netlist(option, logger)
else:
diff --git a/repos/remoteAccess/tcp_setup.py b/repos/remoteAccess/tcp_setup.py
index ec76c84..ddbe333 100644
--- a/repos/remoteAccess/tcp_setup.py
+++ b/repos/remoteAccess/tcp_setup.py
@@ -22,7 +22,7 @@ SASLPASSWD2 = "/usr/sbin/saslpasswd2"
LIBVIRTD_CONF = "/etc/libvirt/libvirtd.conf"
SYSCONFIG_LIBVIRTD = "/etc/sysconfig/libvirtd"
-def sasl_user_add(target_machine, username, password, util, logger):
+def sasl_user_add(target_machine, username, password, logger):
""" execute saslpasswd2 to add sasl user """
logger.info("add sasl user on server side")
saslpasswd2_add = "echo %s | %s -a libvirt %s" % (password, SASLPASSWD2, username)
@@ -35,7 +35,7 @@ def sasl_user_add(target_machine, username, password, util, logger):
return 0
def tcp_libvirtd_set(target_machine, username, password,
- listen_tcp, auth_tcp, util, logger):
+ listen_tcp, auth_tcp, logger):
""" configure libvirtd.conf on libvirt server """
logger.info("setting libvirtd.conf on libvirt server")
# open libvirtd --listen option
@@ -156,11 +156,11 @@ def tcp_setup(params):
return 1
if auth_tcp == 'sasl':
- if sasl_user_add(target_machine, username, password, util, logger):
+ if sasl_user_add(target_machine, username, password, logger):
return 1
if tcp_libvirtd_set(target_machine, username, password,
- listen_tcp, auth_tcp, util, logger):
+ listen_tcp, auth_tcp, logger):
return 1
if listen_tcp == 'disable':
diff --git a/repos/remoteAccess/tls_setup.py b/repos/remoteAccess/tls_setup.py
index 4e7c60d..f8b3cea 100644
--- a/repos/remoteAccess/tls_setup.py
+++ b/repos/remoteAccess/tls_setup.py
@@ -37,7 +37,7 @@ SERVERCERT = os.path.join(TEMP_TLS_FOLDER, 'servercert.pem')
CLIENTKEY = os.path.join(TEMP_TLS_FOLDER, 'clientkey.pem')
CLIENTCERT = os.path.join(TEMP_TLS_FOLDER, 'clientcert.pem')
-def CA_setting_up(util, logger):
+def CA_setting_up(logger):
""" setting up a Certificate Authority """
# Create a private key for CA
logger.info("generate CA certificates")
@@ -72,7 +72,7 @@ def CA_setting_up(util, logger):
logger.info("done the CA certificates job")
return 0
-def tls_server_cert(target_machine, util, logger):
+def tls_server_cert(target_machine, logger):
""" generating server certificates """
# Create tls server key
logger.info("generate server certificates")
@@ -114,7 +114,7 @@ def tls_server_cert(target_machine, util, logger):
logger.info("done the server certificates job")
return 0
-def tls_client_cert(local_machine, util, logger):
+def tls_client_cert(local_machine, logger):
""" generating client certificates """
# Create tls client key
logger.info("generate client certificates")
@@ -160,7 +160,7 @@ def tls_client_cert(local_machine, util, logger):
logger.info("done the client certificates job")
return 0
-def deliver_cert(target_machine, username, password, pkipath, util, logger):
+def deliver_cert(target_machine, username, password, pkipath, logger):
""" deliver CA, server and client certificates """
# transmit cacert.pem to remote host
logger.info("deliver CA, server and client certificates to both local and remote server")
@@ -218,7 +218,7 @@ def deliver_cert(target_machine, username, password, pkipath, util, logger):
logger.info("done to delivery")
return 0
-def sasl_user_add(target_machine, username, password, util, logger):
+def sasl_user_add(target_machine, username, password, logger):
""" execute saslpasswd2 to add sasl user """
logger.info("add sasl user on server side")
saslpasswd2_add = "echo %s | %s -a libvirt %s" % (password, SASLPASSWD2, username)
@@ -231,7 +231,7 @@ def sasl_user_add(target_machine, username, password, util, logger):
return 0
def tls_libvirtd_set(target_machine, username, password,
- listen_tls, auth_tls, util, logger):
+ listen_tls, auth_tls, logger):
""" configure libvirtd.conf on tls server """
logger.info("setting libvirtd.conf on tls server")
# open libvirtd --listen option
@@ -272,7 +272,7 @@ def tls_libvirtd_set(target_machine, username, password,
logger.info("done to libvirtd configuration")
return 0
-def iptables_stop(target_machine, username, password, util, logger):
+def iptables_stop(target_machine, username, password, logger):
""" This is a temprory method in favor of migration """
logger.info("stop local and remote iptables temprorily")
iptables_stop_cmd = "service iptables stop"
@@ -375,28 +375,28 @@ def tls_setup(params):
os.mkdir(TEMP_TLS_FOLDER)
- if iptables_stop(target_machine, username, password, util, logger):
+ if iptables_stop(target_machine, username, password, logger):
return 1
- if CA_setting_up(util, logger):
+ if CA_setting_up(logger):
return 1
- if tls_server_cert(target_machine, util, logger):
+ if tls_server_cert(target_machine, logger):
return 1
- if tls_client_cert(local_machine, util, logger):
+ if tls_client_cert(local_machine, logger):
return 1
if deliver_cert(target_machine, username,
- password, pkipath, util, logger):
+ password, pkipath, logger):
return 1
if auth_tls == 'sasl':
- if sasl_user_add(target_machine, username, password, util, logger):
+ if sasl_user_add(target_machine, username, password, logger):
return 1
if tls_libvirtd_set(target_machine, username, password,
- listen_tls, auth_tls, util, logger):
+ listen_tls, auth_tls, logger):
return 1
if listen_tls == 'disable':
diff --git a/repos/sVirt/domain_nfs_start.py b/repos/sVirt/domain_nfs_start.py
index 59cb267..88d349c 100644
--- a/repos/sVirt/domain_nfs_start.py
+++ b/repos/sVirt/domain_nfs_start.py
@@ -25,7 +25,7 @@ optional_params = {}
QEMU_CONF = "/etc/libvirt/qemu.conf"
-def nfs_setup(util, root_squash, logger):
+def nfs_setup(root_squash, logger):
"""setup nfs on localhost
"""
logger.info("set nfs service")
@@ -55,7 +55,7 @@ def nfs_setup(util, root_squash, logger):
return 0
-def prepare_env(util, d_ownership, virt_use_nfs, guestname, root_squash, \
+def prepare_env(d_ownership, virt_use_nfs, guestname, root_squash, \
disk_file, img_dir, logger):
"""set virt_use_nfs SElinux boolean, configure
dynamic_ownership in /etc/libvirt/qemu.conf
@@ -105,7 +105,7 @@ def prepare_env(util, d_ownership, virt_use_nfs, guestname, root_squash, \
copy(disk_file, "/tmp")
logger.info("set up nfs service on localhost")
- ret = nfs_setup(util, root_squash, logger)
+ ret = nfs_setup(root_squash, logger)
if ret:
return 1
@@ -165,7 +165,7 @@ def domain_nfs_start(params):
# set env
logger.info("prepare the environment")
- ret = prepare_env(util, dynamic_ownership, virt_use_nfs, guestname, \
+ ret = prepare_env(dynamic_ownership, virt_use_nfs, guestname, \
root_squash, disk_file, img_dir, logger)
if ret:
logger.error("failed to prepare the environment")
--
1.7.7.5
12 years, 10 months
[libvirt] [PATCH] cpu: Improve error reporting on incompatible CPUs
by Peter Krempa
This patch modifies the CPU comparrison function to report the
incompatibilities in more detail to ease identification of problems.
* src/cpu/cpu.h:
cpuGuestData(): Add argument to return detailed error message.
* src/cpu/cpu.c:
cpuGuestData(): Add passthrough for error argument.
* src/cpu/cpu_x86.c
x86FeatureNames(): Add function to convert a CPU definition to flag
names.
x86Compute(): - Add error message parameter
- Add macro for reporting detailed error messages.
- Improve error reporting.
- Simplify calculation of forbidden flags.
x86DataIteratorInit():
x86cpuidMatchAny(): Remove functions that are no longer needed.
* src/qemu/qemu_command.c:
qemuBuildCpuArgStr(): - Modify for new function prototype
- Add detailed error reports
- Change error code on incompatible processors
to VIR_ERR_CONFIG_UNSUPPORTED instead of
internal error
* tests/cputest.c:
cpuTestGuestData(): Modify for new function prototype
---
Sample of error message:
$ virsh start Bare
error: Failed to start domain Bare
error: unsupported configuration: guest and host CPU are not compatible: Host CPU does not provide required features: svm, avx
src/cpu/cpu.c | 7 ++-
src/cpu/cpu.h | 6 ++-
src/cpu/cpu_x86.c | 123 +++++++++++++++++++++++++++++++----------------
src/qemu/qemu_command.c | 12 ++++-
tests/cputest.c | 2 +-
5 files changed, 100 insertions(+), 50 deletions(-)
diff --git a/src/cpu/cpu.c b/src/cpu/cpu.c
index 01c31bb..b8ccd24 100644
--- a/src/cpu/cpu.c
+++ b/src/cpu/cpu.c
@@ -248,11 +248,12 @@ cpuNodeData(const char *arch)
virCPUCompareResult
cpuGuestData(virCPUDefPtr host,
virCPUDefPtr guest,
- union cpuData **data)
+ union cpuData **data,
+ char **msg)
{
struct cpuArchDriver *driver;
- VIR_DEBUG("host=%p, guest=%p, data=%p", host, guest, data);
+ VIR_DEBUG("host=%p, guest=%p, data=%p, msg=%p", host, guest, data, msg);
if ((driver = cpuGetSubDriver(host->arch)) == NULL)
return VIR_CPU_COMPARE_ERROR;
@@ -264,7 +265,7 @@ cpuGuestData(virCPUDefPtr host,
return VIR_CPU_COMPARE_ERROR;
}
- return driver->guestData(host, guest, data);
+ return driver->guestData(host, guest, data, msg);
}
diff --git a/src/cpu/cpu.h b/src/cpu/cpu.h
index 9f01f17..d7bc54e 100644
--- a/src/cpu/cpu.h
+++ b/src/cpu/cpu.h
@@ -70,7 +70,8 @@ typedef union cpuData *
typedef virCPUCompareResult
(*cpuArchGuestData) (virCPUDefPtr host,
virCPUDefPtr guest,
- union cpuData **data);
+ union cpuData **data,
+ char **message);
typedef virCPUDefPtr
(*cpuArchBaseline) (virCPUDefPtr *cpus,
@@ -138,7 +139,8 @@ cpuNodeData (const char *arch);
extern virCPUCompareResult
cpuGuestData(virCPUDefPtr host,
virCPUDefPtr guest,
- union cpuData **data);
+ union cpuData **data,
+ char **msg);
extern char *
cpuBaselineXML(const char **xmlCPUs,
diff --git a/src/cpu/cpu_x86.c b/src/cpu/cpu_x86.c
index 8d92649..e1500bf 100644
--- a/src/cpu/cpu_x86.c
+++ b/src/cpu/cpu_x86.c
@@ -31,6 +31,7 @@
#include "cpu.h"
#include "cpu_map.h"
#include "cpu_x86.h"
+#include "buf.h"
#define VIR_FROM_THIS VIR_FROM_CPU
@@ -89,16 +90,6 @@ struct data_iterator {
{ data, -1, false }
-static void
-x86DataIteratorInit(struct data_iterator *iter,
- union cpuData *data)
-{
- struct data_iterator init = DATA_ITERATOR_INIT(data);
-
- *iter = init;
-}
-
-
static int
x86cpuidMatch(const struct cpuX86cpuid *cpuid1,
const struct cpuX86cpuid *cpuid2)
@@ -121,17 +112,6 @@ x86cpuidMatchMasked(const struct cpuX86cpuid *cpuid,
}
-static int
-x86cpuidMatchAny(const struct cpuX86cpuid *cpuid,
- const struct cpuX86cpuid *mask)
-{
- return ((cpuid->eax & mask->eax) ||
- (cpuid->ebx & mask->ebx) ||
- (cpuid->ecx & mask->ecx) ||
- (cpuid->edx & mask->edx));
-}
-
-
static void
x86cpuidSetBits(struct cpuX86cpuid *cpuid,
const struct cpuX86cpuid *mask)
@@ -649,6 +629,34 @@ x86FeatureFind(const struct x86_map *map,
}
+static char *
+x86FeatureNames(const struct x86_map *map,
+ const char *separator,
+ union cpuData *data)
+{
+ virBuffer ret = VIR_BUFFER_INITIALIZER;
+ bool first = true;
+
+ struct x86_feature *next_feature = map->features;
+
+ virBufferAdd(&ret, "", 0);
+
+ while (next_feature) {
+ if (x86DataIsSubset(data, next_feature->data)) {
+ if (!first)
+ virBufferAdd(&ret, separator, -1);
+ else
+ first = false;
+
+ virBufferAdd(&ret, next_feature->name, -1);
+ }
+ next_feature = next_feature->next;
+ }
+
+ return virBufferContentAndReset(&ret);
+}
+
+
static int
x86FeatureLoad(xmlXPathContextPtr ctxt,
struct x86_map *map)
@@ -1115,10 +1123,34 @@ error:
}
+/* A helper macro to exit the cpu computation function without writing
+ * redundant code:
+ * MSG: error message
+ * CPU_DEF: a union cpuData pointer with flags that are conflicting
+ * RET: return code to set
+ *
+ * This macro generates the error string outputs it into logs.
+ */
+#define virX86CpuIncompatible(MSG, CPU_DEF) \
+ do { \
+ char *flagsStr = NULL; \
+ if (!(flagsStr = x86FeatureNames(map, ", ", (CPU_DEF)))) \
+ goto no_memory; \
+ if (message && \
+ virAsprintf(message, "%s: %s", _(MSG), flagsStr) < 0) { \
+ VIR_FREE(flagsStr); \
+ goto no_memory; \
+ } \
+ VIR_DEBUG("%s: %s", MSG, flagsStr); \
+ VIR_FREE(flagsStr); \
+ ret = VIR_CPU_COMPARE_INCOMPATIBLE; \
+ } while (0);
+
static virCPUCompareResult
x86Compute(virCPUDefPtr host,
virCPUDefPtr cpu,
- union cpuData **guest)
+ union cpuData **guest,
+ char **message)
{
struct x86_map *map = NULL;
struct x86_model *host_model = NULL;
@@ -1129,8 +1161,6 @@ x86Compute(virCPUDefPtr host,
struct x86_model *cpu_forbid = NULL;
struct x86_model *diff = NULL;
struct x86_model *guest_model = NULL;
- struct data_iterator iter;
- const struct cpuX86cpuid *cpuid;
virCPUCompareResult ret;
enum compare_result result;
unsigned int i;
@@ -1147,6 +1177,11 @@ x86Compute(virCPUDefPtr host,
if (!found) {
VIR_DEBUG("CPU arch %s does not match host arch", cpu->arch);
+ if (message &&
+ virAsprintf(message,
+ _("CPU arch %s does not match host arch"),
+ cpu->arch) < 0)
+ goto no_memory;
return VIR_CPU_COMPARE_INCOMPATIBLE;
}
}
@@ -1155,6 +1190,12 @@ x86Compute(virCPUDefPtr host,
(!host->vendor || STRNEQ(cpu->vendor, host->vendor))) {
VIR_DEBUG("host CPU vendor does not match required CPU vendor %s",
cpu->vendor);
+ if (message &&
+ virAsprintf(message,
+ _("host CPU vendor does not match required "
+ "CPU vendor %s"),
+ cpu->vendor) < 0)
+ goto no_memory;
return VIR_CPU_COMPARE_INCOMPATIBLE;
}
@@ -1167,24 +1208,19 @@ x86Compute(virCPUDefPtr host,
!(cpu_forbid = x86ModelFromCPU(cpu, map, VIR_CPU_FEATURE_FORBID)))
goto error;
- x86DataIteratorInit(&iter, cpu_forbid->data);
- while ((cpuid = x86DataCpuidNext(&iter))) {
- const struct cpuX86cpuid *cpuid2;
-
- cpuid2 = x86DataCpuid(host_model->data, cpuid->function);
- if (cpuid2 != NULL && x86cpuidMatchAny(cpuid2, cpuid)) {
- VIR_DEBUG("Host CPU provides forbidden features in CPUID function 0x%x",
- cpuid->function);
- ret = VIR_CPU_COMPARE_INCOMPATIBLE;
- goto out;
- }
+ x86DataIntersect(cpu_forbid->data, host_model->data);
+ if (!x86DataIsEmpty(cpu_forbid->data)) {
+ virX86CpuIncompatible("Host CPU provides forbidden features",
+ cpu_forbid->data);
+ goto out;
}
x86DataSubtract(cpu_require->data, cpu_disable->data);
result = x86ModelCompare(host_model, cpu_require);
if (result == SUBSET || result == UNRELATED) {
- VIR_DEBUG("Host CPU does not provide all required features");
- ret = VIR_CPU_COMPARE_INCOMPATIBLE;
+ x86DataSubtract(cpu_require->data, host_model->data);
+ virX86CpuIncompatible("Host CPU does not provide required features",
+ cpu_require->data);
goto out;
}
@@ -1204,8 +1240,9 @@ x86Compute(virCPUDefPtr host,
if (ret == VIR_CPU_COMPARE_SUPERSET
&& cpu->type == VIR_CPU_TYPE_GUEST
&& cpu->match == VIR_CPU_MATCH_STRICT) {
- VIR_DEBUG("Host CPU does not strictly match guest CPU");
- ret = VIR_CPU_COMPARE_INCOMPATIBLE;
+ virX86CpuIncompatible("Host CPU does not strictly match guest CPU: "
+ "Extra features",
+ diff->data);
goto out;
}
@@ -1246,22 +1283,24 @@ error:
ret = VIR_CPU_COMPARE_ERROR;
goto out;
}
+#undef virX86CpuIncompatible
static virCPUCompareResult
x86Compare(virCPUDefPtr host,
virCPUDefPtr cpu)
{
- return x86Compute(host, cpu, NULL);
+ return x86Compute(host, cpu, NULL, NULL);
}
static virCPUCompareResult
x86GuestData(virCPUDefPtr host,
virCPUDefPtr guest,
- union cpuData **data)
+ union cpuData **data,
+ char **message)
{
- return x86Compute(host, guest, data);
+ return x86Compute(host, guest, data, message);
}
diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c
index 8dedd80..45cd417 100644
--- a/src/qemu/qemu_command.c
+++ b/src/qemu/qemu_command.c
@@ -3704,6 +3704,7 @@ qemuBuildCpuArgStr(const struct qemud_driver *driver,
const char *default_model;
union cpuData *data = NULL;
bool have_cpu = false;
+ char *compare_msg = NULL;
int ret = -1;
virBuffer buf = VIR_BUFFER_INITIALIZER;
int i;
@@ -3740,11 +3741,17 @@ qemuBuildCpuArgStr(const struct qemud_driver *driver,
cpuUpdate(cpu, host) < 0)
goto cleanup;
- cmp = cpuGuestData(host, cpu, &data);
+ cmp = cpuGuestData(host, cpu, &data, &compare_msg);
switch (cmp) {
case VIR_CPU_COMPARE_INCOMPATIBLE:
- qemuReportError(VIR_ERR_INTERNAL_ERROR, "%s",
+ if (compare_msg) {
+ qemuReportError(VIR_ERR_CONFIG_UNSUPPORTED,
+ _("guest and host CPU are not compatible: %s"),
+ compare_msg);
+ } else {
+ qemuReportError(VIR_ERR_CONFIG_UNSUPPORTED,
_("guest CPU is not compatible with host CPU"));
+ }
/* fall through */
case VIR_CPU_COMPARE_ERROR:
goto cleanup;
@@ -3848,6 +3855,7 @@ qemuBuildCpuArgStr(const struct qemud_driver *driver,
ret = 0;
cleanup:
+ VIR_FREE(compare_msg);
if (host)
cpuDataFree(host->arch, data);
virCPUDefFree(guest);
diff --git a/tests/cputest.c b/tests/cputest.c
index 01db8f1..ccc17fd 100644
--- a/tests/cputest.c
+++ b/tests/cputest.c
@@ -269,7 +269,7 @@ cpuTestGuestData(const void *arg)
!(cpu = cpuTestLoadXML(data->arch, data->name)))
goto cleanup;
- cmpResult = cpuGuestData(host, cpu, &guestData);
+ cmpResult = cpuGuestData(host, cpu, &guestData, NULL);
if (cmpResult == VIR_CPU_COMPARE_ERROR ||
cmpResult == VIR_CPU_COMPARE_INCOMPATIBLE)
goto cleanup;
--
1.7.3.4
12 years, 10 months
[libvirt] [test-API PATCH] Fix a bug in the case that clean flag is used
by Guannan Ren
When clean flag is used in testcase, the framework
reports 'KeyError'.
The bug is caused is by getting mod_case earlier
than checking whether the 'clean' flag is present or not.
The testcases without flag set doesn't be affected.
---
src/generator.py | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/src/generator.py b/src/generator.py
index 6a46889..2e4ae07 100644
--- a/src/generator.py
+++ b/src/generator.py
@@ -115,11 +115,11 @@ class FuncGen(object):
clean_flag = False
mod_case_func = self.case_name_list[i]
- mod_case = mod_case_func.rsplit(":", 1)[0]
if mod_case_func.endswith(':clean'):
mod_case_func = mod_case_func[:-6]
clean_flag = True
+ mod_case = mod_case_func.rsplit(":", 1)[0]
self.fmt.print_start(mod_case, env_logger)
case_params = self.case_params_list[i]
--
1.7.7.5
12 years, 10 months
[libvirt] [test-API PATCH 0/2] support variables share across testcases
by Guannan Ren
These two patch is to create a shared module in the root of test-API
The framework will create connection object for shared use in testcases
based on environment checking results.
sharedmod.py
# This is a module for variable sharing across testcases during
# running. You have to import it in each of testcases which want
# to share data. The framwork have already set 'conn' for use in
# testcases.
# connection object in libvirt.py
conn = None
# shared variables for customized use in testcases
# Note: please set them to None at the end of sharing
defined_var1 = None
defined_var2 = None
defined_var3 = None
12 years, 10 months
[libvirt] [test-API 00/17] Reorgnize/refactoring round 4
by Osier Yang
Perhaps this set shouldn't be called reorgnize/refactoring,
but to keep the same title in the series, it's still used.
The mainly work this set do is to use the TERM "domain"
instead of "guest" in codes.
Osier Yang (17):
Destroy src/dist and move env_inspect.py back
Substitute guest_names with domain_names
Rename src/env_parser.py as src/global_parser.py
Substitute guest_ with domain_
Substitue guestobj with domobj
Substitute guestxml with domxml
Substitute _guest with _domain
Substitute 'guest ' with 'domain '
Substitute guestos with os_type
Substitute guestarch with os_arch
Substitute 'guestip' with 'domip'
Substitute 'guest"' with 'domain"'
Substitute '\<gname\>' with 'domname'
Change the section name 'guest' into 'domain' in global.cfg
Substitute 'guestinstxml' with 'domxml'
Substitute '\<guest\>' with 'domain'
Substitute 'guestname' with 'domain_name'
cases/consumption_cpu_topology.conf | 14 +-
cases/consumption_domain_nfs_start.conf | 8 +-
cases/consumption_eventhandler.conf | 12 +-
cases/consumption_libvirtd.conf | 10 +-
cases/consumption_ownership_test.conf | 8 +-
cases/domain_linux_net_inst.conf | 12 +-
cases/linux_domain.conf | 52 +++---
cases/migration/ssh_persistent_paused_no_dst.conf | 74 ++++----
.../migration/ssh_persistent_paused_with_dst.conf | 98 ++++++------
cases/migration/ssh_persistent_running_no_dst.conf | 74 ++++----
.../migration/ssh_persistent_running_with_dst.conf | 98 ++++++------
cases/migration/ssh_transient_paused_no_dst.conf | 48 +++---
cases/migration/ssh_transient_paused_with_dst.conf | 74 ++++----
cases/migration/ssh_transient_running_no_dst.conf | 50 +++---
.../migration/ssh_transient_running_with_dst.conf | 74 ++++----
cases/migration/tcp_persistent_paused_no_dst.conf | 74 ++++----
.../migration/tcp_persistent_paused_with_dst.conf | 98 ++++++------
cases/migration/tcp_persistent_running_no_dst.conf | 74 ++++----
.../migration/tcp_persistent_running_with_dst.conf | 98 ++++++------
.../tcp_sasl_persistent_paused_no_dst.conf | 26 ++--
.../tcp_sasl_persistent_paused_with_dst.conf | 34 ++--
.../tcp_sasl_persistent_running_no_dst.conf | 26 ++--
.../tcp_sasl_persistent_running_with_dst.conf | 34 ++--
.../tcp_sasl_transient_paused_no_dst.conf | 18 +-
.../tcp_sasl_transient_paused_with_dst.conf | 26 ++--
.../tcp_sasl_transient_running_no_dst.conf | 18 +-
.../tcp_sasl_transient_running_with_dst.conf | 26 ++--
cases/migration/tcp_transient_paused_no_dst.conf | 48 +++---
cases/migration/tcp_transient_paused_with_dst.conf | 74 ++++----
cases/migration/tcp_transient_running_no_dst.conf | 50 +++---
.../migration/tcp_transient_running_with_dst.conf | 74 ++++----
cases/migration/tls_persistent_paused_no_dst.conf | 74 ++++----
.../migration/tls_persistent_paused_with_dst.conf | 98 ++++++------
cases/migration/tls_persistent_running_no_dst.conf | 74 ++++----
.../migration/tls_persistent_running_with_dst.conf | 98 ++++++------
.../tls_sasl_persistent_paused_no_dst.conf | 26 ++--
.../tls_sasl_persistent_paused_with_dst.conf | 34 ++--
.../tls_sasl_persistent_running_no_dst.conf | 26 ++--
.../tls_sasl_persistent_running_with_dst.conf | 34 ++--
.../tls_sasl_transient_paused_no_dst.conf | 18 +-
.../tls_sasl_transient_paused_with_dst.conf | 26 ++--
.../tls_sasl_transient_running_no_dst.conf | 18 +-
.../tls_sasl_transient_running_with_dst.conf | 26 ++--
cases/migration/tls_transient_paused_no_dst.conf | 48 +++---
cases/migration/tls_transient_paused_with_dst.conf | 74 ++++----
cases/migration/tls_transient_running_no_dst.conf | 50 +++---
.../migration/tls_transient_running_with_dst.conf | 74 ++++----
cases/snapshot.conf | 30 ++--
cases/windows_domain.conf | 50 +++---
.../en-US/Creating_a_configuration_file.xml | 116 ++++++------
.../en-US/Understanding_libvirt-test-API.xml | 8 +-
.../en-US/Writing_a_test_case.xml | 74 ++++----
.../libvirt-test-API_Guide/en-US/extras/log.txt | 18 +-
global.cfg | 34 ++--
repos/domain/attach_disk.py | 20 +-
repos/domain/attach_interface.py | 20 +-
repos/domain/autostart.py | 24 ++--
repos/domain/balloon_memory.py | 64 ++++----
repos/domain/blkstats.py | 12 +-
repos/domain/console_io.py | 12 +-
repos/domain/console_mutex.py | 8 +-
repos/domain/cpu_affinity.py | 44 +++---
repos/domain/cpu_topology.py | 72 ++++----
repos/domain/create.py | 22 ++--
repos/domain/define.py | 16 +-
repos/domain/destroy.py | 28 ++--
repos/domain/detach_disk.py | 20 +-
repos/domain/detach_interface.py | 22 ++--
repos/domain/domain_blkinfo.py | 26 ++--
repos/domain/domain_id.py | 18 +-
repos/domain/domain_list.py | 22 ++--
repos/domain/domain_name.py | 4 +-
repos/domain/domain_uuid.py | 34 ++--
repos/domain/domblkinfo.py | 26 ++--
repos/domain/dump.py | 42 +++---
repos/domain/eventhandler.py | 60 ++++----
repos/domain/ifstats.py | 20 +-
repos/domain/install_image.py | 56 +++---
repos/domain/install_linux_cdrom.py | 182 ++++++++++----------
repos/domain/install_linux_check.py | 78 ++++----
repos/domain/install_linux_net.py | 162 +++++++++---------
repos/domain/install_windows_cdrom.py | 160 +++++++++---------
repos/domain/migrate.py | 52 +++---
repos/domain/ownership_test.py | 26 ++--
repos/domain/reboot.py | 4 +-
repos/domain/restore.py | 48 +++---
repos/domain/resume.py | 12 +-
repos/domain/save.py | 52 +++---
repos/domain/sched_params.py | 20 +-
repos/domain/screenshot.py | 4 +-
repos/domain/shutdown.py | 14 +-
repos/domain/start.py | 16 +-
repos/domain/suspend.py | 12 +-
repos/domain/undefine.py | 14 +-
repos/domain/update_devflag.py | 52 +++---
repos/libvirtd/qemu_hang.py | 36 ++--
repos/libvirtd/restart.py | 58 +++---
.../multiple_thread_block_on_domain_create.py | 56 +++---
repos/sVirt/domain_nfs_start.py | 112 ++++++------
repos/snapshot/delete.py | 32 ++--
repos/snapshot/file_flag.py | 42 +++---
repos/snapshot/flag_check.py | 34 ++--
repos/snapshot/internal_create.py | 28 ++--
repos/snapshot/revert.py | 22 ++--
repos/snapshot/snapshot_list.py | 26 ++--
src/{dist/redhat => }/env_inspect.py | 14 +-
src/generator.py | 13 +-
src/{env_parser.py => global_parser.py} | 4 +-
src/parser.py | 4 +-
utils/dev_num.sh | 10 +-
utils/disk_num.sh | 10 +-
utils/utils.py | 18 +-
utils/xml_builder.py | 12 +-
utils/xml_generator.py | 6 +-
114 files changed, 2381 insertions(+), 2388 deletions(-)
delete mode 100644 src/dist/__init__.py
delete mode 100644 src/dist/redhat/__init__.py
rename src/{dist/redhat => }/env_inspect.py (91%)
rename src/{env_parser.py => global_parser.py} (97%)
Regards,
Osier
--
1.7.7.3
12 years, 10 months
[libvirt] [PATCH] building: remove libvirt_dbus.syms from EXTRA_DIST
by Wen Congyang
commit 2223ea98 removes src/libvirt_dbus.syms, but it forgets
to remove it from EXTRA_DIST. It will cause 'make dist' failed.
---
src/Makefile.am | 1 -
1 files changed, 0 insertions(+), 1 deletions(-)
diff --git a/src/Makefile.am b/src/Makefile.am
index b8a19b4..e48dfa5 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -1230,7 +1230,6 @@ EXTRA_DIST += \
libvirt_driver_modules.syms \
libvirt_daemon.syms \
libvirt_linux.syms \
- libvirt_dbus.syms \
libvirt_network.syms \
libvirt_nwfilter.syms \
libvirt_sasl.syms \
--
1.7.1
12 years, 10 months
[libvirt] [PATCH] vbox: avoid provoking assertions in VBoxSVC
by Jean-Baptiste Rouault
Passing a NULL pointer to IMachine::delete virtualbox API
causes VBoxSVC to raise an assertion. This patch passes
an empty array instead.
---
src/vbox/vbox_tmpl.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/src/vbox/vbox_tmpl.c b/src/vbox/vbox_tmpl.c
index 68e3b05..be25828 100644
--- a/src/vbox/vbox_tmpl.c
+++ b/src/vbox/vbox_tmpl.c
@@ -5294,7 +5294,8 @@ vboxDomainUndefineFlags(virDomainPtr dom, unsigned int flags)
((IMachine_Delete)machine->vtbl->Delete)(machine, &safeArray, &progress);
# else
- machine->vtbl->Delete(machine, 0, NULL, &progress);
+ vboxArray array = VBOX_ARRAY_INITIALIZER;
+ machine->vtbl->Delete(machine, 0, (IMedium**)&array, &progress);
# endif
if (progress != NULL) {
progress->vtbl->WaitForCompletion(progress, -1);
--
1.7.9.1
12 years, 10 months