JBoss Native SVN: r1722 - trunk/mod_cluster/native/mod_manager.
by jbossnative-commits@lists.jboss.org
Author: jfrederic.clere(a)jboss.com
Date: 2008-06-18 12:00:03 -0400 (Wed, 18 Jun 2008)
New Revision: 1722
Modified:
trunk/mod_cluster/native/mod_manager/mod_manager.c
Log:
Allow URL ending with * to be a APP_ * command.
Modified: trunk/mod_cluster/native/mod_manager/mod_manager.c
===================================================================
--- trunk/mod_cluster/native/mod_manager/mod_manager.c 2008-06-18 15:26:22 UTC (rev 1721)
+++ trunk/mod_cluster/native/mod_manager/mod_manager.c 2008-06-18 16:00:03 UTC (rev 1722)
@@ -864,7 +864,8 @@
}
/* Process the * APP commands */
- if (strcmp(r->uri, "*") == 0 || strcmp(r->uri, "/*") ==0) {
+ i = strlen(r->uri);
+ if (strcmp(r->uri, "*") == 0 || (i>=2 && r->uri[i-1] == '*' && r->uri[i-2] == '/')) {
return (process_node_cmd(r, status, errtype, node));
}
16 years, 6 months
JBoss Native SVN: r1721 - trunk/mod_cluster/native/mod_proxy_cluster.
by jbossnative-commits@lists.jboss.org
Author: jfrederic.clere(a)jboss.com
Date: 2008-06-18 11:26:22 -0400 (Wed, 18 Jun 2008)
New Revision: 1721
Modified:
trunk/mod_cluster/native/mod_proxy_cluster/patch.txt
Log:
Work-around "strange" mod_proxy handling of ping/pong timeout.
Modified: trunk/mod_cluster/native/mod_proxy_cluster/patch.txt
===================================================================
--- trunk/mod_cluster/native/mod_proxy_cluster/patch.txt 2008-06-18 15:19:18 UTC (rev 1720)
+++ trunk/mod_cluster/native/mod_proxy_cluster/patch.txt 2008-06-18 15:26:22 UTC (rev 1721)
@@ -26,3 +26,52 @@
APR_ADDTO(INCLUDES, [-I\$(top_srcdir)/$modpath_current/../generators])
+--- mod_proxy_ajp.c 2008-06-18 17:23:06.000000000 +0200
++++ mod_proxy_ajp.c 2008-06-18 15:41:03.000000000 +0200
+@@ -550,6 +550,8 @@
+ conn_rec *origin = NULL;
+ proxy_conn_rec *backend = NULL;
+ const char *scheme = "AJP";
++ apr_interval_time_t savetimeout;
++ char savetimeout_set;
+ proxy_dir_conf *dconf = ap_get_module_config(r->per_dir_config,
+ &proxy_module);
+
+@@ -605,7 +607,18 @@
+ goto cleanup;
+
+ /* Step Two: Make the Connection */
+- if (ap_proxy_connect_backend(scheme, backend, worker, r->server)) {
++ if (worker->ping_timeout_set) {
++ savetimeout_set = worker->timeout_set;
++ savetimeout = worker->timeout;
++ worker->timeout_set = 1;
++ worker->timeout = worker->ping_timeout;
++ }
++ status = ap_proxy_connect_backend(scheme, backend, worker, r->server);
++ if (worker->ping_timeout_set) {
++ worker->timeout_set = savetimeout_set;
++ worker->timeout = savetimeout;
++ }
++ if (status) {
+ ap_log_error(APLOG_MARK, APLOG_ERR, 0, r->server,
+ "proxy: AJP: failed to make connection to backend: %s",
+ backend->hostname);
+@@ -615,6 +628,17 @@
+
+ /* Handle CPING/CPONG */
+ if (worker->ping_timeout_set) {
++ /* Put a timeout on the socket like ap_proxy_connect_backend() */
++ if (worker->timeout_set == 1) {
++ apr_socket_timeout_set(backend->sock, worker->timeout);
++ }
++ else if (conf->timeout_set == 1) {
++ apr_socket_timeout_set(backend->sock, conf->timeout);
++ }
++ else {
++ apr_socket_timeout_set(backend->sock, r->server->timeout);
++ }
++
+
+ status = ajp_handle_cping_cpong(backend->sock, r,
+ worker->ping_timeout);
16 years, 6 months
JBoss Native SVN: r1720 - trunk/mod_cluster/native/mod_proxy_cluster.
by jbossnative-commits@lists.jboss.org
Author: jfrederic.clere(a)jboss.com
Date: 2008-06-18 11:19:18 -0400 (Wed, 18 Jun 2008)
New Revision: 1720
Modified:
trunk/mod_cluster/native/mod_proxy_cluster/mod_proxy_cluster.c
Log:
Make sure the ping/pong only waits the ping value even if we have to build a new connection.
Modified: trunk/mod_cluster/native/mod_proxy_cluster/mod_proxy_cluster.c
===================================================================
--- trunk/mod_cluster/native/mod_proxy_cluster/mod_proxy_cluster.c 2008-06-18 08:59:03 UTC (rev 1719)
+++ trunk/mod_cluster/native/mod_proxy_cluster/mod_proxy_cluster.c 2008-06-18 15:19:18 UTC (rev 1720)
@@ -218,9 +218,12 @@
balancer_storage->read_balancer(bal[i], &balan);
/* Something like cluster://cluster1 and cluster1 */
if (strcmp(balan->balancer, &balancer->name[10]) == 0) {
- /* XXX: not yet finished
- balancer->sticky
- balancer->sticky_force */
+ /* XXX: StickySession, StickySessionRemove not in */
+ balancer->sticky = apr_psprintf(pool, "%s|%s", balan->StickySessionCookie,
+ balan->StickySessionPath);
+ balancer->sticky_force = balan->StickySessionForce;
+ balancer->timeout = apr_time_from_sec(balan->Timeout);
+
balancer->max_attempts = balan->Maxattempts;
balancer->max_attempts_set = 1;
break;
@@ -847,6 +850,8 @@
apr_status_t rv;
proxy_conn_rec *conn;
apr_interval_time_t timeout;
+ apr_interval_time_t savetimeout;
+ char savetimeout_set;
#if AP_MODULE_MAGIC_AT_LEAST(20051115,4)
#else
proxy_cluster_helper *helperping;
@@ -920,8 +925,30 @@
}
}
+ /* Set the timeout: Note that the default timeout logic in the proxy_util.c is:
+ * 1 - worker->timeout (if timeout_set timeout=n in the worker)
+ * 2 - conf->timeout (if timeout_set ProxyTimeout 300)
+ * 3 - s->timeout (TimeOut 300).
+ * We hack it... Via 1
+ */
+#if AP_MODULE_MAGIC_AT_LEAST(20051115,4)
+ timeout = worker->ping_timeout;
+#else
+ helperping = worker->opaque;
+ timeout = helperping->ping_timeout;
+#endif
+ if (timeout <= 0)
+ timeout = apr_time_from_sec(10); /* 10 seconds */
+
+ savetimeout_set = worker->timeout_set;
+ savetimeout = worker->timeout;
+ worker->timeout_set = 1;
+ worker->timeout = timeout;
+
/* Connect to the backend: Check connected/reuse otherwise create new */
rv = ap_proxy_connect_backend(scheme, conn, worker, r->server);
+ worker->timeout_set = savetimeout_set;
+ worker->timeout = savetimeout;
if (rv != APR_SUCCESS) {
ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, r->server,
"proxy_cluster_try_pingpong: can't connect to backend");
@@ -929,15 +956,6 @@
return rv;
}
-#if AP_MODULE_MAGIC_AT_LEAST(20051115,4)
- timeout = worker->ping_timeout;
-#else
- helperping = worker->opaque;
- timeout = helperping->ping_timeout;
-#endif
- if (timeout <= 0)
- timeout = apr_time_from_sec(10); /* 10 seconds */
-
/* XXX: For the moment we support only AJP */
if (strcasecmp(scheme, "AJP") == 0) {
rv = ajp_handle_cping_cpong(conn->sock, r, timeout);
16 years, 6 months
JBoss Native SVN: r1719 - sandbox/httpd.
by jbossnative-commits@lists.jboss.org
Author: jfrederic.clere(a)jboss.com
Date: 2008-06-18 04:59:03 -0400 (Wed, 18 Jun 2008)
New Revision: 1719
Modified:
sandbox/httpd/httpd.test
Log:
Copy the include to modules/proxy
Modified: sandbox/httpd/httpd.test
===================================================================
--- sandbox/httpd/httpd.test 2008-06-18 08:16:49 UTC (rev 1718)
+++ sandbox/httpd/httpd.test 2008-06-18 08:59:03 UTC (rev 1719)
@@ -48,6 +48,7 @@
(cd $HOME/$TMPLOC
cp mod_cluster/native/mod_proxy_cluster/mod_proxy_cluster.c httpd-2.2.x/modules/proxy
cp mod_cluster/native/mod_proxy_cluster/patch.txt httpd-2.2.x/modules/proxy
+ cp mod_cluster/native/include/*.h httpd-2.2.x/modules/proxy
grep proxy_cluster_objs httpd-2.2.x/modules/proxy/config.m4 2&>1
if [ $? -eq 0 ]; then
echo "httpd-2.2.x/modules/proxy/config.m4 already patches"
16 years, 6 months
JBoss Native SVN: r1718 - trunk/mod_cluster/native/mod_proxy_cluster.
by jbossnative-commits@lists.jboss.org
Author: jfrederic.clere(a)jboss.com
Date: 2008-06-18 04:16:49 -0400 (Wed, 18 Jun 2008)
New Revision: 1718
Modified:
trunk/mod_cluster/native/mod_proxy_cluster/mod_proxy_cluster.c
Log:
Arrange the lbfactor logic.
Modified: trunk/mod_cluster/native/mod_proxy_cluster/mod_proxy_cluster.c
===================================================================
--- trunk/mod_cluster/native/mod_proxy_cluster/mod_proxy_cluster.c 2008-06-18 08:07:42 UTC (rev 1717)
+++ trunk/mod_cluster/native/mod_proxy_cluster/mod_proxy_cluster.c 2008-06-18 08:16:49 UTC (rev 1718)
@@ -724,45 +724,43 @@
update_workers_node(conf, r->pool, r->server);
/* First try to see if we have available candidate */
- do {
- checking_standby = checked_standby = 0;
- while (!mycandidate && !checked_standby) {
- worker = (proxy_worker *)balancer->workers->elts;
- for (i = 0; i < balancer->workers->nelts; i++, worker++) {
+ checking_standby = checked_standby = 0;
+ while (!mycandidate && !checked_standby) {
+ worker = (proxy_worker *)balancer->workers->elts;
+ for (i = 0; i < balancer->workers->nelts; i++, worker++) {
- /* standby logic
- * lbfactor: -1 broken node.
- * 0 standby.
- * >0 factor to use.
- */
- if (worker->s->lbfactor < 0 || (worker->s->lbfactor == 0 && !checking_standby))
- continue;
+ /* standby logic
+ * lbfactor: -1 broken node.
+ * 0 standby.
+ * >0 factor to use.
+ */
+ if (worker->s->lbfactor < 0 || (worker->s->lbfactor == 0 && !checking_standby))
+ continue;
- /* If the worker is in error state the STATUS logic will retry it */
- if (!PROXY_WORKER_IS_USABLE(worker)) {
- continue;
- }
+ /* If the worker is in error state the STATUS logic will retry it */
+ if (!PROXY_WORKER_IS_USABLE(worker)) {
+ continue;
+ }
- /* Take into calculation only the workers that are
- * not in error state or not disabled.
- * and that can map the context.
- */
- if (PROXY_WORKER_IS_USABLE(worker) && iscontext_host_ok(r, balancer, worker)) {
- if (worker->s->lbfactor == 0 && checking_standby) {
+ /* Take into calculation only the workers that are
+ * not in error state or not disabled.
+ * and that can map the context.
+ */
+ if (PROXY_WORKER_IS_USABLE(worker) && iscontext_host_ok(r, balancer, worker)) {
+ if (worker->s->lbfactor == 0 && checking_standby) {
+ mycandidate = worker;
+ break; /* Done */
+ } else {
+ worker->s->lbstatus += worker->s->lbfactor;
+ total_factor += worker->s->lbfactor;
+ if (!mycandidate || worker->s->lbstatus > mycandidate->s->lbstatus) {
mycandidate = worker;
- break; /* Done */
- } else {
- worker->s->lbstatus += worker->s->lbfactor;
- total_factor += worker->s->lbfactor;
- if (!mycandidate || worker->s->lbstatus > mycandidate->s->lbstatus) {
- mycandidate = worker;
- }
}
}
}
- checked_standby = checking_standby++;
}
- } while (!mycandidate);
+ checked_standby = checking_standby++;
+ }
if (mycandidate) {
mycandidate->s->lbstatus -= total_factor;
16 years, 6 months
JBoss Native SVN: r1717 - trunk/mod_cluster/native/mod_proxy_cluster.
by jbossnative-commits@lists.jboss.org
Author: jfrederic.clere(a)jboss.com
Date: 2008-06-18 04:07:42 -0400 (Wed, 18 Jun 2008)
New Revision: 1717
Modified:
trunk/mod_cluster/native/mod_proxy_cluster/mod_proxy_cluster.c
Log:
Arrange the balancer creation.
Modified: trunk/mod_cluster/native/mod_proxy_cluster/mod_proxy_cluster.c
===================================================================
--- trunk/mod_cluster/native/mod_proxy_cluster/mod_proxy_cluster.c 2008-06-18 07:35:32 UTC (rev 1716)
+++ trunk/mod_cluster/native/mod_proxy_cluster/mod_proxy_cluster.c 2008-06-18 08:07:42 UTC (rev 1717)
@@ -210,15 +210,14 @@
}
#endif
- /* XXX: Missing logic to copy the shared memory information to the balancer */
- /* the balancer must be searched using the name (node->balancer) */
- /* read the ident of the nodes */
+ /* Logic to copy the shared memory information to the balancer */
bal = apr_pcalloc(pool, sizeof(int) * balancer_storage->get_max_size_balancer());
sizebal = balancer_storage->get_ids_used_balancer(bal);
for (i=0; i<sizebal; i++) {
balancerinfo_t *balan;
balancer_storage->read_balancer(bal[i], &balan);
- if (strcmp(balan->balancer, balancer->name) == 0) {
+ /* Something like cluster://cluster1 and cluster1 */
+ if (strcmp(balan->balancer, &balancer->name[10]) == 0) {
/* XXX: not yet finished
balancer->sticky
balancer->sticky_force */
16 years, 6 months
JBoss Native SVN: r1716 - in trunk/build/unix: util and 1 other directory.
by jbossnative-commits@lists.jboss.org
Author: jfrederic.clere(a)jboss.com
Date: 2008-06-18 03:35:32 -0400 (Wed, 18 Jun 2008)
New Revision: 1716
Modified:
trunk/build/unix/package.list
trunk/build/unix/util/buildrhelsrc.sh
Log:
Use RHEL-5-Stack-V2 httpd.
Modified: trunk/build/unix/package.list
===================================================================
--- trunk/build/unix/package.list 2008-06-18 06:23:35 UTC (rev 1715)
+++ trunk/build/unix/package.list 2008-06-18 07:35:32 UTC (rev 1716)
@@ -13,4 +13,4 @@
# httpd
jboss-httpd|0.0.1|2.2.8|api:v:1.2.1|ssl:v:0.9.8e|zlib:v:1.2.3
rhel-httpd|2.2.3-11.el5_1.3|httpd-2_2_3-11_el5_1_3|apr:r:apr-1_2_7-11|apu:r:apr-util-1_2_7-7_el5|api:v:1.2.1|ssl:r:openssl-0_9_8b-8_3_el5_0_2|zlib:v:1.2.3|jk:v:1.2.26|iconv:v:1.11|expat:v:1.95.8
-rhel-httpd|2.2.3-11.el5_1.3|httpd-2_2_3-11_el5_1_3|apr:r:apr-1_2_7-11|apu:r:apr-util-1_2_7-7_el5|api:v:1.2.1|ssl:r:openssl-0_9_8b-8_3_el5_0_2|zlib:v:1.2.3|jk:v:1.2.26|iconv:v:1.11|expat:v:1.95.8|cluster:t:trunk
+rhel-httpd|2.2.8-1.el5s2|httpd-2_2_8-1_el5s2|apr:r:apr-1_2_7-11|apu:r:apr-util-1_2_7-7_el5|api:v:1.2.1|ssl:r:openssl-0_9_8b-8_3_el5_0_2|zlib:v:1.2.3|jk:v:1.2.26|iconv:v:1.11|expat:v:1.95.8|cluster:t:trunk
Modified: trunk/build/unix/util/buildrhelsrc.sh
===================================================================
--- trunk/build/unix/util/buildrhelsrc.sh 2008-06-18 06:23:35 UTC (rev 1715)
+++ trunk/build/unix/util/buildrhelsrc.sh 2008-06-18 07:35:32 UTC (rev 1716)
@@ -44,7 +44,7 @@
# $7: package version. (to find the patch that should be applied).
URL=$1
-repo=$2
+baserepo=$2
tag=$3
destdir=$4
compo=$5
@@ -54,6 +54,16 @@
# we need something like:
#cvs -d :pserver:anonymous@cvs.devel.redhat.com:/cvs/dist export \
# -r httpd-2_2_3-11_el5 httpd/RHEL-5
+# or
+# -r 2.2.8-1.el5s2 httpd/RHEL-5-Stack-V2
+case ${tag} in
+ *el5s*)
+ repo=${baserepo}-Stack-V2
+ ;;
+ *)
+ repo=${baserepo}
+ ;;
+esac
cvsloc=:pserver:anonymous@cvs.devel.redhat.com:/cvs/dist
if [ "$tag" = "trunk" ];then
16 years, 6 months
JBoss Native SVN: r1715 - trunk/httpd/httpd-2.2/modules/proxy.
by jbossnative-commits@lists.jboss.org
Author: mladen.turk(a)jboss.com
Date: 2008-06-18 02:23:35 -0400 (Wed, 18 Jun 2008)
New Revision: 1715
Modified:
trunk/httpd/httpd-2.2/modules/proxy/NMAKEproxycluster
Log:
ajp_ping_pong is now local
Modified: trunk/httpd/httpd-2.2/modules/proxy/NMAKEproxycluster
===================================================================
--- trunk/httpd/httpd-2.2/modules/proxy/NMAKEproxycluster 2008-06-18 06:22:29 UTC (rev 1714)
+++ trunk/httpd/httpd-2.2/modules/proxy/NMAKEproxycluster 2008-06-18 06:23:35 UTC (rev 1715)
@@ -47,10 +47,6 @@
RCFLAGS = $(RCFLAGS) /d BIN_NAME="$(PROJECT).so" /d LONG_NAME="proxy_cluster_module for Apache"
OBJECTS = \
- $(WORKDIR)\ajp_header.obj \
- $(WORKDIR)\ajp_link.obj \
- $(WORKDIR)\ajp_msg.obj \
- $(WORKDIR)\ajp_utils.obj \
$(WORKDIR)\mod_proxy_cluster.obj
{$(SRCDIR)}.c{$(WORKDIR)}.obj:
16 years, 6 months
JBoss Native SVN: r1714 - trunk/mod_cluster/native/mod_manager.
by jbossnative-commits@lists.jboss.org
Author: mladen.turk(a)jboss.com
Date: 2008-06-18 02:22:29 -0400 (Wed, 18 Jun 2008)
New Revision: 1714
Modified:
trunk/mod_cluster/native/mod_manager/mod_manager.c
Log:
Do not use export for local static cmd functions
Modified: trunk/mod_cluster/native/mod_manager/mod_manager.c
===================================================================
--- trunk/mod_cluster/native/mod_manager/mod_manager.c 2008-06-17 15:10:25 UTC (rev 1713)
+++ trunk/mod_cluster/native/mod_manager/mod_manager.c 2008-06-18 06:22:29 UTC (rev 1714)
@@ -1206,31 +1206,31 @@
/*
* Supported directives.
*/
-AP_DECLARE_NONSTD(const char *) cmd_manager_maxcontext(cmd_parms *cmd, void *mconfig, const char *word)
+static const char *cmd_manager_maxcontext(cmd_parms *cmd, void *mconfig, const char *word)
{
mod_manager_config *mconf = ap_get_module_config(cmd->server->module_config, &manager_module);
mconf->maxcontext = atoi(word);
return NULL;
}
-AP_DECLARE_NONSTD(const char *) cmd_manager_maxnode(cmd_parms *cmd, void *mconfig, const char *word)
+static const char *cmd_manager_maxnode(cmd_parms *cmd, void *mconfig, const char *word)
{
mod_manager_config *mconf = ap_get_module_config(cmd->server->module_config, &manager_module);
mconf->maxnode = atoi(word);
return NULL;
}
-AP_DECLARE_NONSTD(const char *) cmd_manager_maxhost(cmd_parms *cmd, void *mconfig, const char *word)
+static const char *cmd_manager_maxhost(cmd_parms *cmd, void *mconfig, const char *word)
{
mod_manager_config *mconf = ap_get_module_config(cmd->server->module_config, &manager_module);
mconf->maxhost = atoi(word);
return NULL;
}
-AP_DECLARE_NONSTD(const char *) cmd_manager_memmanagerfile(cmd_parms *cmd, void *mconfig, const char *word)
+static const char *cmd_manager_memmanagerfile(cmd_parms *cmd, void *mconfig, const char *word)
{
mod_manager_config *mconf = ap_get_module_config(cmd->server->module_config, &manager_module);
mconf->basefilename = apr_pstrdup(cmd->pool, word);
return NULL;
}
-AP_DECLARE_NONSTD(const char *) cmd_manager_balancername(cmd_parms *cmd, void *mconfig, const char *word)
+static const char *cmd_manager_balancername(cmd_parms *cmd, void *mconfig, const char *word)
{
mod_manager_config *mconf = ap_get_module_config(cmd->server->module_config, &manager_module);
/* XXX: create the entry in the shared balancer table */
16 years, 6 months
JBoss Native SVN: r1713 - trunk/build/unix.
by jbossnative-commits@lists.jboss.org
Author: jfrederic.clere(a)jboss.com
Date: 2008-06-17 11:10:25 -0400 (Tue, 17 Jun 2008)
New Revision: 1713
Modified:
trunk/build/unix/buildbin.rhel-httpd.sh
trunk/build/unix/buildsrc.cluster.sh
Log:
Add mod_cluster modules in the build.
Modified: trunk/build/unix/buildbin.rhel-httpd.sh
===================================================================
--- trunk/build/unix/buildbin.rhel-httpd.sh 2008-06-17 14:54:43 UTC (rev 1712)
+++ trunk/build/unix/buildbin.rhel-httpd.sh 2008-06-17 15:10:25 UTC (rev 1713)
@@ -134,6 +134,10 @@
(cd modules/jk; ./configure)
fi
+if $has_cluster; then
+ add_conf="$add_conf --enable-proxy-cluster --enable-advertise --enable-slotmem --enable-manager"
+fi
+
# Ajust some more platform dependent stuff.
case ${BUILD_SYS} in
linux*)
Modified: trunk/build/unix/buildsrc.cluster.sh
===================================================================
--- trunk/build/unix/buildsrc.cluster.sh 2008-06-17 14:54:43 UTC (rev 1712)
+++ trunk/build/unix/buildsrc.cluster.sh 2008-06-17 15:10:25 UTC (rev 1713)
@@ -47,7 +47,7 @@
fi
(cd $package_src_dir/srclib
-svn co ${URLBASE} mod_cluster
+svn export ${URLBASE} mod_cluster
)
if [ $? -ne 0 ]; then
echo "svn co ${URLBASE} mod_cluster FAILED"
16 years, 6 months