From 7bdee4adefca6faf9242a81ca1c8db4f18b40435 Mon Sep 17 00:00:00 2001 From: Daniel Veillard Date: Mon, 19 Mar 2007 10:15:52 +0000 Subject: [PATCH] * src/libvirt.c: patch from Atsushi SAKAI, fixing virsh access as root when libvirt_qemud is not running * TODO: updated Daniel --- ChangeLog | 6 ++++++ TODO | 44 +------------------------------------------- src/libvirt.c | 4 ++-- 3 files changed, 9 insertions(+), 45 deletions(-) diff --git a/ChangeLog b/ChangeLog index 808cf31f2b..b9f3ec85e9 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +Mon Mar 19 11:13:58 CET 2007 Daniel Veillard + + * src/libvirt.c: patch from Atsushi SAKAI, fixing virsh access + as root when libvirt_qemud is not running + * TODO: updated + Mon Mar 19 10:44:25 CET 2007 Daniel Veillard * src/virsh.c: patch from Masayuki Sunou, checking that byte diff --git a/TODO b/TODO index a302f42958..b739d7f327 100644 --- a/TODO +++ b/TODO @@ -1,41 +1,13 @@ TODO: -- libvirt-proxy dropping root priviledge after initialization. -- check impact of HVM device rename - http://lists.xensource.com/archives/html/xen-devel/2006-08/msg00369.html -- Finish integration of vCPU and affinity APIs - https://www.redhat.com/archives/libvir-list/2006-August/msg00017.html +- libvirt_virDomainSetMemory should check memory is > 0 - check how to better handle renaming of domains (xm rename and cache) -- Create() API, how do we best keep flexibility and allow various - specific environment and space for evolution (VMX) -- track change of xend API & XML-RPC -- API for the Node: selecting scheduling policy -- better resources allocation APIs (%CPU, set memory) -- DTD/RNG/XSD schemas for the XML Domain descriptions -- in python bindings raise an exception if a lookup or connection fails - to return a non-None object -- add error handling hooks at the python level -- object unicity for domains at the Python level - UUID lookup in hash.c Other environment: -- support for QEmu - support for UML - + in both case raises the problem of listing the domains + UML control layer should be easy at least for one user but incomplete - + QEmu control is not easy to plug, c.f. discussion on-list - -virsh TODO: -- decide where will be default directory for domains configurations (/etc/xen/domains/* ?) -- new cmd: create new domain by config file (like "xm create") - create [--conf /path/file.conf | name] -- new cmd: print info about domain configuration: - cinfo [--conf /path/file.conf | name] -- new cmd: print list of all domains configurations: - clist [--dir /path] -- new cmd: print info about saved domain image: - sinfo /path/domain.img Probable TODOs: - event on big domain state change (create, crashed, paused, shutdown, destroy) @@ -50,17 +22,3 @@ Cleanup: - now that libxml2 is linked in, drop hash.[ch] and get back to libxml2 ones ? same for the buffers -Done: -- make dist and make rpm targets -- set a no public by default policy for libvir symbols -- fix the python bindings -- renamed to libvirt -- the CreateLinux() API is a first step toward a final Create() -- documentation and examples on using the toolkit -- UUID based lookup and naming -- Error API similar to libxml2 structured API -- extract error messages from the Xend rpc -- API for the Node: extracting informations -- docs for the principle in the error handling code -- thread protection, reentrancy, refcounting, etc ... -- Add uuid to XML format diff --git a/src/libvirt.c b/src/libvirt.c index cdb5c67196..df99b62281 100644 --- a/src/libvirt.c +++ b/src/libvirt.c @@ -322,7 +322,7 @@ virConnectOpen(const char *name) } } - if (ret->nb_drivers == 0 || ret->nb_network_drivers == 0) { + if ((ret->nb_drivers == 0) && (ret->nb_network_drivers == 0)) { /* we failed to find an adequate driver */ virLibConnError(NULL, VIR_ERR_NO_SUPPORT, name); goto failed; @@ -389,7 +389,7 @@ virConnectOpenReadOnly(const char *name) ret->networkDrivers[ret->nb_network_drivers++] = virNetworkDriverTab[i]; } } - if (ret->nb_drivers == 0) { + if ((ret->nb_drivers == 0) && (ret->nb_network_drivers == 0)) { if (name == NULL) virLibConnError(NULL, VIR_ERR_NO_CONNECT, _("Xen Daemon or Xen Store"));