Cluster Project branch, master, updated. cluster-2.99.04-28-gcf2bdc6
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Cluster Project".
The branch, master has been updated
via cf2bdc610f8105d3e62c561cda844631886d5604 (commit)
via faf2d0e4015abe7cf9617591bb808cd9375e69af (commit)
via 897be8d5063c37ed2f0682ced12cb693d59b4e66 (commit)
from db7da413674f09409fdfe4c4af7b3a5dc76900ef (commit)Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below.
- Log ----------------------------------------------------------------- commit cf2bdc610f8105d3e62c561cda844631886d5604
Author: Lon Hohberger <[email protected]> Date: Mon Nov 19 17:28:33 2007 +0000
Ancillary NOCLUSTER mode fixes for fence_xvmd
commit faf2d0e4015abe7cf9617591bb808cd9375e69af
Author: Lon Hohberger <[email protected]> Date: Mon Nov 19 17:03:27 2007 +0000
Ancillary NOCLUSTER mode fixes for fence_xvmd
commit 897be8d5063c37ed2f0682ced12cb693d59b4e66
Author: Lon Hohberger <[email protected]> Date: Tue Jun 17 15:39:39 2008 -0400
Fix #362351 - make fence_xvmd work in no-cluster mode
Conflicts:
fence/agents/xvm/fence_xvmd.c
fence/agents/xvm/options.c
-----------------------------------------------------------------------
Summary of changes:
fence/agents/xvm/fence_xvmd.c | 38 ++++++++++++++++++++++++++++++++------ fence/agents/xvm/options.c | 1 - fence/agents/xvm/xml.c | 2 ++ fence/man/fence_xvmd.8 | 7 +++++++ 4 files changed, 41 insertions(+), 7 deletions(-)
fence/agents/xvm/fence_xvmd.c +32 -6
@@ -204,15 +204,17 @@ wait_domain(fence_req_t *req, virConnectPtr vp, int timeout)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; +virDomainInfo vdi;char response =1 ;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\n" , req->domain); goto out; }
@@ -231,6 +233,17 @@ do_fence_request_tcp(fence_req_t *req, fence_auth_type_t auth,break ;case FENCE_OFF :printf ("Destroying domain %s...\n" , (char *)req->domain); +if (flags &F_NOCLUSTER ) { +if (!vdp || + ((virDomainGetInfo (vdp, &vdi) ==0 ) && + (vdi.state ==VIR_DOMAIN_SHUTOFF ))) { +dbg_printf (2 ,"[NOCLUSTER] Nothing to " +"do - domain does not exist\n" ); + response =0 ; +break ; + } + } +dbg_printf (2 ,"[OFF] Calling virDomainDestroy\n" ); ret =virDomainDestroy (vdp);
@@ -248,6 +261,18 @@ do_fence_request_tcp(fence_req_t *req, fence_auth_type_t auth,case FENCE_REBOOT :printf ("Rebooting domain %s...\n" , (char *)req->domain); + +if (flags &F_NOCLUSTER ) { +if (!vdp || + ((virDomainGetInfo (vdp, &vdi) ==0 ) && + (vdi.state ==VIR_DOMAIN_SHUTOFF ))) { +dbg_printf (2 ,"[NOCLUSTER] Nothing to " +"do - domain does not exist\n" ); + response =0 ; +break ; + } + } + domain_desc =virDomainGetXMLDesc (vdp,0 );if (domain_desc) {
@@ -268,10 +293,10 @@ do_fence_request_tcp(fence_req_t *req, fence_auth_type_t auth, "libvirt\n"); } -dbg_printf (2 ,"[REBOOT] Calling virDomainDestroy\n" ); +dbg_printf (2 ,"[REBOOT] Calling virDomainDestroy(%p)\n" , vdp); ret =virDomainDestroy (vdp);if (ret <0 ) { -printf ("virDomainDestroy() failed: %d\n" , ret); +printf ("virDomainDestroy() failed: %d/%d\n" , ret, errno);if (domain_desc)free (domain_desc);break ;
@@ -290,7 +315,7 @@ do_fence_request_tcp(fence_req_t *req, fence_auth_type_t auth, }break ; } - +dbg_printf (3 ,"Sending response to caller...\n" );if (write (fd, &response,1 ) <0 ) {perror ("write" );
@@ -658,7 +683,7 @@ xvmd_loop(cman_handle_t ch, void *h, int fd, fence_xvm_args_t *args,case AUTH_SHA512 :printf ("Plain TCP request\n" );do_fence_request_tcp (&data, args->auth, key, - key_len, vp); + key_len, vp, args->flags);break ;default :printf ("XXX Unhandled authentication\n" );
@@ -793,6 +818,7 @@ main(int argc, char **argv)if (x)printf ("Checkpoint initialized\n" ); } +if (args.family ==PF_INET ) mc_sock =ipv4_recv_sk (args.addr, args.port);else
fence/agents/xvm/options.c +0 -1
@@ -253,7 +253,6 @@ assign_nocluster(fence_xvm_args_t *args, struct arg_info *arg, char *value) } -/** ALL valid command line and stdin arguments for this fencing agent */ static struct arg_info _arg_info[] = { {'\xff' ,NULL ,"agent" ,
fence/agents/xvm/xml.c +2 -0
@@ -82,6 +82,8 @@ cleanup_xml_doc(xmlDocPtr doc)flip_graphics_port (doc); os_node =get_os_node (doc); +if (!os_node) +return -1 ; curr = os_node->children;while (curr) {
fence/man/fence_xvmd.8 +7 -0
@@ -74,6 +74,13 @@ parameters (because they are cluster-wide), so if you need to override a configuration option contained in CCS, you must specify this parameter. \fB-V\fP +.TP +\fB-L\fP +Local-only / non-cluster mode. When used with -X, this this option +prevents fence_xvmd from operating as a clustered service, obviating +the need to configure/run CMAN on the host domain. +.TP +\fB-V\fP Print out a version message, then exit. .SH CCS PARAMETERS
hooks/post-receive
--
Cluster Project