From: Soren Hansen Date: Fri, 14 Dec 2007 09:24:44 +0100 Subject: [Cluster-devel] [PATCH] libvirt xen uri Message-ID: <20071214082444.GM1707@atlas.linux2go.dk> List-Id: To: cluster-devel.redhat.com MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Hi! In Ubuntu we've changed libvirt to connect to qemu:///session rather than xen:/// if no URI is passed to virConnectOpen. fence_xvmd incidentally does not pass a URI to virConnectOpen and hence will fail. This patch fixes this old and deprecated use of virConnectOpen. Thank you! (Also available as http://people.ubuntu.com/~soren/libvirt_xen_uri.diff) Index: fence/agents/xvm/fence_xvmd.c =================================================================== RCS file: /cvs/cluster/cluster/fence/agents/xvm/fence_xvmd.c,v retrieving revision 1.13 diff -u -r1.13 fence_xvmd.c --- fence/agents/xvm/fence_xvmd.c 17 Oct 2007 18:29:57 -0000 1.13 +++ fence/agents/xvm/fence_xvmd.c 14 Dec 2007 08:07:01 -0000 @@ -54,6 +54,8 @@ #include "libcman.h" #include "debug.h" +#define LIBVIRT_XEN_URI "xen:///" + static int running = 1; @@ -541,7 +543,7 @@ virt_list_t *vl = NULL; virt_state_t *dom = NULL; - vp = virConnectOpen(NULL); + vp = virConnectOpen(LIBVIRT_XEN_URI); if (!vp) perror("virConnectOpen"); @@ -577,7 +579,7 @@ continue; /* Request and/or timeout: open connection */ - vp = virConnectOpen(NULL); + vp = virConnectOpen(LIBVIRT_XEN_URI); if (!vp) { printf("NOTICE: virConnectOpen(): %s; cannot fence!\n", strerror(errno)); -- Soren Hansen Ubuntu Server Team http://www.ubuntu.com/ -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 189 bytes Desc: Digital signature URL: