cluster/rgmanager ChangeLog include/resgroup.h ...
CVSROOT: /cvs/cluster
Module name: cluster
Changes by: lhh at sourceware.org 2007-06-27 14:03:52
Modified files:
rgmanager : ChangeLog
rgmanager/include: resgroup.h reslist.h rgmanager/src/clulib: rg_strings.c rgmanager/src/daemons: groups.c main.c nodeevent.c restree.c
rg_state.c rg_thread.c test.c
rgmanager/src/resources: vm.sh
Log message:
Merge from RHEL5 branch
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/rgmanager/ChangeLog.diff?cvsroot=cluster&r1=1.48&r2=1.49
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/rgmanager/include/resgroup.h.diff?cvsroot=cluster&r1=1.22&r2=1.23
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/rgmanager/include/reslist.h.diff?cvsroot=cluster&r1=1.20&r2=1.21
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/rgmanager/src/clulib/rg_strings.c.diff?cvsroot=cluster&r1=1.8&r2=1.9
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/rgmanager/src/daemons/groups.c.diff?cvsroot=cluster&r1=1.33&r2=1.34
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/rgmanager/src/daemons/main.c.diff?cvsroot=cluster&r1=1.39&r2=1.40
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/rgmanager/src/daemons/nodeevent.c.diff?cvsroot=cluster&r1=1.6&r2=1.7
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/rgmanager/src/daemons/restree.c.diff?cvsroot=cluster&r1=1.33&r2=1.34
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/rgmanager/src/daemons/rg_state.c.diff?cvsroot=cluster&r1=1.35&r2=1.36
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/rgmanager/src/daemons/rg_thread.c.diff?cvsroot=cluster&r1=1.21&r2=1.22
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/rgmanager/src/daemons/test.c.diff?cvsroot=cluster&r1=1.9&r2=1.10
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/rgmanager/src/resources/vm.sh.diff?cvsroot=cluster&r1=1.4&r2=1.5
rgmanager/ChangeLog +27 -0
@@ -1,3 +1,30 @@ +2007-06-27 Lon Hohberger <[email protected]> + * Merge from RHEL5 branch. + * src/daemons/vm.sh: Un-break migrate (#231692). Make status + checks happen every 30 seconds instead of 30 minutes. + * include/resgroup.h: Move inline recovery flags to a header file, + add RG_STATUS_INQUIRY for locating virtual machines which may have + migrated. + * include/reslist.h: Change res_exec() back to using agent_op_str() + inline so we can squelch errors while performing RG_STATUS_INQUIRY + * src/clulib/rg_strings.c: Add new strings for new error code / + request types + * src/daemons/groups.c: Change group_migrate() to use the correct + calling semantics + * src/daemons/main.c, nodeevent.c: Clean up cases which could cause + #244143 + * src/daemons/resrules.c: Clear up noise + * src/daemons/restree.c: Squelch errors during RG_STATUS_INQUIRY + Patch up inline service recovery (#229650) + * src/daemons/rg_state.c: Don't let migrations or relocations to a + node running exclusive services occur in the first place and return + a useful error. (goes with #237144). Locate virtual machines (or + generally, services with the 'migrate' ability) elsewhere in the + cluster prior to trying to start one. Detect if someone migrates + such a service without using the cluster tools (#232300) + * src/daemons/test.c: Make rg_test do the right thing for migrate + operations + 2007-06-21 Fabio M. Di Nitto <[email protected]> * rgmanager/src/clulib/alloc.c: Undefine DEBUG when building on IA64. The __builtin_address functionality should be taken from libunwind
rgmanager/include/resgroup.h +10 -0
@@ -98,6 +98,7 @@#define RG_MIGRATE 22#define RG_FREEZE 23#define RG_UNFREEZE 24 +#define RG_STATUS_INQUIRY 25#define RG_NONE 999const char *rg_req_str (int req);
@@ -143,6 +144,7 @@int svc_start (char *svcName,int req);int svc_stop (char *svcName,int error);int svc_status (char *svcName); +int svc_status_inquiry (char *svcName);int svc_disable (char *svcName);int svc_fail (char *svcName);int svc_freeze (char *svcName);
@@ -188,6 +190,8 @@int my_id (void );/* Return codes */ +#define RG_EFENCE -13/* Fencing operation pending */ +#define RG_ENODE -12/* Node is dead/nonexistent */ #define RG_EFROZEN -11/* Service is frozen */ #define RG_ERUN -10/* Service is already running */ #define RG_EQUORUM -9/* Operation requires quorum */
@@ -221,6 +225,12 @@#define FOD_RESTRICTED (1<<1)#define FOD_NOFAILBACK (1<<2) +/* +Status tree flags +*/ +#define SFL_FAILURE (1<<0) +#define SFL_RECOVERABLE (1<<1) +//#define DEBUG #ifdef DEBUG
rgmanager/include/reslist.h +1 -1
@@ -144,7 +144,7 @@int res_status (resource_node_t **tree,resource_t *res,void *ret);int res_condstart (resource_node_t **tree,resource_t *res,void *ret);int res_condstop (resource_node_t **tree,resource_t *res,void *ret); -int res_exec (resource_node_t *node,const char *op,const char *arg,int depth); +int res_exec (resource_node_t *node,int op,const char *arg,int depth);/*int res_resinfo(resource_node_t **tree, resource_t *res, void *ret);*/ int expand_time (char *val);int store_action (resource_act_t **actsp,char *name,int depth,int timeout,int interval);
rgmanager/src/clulib/rg_strings.c +4 -0
@@ -26,6 +26,8 @@const struct string_val rg_error_strings[] = { + {RG_EFENCE ,"Fencing operation pending; try again later" }, + {RG_ENODE ,"Target node dead / nonexistent" }, {RG_ERUN ,"Service is already running" }, {RG_EQUORUM ,"Operation requires quorum" }, {RG_EINVAL ,"Invalid operation for resource" },
@@ -68,6 +70,7 @@ {RG_UNLOCK, "unlocking"}, {RG_QUERY_LOCK, "lock status inquiry"}, {RG_MIGRATE, "migrate"}, + {RG_STATUS_INQUIRY, "out of band service status inquiry"}, {RG_NONE, "none"}, {0, NULL} };
@@ -182,5 +185,6 @@const char *agent_op_str (int val) { +printf ("searching agent_ops for %d\n" , val);return rg_search_table (agent_ops, val); }
rgmanager/src/daemons/groups.c +1 -1
@@ -896,7 +896,7 @@ }clulog (LOG_NOTICE ,"Migrating %s to %s\n" , groupname, tgt_name); - ret =res_exec (rn,agent_op_str (RS_MIGRATE ), tgt_name,0 ); + ret =res_exec (rn,RS_MIGRATE , tgt_name,0 );if (ret ==0 ) { clulog(LOG_NOTICE, "Migration of %s to %s completed\n",
rgmanager/src/daemons/main.c +8 -2
@@ -617,10 +617,12 @@clulog (LOG_WARNING ,"#67: Shutting down uncleanly\n" );rg_set_inquorate ();rg_doall (RG_INIT ,1 ,"Emergency stop of %s" ); +rg_set_uninitialized ();#if defined(LIBCMAN_VERSION ) &&LIBCMAN_VERSION >=2 /* cman_replyto_shutdown() */ #endif -exit (0 ); + running =0 ; +break ; }return ret;
@@ -700,6 +702,9 @@ } } +if (!running) +return 0 ; +if (need_reconfigure ||check_config_update ()) { need_reconfigure =0 ;configure_logging (-1 ,0 );
@@ -985,7 +990,8 @@ } } -cleanup (cluster_ctx); +if (rg_initialized ()) +cleanup (cluster_ctx);clulog (LOG_NOTICE ,"Shutdown complete, exiting\n" );clu_lock_finished (rgmanager_lsname);cman_finish (clu);
rgmanager/src/daemons/nodeevent.c +3 -1
@@ -72,8 +72,10 @@if (local) {/* Local Node Event */ -if (nodeStatus ==0 ) +if (nodeStatus ==0 ) { +clulog (LOG_ERR ,"Exiting uncleanly\n" );hard_exit (); + }if (!rg_initialized ()) {if (init_resource_groups (0 ) !=0 ) {
rgmanager/src/daemons/restree.c +32 -60
225 lines not on this page · raw message
rgmanager/src/daemons/rg_state.c +298 -58
476 lines not on this page · raw message
rgmanager/src/daemons/rg_thread.c +13 -0
@@ -441,6 +441,19 @@ ret =RG_EFAIL ;break ; +case RG_STATUS_INQUIRY : + error =svc_status_inquiry (myname); + +if (error ==0 ) { + ret =RG_SUCCESS ; + newowner =my_id (); + }else { + ret =RG_EFAIL ; + newowner =-1 ; + } + +break ; +default :printf ("Unhandled request %d\n" , req->rr_request); ret =RG_NONE ;
rgmanager/src/daemons/test.c +4 -4
@@ -217,7 +217,7 @@ }#endif -if (res_exec (rn,"migrate" , argv[4 ],0 )) { +if (res_exec (rn,RS_MIGRATE , argv[4 ],0 )) { ret =-1 ; goto out; }
@@ -226,9 +226,9 @@ }else if (!strcmp (argv[1 ],"status" )) {printf ("Checking status of %s...\n" , argv[3 ]); -if (res_status (&tree, curres,NULL )) { + ret =res_status (&tree, curres,NULL ); +if (ret) {printf ("Status check of %s failed\n" , argv[3 ]); - ret =-1 ; goto out; }printf ("Status of %s is good\n" , argv[3 ]);
@@ -391,5 +391,5 @@ out:xmlCleanupParser ();malloc_dump_table (); -return 0 ; +return ret; }
rgmanager/src/resources/vm.sh +30 -12
102 lines not on this page · raw message