Author: jfrederic.clere(a)jboss.com
Date: 2008-07-08 03:35:38 -0400 (Tue, 08 Jul 2008)
New Revision: 1741
Modified:
trunk/mod_cluster/native/mod_manager/mod_manager.c
trunk/mod_cluster/native/mod_proxy_cluster/mod_proxy_cluster.c
Log:
Arrange remove logic and fix small bugs.
Modified: trunk/mod_cluster/native/mod_manager/mod_manager.c
===================================================================
--- trunk/mod_cluster/native/mod_manager/mod_manager.c 2008-07-08 07:33:25 UTC (rev 1740)
+++ trunk/mod_cluster/native/mod_manager/mod_manager.c 2008-07-08 07:35:38 UTC (rev 1741)
@@ -487,6 +487,7 @@
nodeinfo.mess.smax = mpm_threads + 1;
nodeinfo.mess.ttl = apr_time_from_sec(60);
nodeinfo.mess.timeout = 0;
+ nodeinfo.mess.id = 0;
/* Fill default balancer values */
memset(&balancerinfo, '\0', sizeof(balancerinfo));
@@ -527,7 +528,7 @@
}
if (strcasecmp(ptr[i], "StickySessionRemove") == 0) {
if (strcasecmp(ptr[i+1], "yes") == 0)
- balancerinfo.StickySession = 1;
+ balancerinfo.StickySessionRemove = 1;
}
if (strcasecmp(ptr[i], "StickySessionForce") == 0) {
if (strcasecmp(ptr[i+1], "no") == 0)
@@ -641,6 +642,7 @@
node = read_node(nodestatsmem, &nodeinfo);
if (node != NULL && node->mess.remove) {
/* Here we can't update it because the old one is still in */
+ strcpy(node->mess.JVMRoute, "REMOVED");
*errtype = TYPEMEM;
return MNODERM;
}
@@ -743,8 +745,9 @@
id[i], ou->mess.id, ou->mess.JVMRoute, ou->mess.Domain,
ou->mess.Host, ou->mess.Port, ou->mess.Type);
proxystat = (proxy_worker_stat *) ou->stat;
- ap_rprintf(r, " [%d:%d] status: %d elected: %d lbstatus: %d lbfactor:
%d route: %s\n",
- id[i], ou->mess.id, proxystat->status, proxystat->elected,
proxystat->lbstatus,
+ ap_rprintf(r, " [%d:%d] (%d) status: %d elected: %d lbstatus: %d
lbfactor: %d route: %s\n",
+ id[i], ou->mess.id, ou->mess.remove,
+ proxystat->status, proxystat->elected, proxystat->lbstatus,
proxystat->lbfactor, proxystat->route);
}
@@ -1115,7 +1118,7 @@
/* XXX: Size limit it? */
ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, r->server,
- "manager_handler %s processing: \"%s\"",
r->method, buff);
+ "manager_handler %s (%s) processing: \"%s\"",
r->method, r->uri, buff);
decodeenc(buff);
if (strcasecmp(r->method, "CONFIG") == 0)
errstring = process_config(r, buff, &errtype);
Modified: trunk/mod_cluster/native/mod_proxy_cluster/mod_proxy_cluster.c
===================================================================
--- trunk/mod_cluster/native/mod_proxy_cluster/mod_proxy_cluster.c 2008-07-08 07:33:25 UTC
(rev 1740)
+++ trunk/mod_cluster/native/mod_proxy_cluster/mod_proxy_cluster.c 2008-07-08 07:35:38 UTC
(rev 1741)
@@ -260,8 +260,8 @@
worker++;
}
if (i == conf->workers->nelts) {
- node_storage->remove_node(node);
- return 0; /* Done ? */
+ /* XXX: Another process may use it, can't do:
node_storage->remove_node(node); */
+ return 0; /* Done */
}
/* prevent other threads using it */