FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Redhat > Cluster Development

 
 
LinkBack Thread Tools
 
Old 11-19-2007, 04:03 PM
 
Default [Cluster-devel] cluster/fence/agents/xvm fence_xvmd.c xml.c

CVSROOT: /cvs/cluster
Module name: cluster
Branch: RHEL5
Changes by: lhh@sourceware.org 2007-11-19 17:03:27

Modified files:
fence/agents/xvm: fence_xvmd.c xml.c

Log message:
Ancillary NOCLUSTER mode fixes for fence_xvmd

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/fence/agents/xvm/fence_xvmd.c.diff?cvsroot=cluster&only_with_tag=RH EL5&r1=1.4.2.8&r2=1.4.2.9
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/fence/agents/xvm/xml.c.diff?cvsroot=cluster&only_with_tag=RHEL5&r1= 1.1.2.3&r2=1.1.2.4

--- cluster/fence/agents/xvm/fence_xvmd.c 2007/11/14 18:41:27 1.4.2.8
+++ cluster/fence/agents/xvm/fence_xvmd.c 2007/11/19 17:03:27 1.4.2.9
@@ -219,7 +219,8 @@

int
do_fence_request_tcp(fence_req_t *req, fence_auth_type_t auth,
- void *key, size_t key_len, virConnectPtr vp)
+ void *key, size_t key_len, virConnectPtr vp,
+ int flags)
{
int fd = -1, ret = -1;
virDomainPtr vdp;
@@ -227,7 +228,7 @@
char *domain_desc, *domain_desc_sanitized;
size_t sz;

- if (!(vdp = get_domain(req, vp))) {
+ if (!(vdp = get_domain(req, vp)) && (!(flags & F_NOCLUSTER))) {
dbg_printf(2, "Could not find domain: %s
", req->domain);
goto out;
}
@@ -246,6 +247,12 @@
break;
case FENCE_OFF:
printf("Destroying domain %s...
", (char *)req->domain);
+ if (!vdp && (flags & F_NOCLUSTER)) {
+ dbg_printf(2, "[OFF + NOCLUSTER] Nothing to do - "
+ "domain does not exist
");
+ response = 0;
+ break;
+ }

dbg_printf(2, "[OFF] Calling virDomainDestroy
");
ret = virDomainDestroy(vdp);
@@ -263,6 +270,14 @@
case FENCE_REBOOT:
printf("Rebooting domain %s...
",
(char *)req->domain);
+
+ if (!vdp && (flags & F_NOCLUSTER)) {
+ dbg_printf(2, "[REBOOT + NOCLUSTER] Nothing to do - "
+ "domain does not exist
");
+ response = 0;
+ break;
+ }
+
domain_desc = virDomainGetXMLDesc(vdp, 0);

if (domain_desc) {
@@ -283,10 +298,10 @@
"libvirt
");
}

- dbg_printf(2, "[REBOOT] Calling virDomainDestroy
");
+ dbg_printf(2, "[REBOOT] Calling virDomainDestroy(%p)
", vdp);
ret = virDomainDestroy(vdp);
if (ret < 0) {
- printf("virDomainDestroy() failed: %d
", ret);
+ printf("virDomainDestroy() failed: %d/%d
", ret, errno);
if (domain_desc)
free(domain_desc);
break;
@@ -652,7 +667,7 @@
case AUTH_SHA512:
printf("Plain TCP request
");
do_fence_request_tcp(&data, args->auth, key,
- key_len, vp);
+ key_len, vp, args->flags);
break;
default:
printf("XXX Unhandled authentication
");
--- cluster/fence/agents/xvm/xml.c 2007/10/10 16:14:15 1.1.2.3
+++ cluster/fence/agents/xvm/xml.c 2007/11/19 17:03:27 1.1.2.4
@@ -82,6 +82,8 @@
flip_graphics_port(doc);

os_node = get_os_node(doc);
+ if (!os_node)
+ return -1;

curr = os_node->children;
while (curr) {
 

Thread Tools




All times are GMT. The time now is 07:22 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org