Cluster Project branch, STABLE2, updated. cluster-2.03.04-16-gc09bd25
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, STABLE2 has been updated
via c09bd25b65204a44bf22aaec38fc66f7be66e038 (commit)
via 82cce806f7052ce61d1f726a0e8e8c083db01da6 (commit)
via 4a7e308a068daf2ab468dda47e5f819ec05d9517 (commit)
from a2c34ee98442ba23aac8dd3fe6d19b22f3d65b6d (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 c09bd25b65204a44bf22aaec38fc66f7be66e038
Author: Lon Hohberger <[email protected]> Date: Mon Nov 19 17:28:33 2007 +0000
Ancillary NOCLUSTER mode fixes for fence_xvmd
commit 82cce806f7052ce61d1f726a0e8e8c083db01da6
Author: Lon Hohberger <[email protected]> Date: Mon Nov 19 17:03:27 2007 +0000
Ancillary NOCLUSTER mode fixes for fence_xvmd
commit 4a7e308a068daf2ab468dda47e5f819ec05d9517
Author: Lon Hohberger <[email protected]> Date: Tue Jun 17 15:45:45 2008 -0400
Fix #362351 - make fence_xvmd work in no-cluster mode
Resolve Conflicts:
fence/agents/xvm/options.c
-----------------------------------------------------------------------
Summary of changes:
fence/agents/xvm/fence_xvmd.c | 37 +++++++++++++++++++++++++++++++------ fence/agents/xvm/options.c | 1 - fence/agents/xvm/xml.c | 2 ++ fence/man/fence_xvmd.8 | 7 +++++++ 4 files changed, 40 insertions(+), 7 deletions(-)
fence/agents/xvm/fence_xvmd.c +31 -6
@@ -200,15 +200,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; }
@@ -227,6 +229,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);
@@ -244,6 +257,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) {
@@ -264,10 +289,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 ;
@@ -286,7 +311,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" );
@@ -633,7 +658,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" );
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