You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by ji...@apache.org on 2013/03/11 17:31:58 UTC

svn commit: r1455218 - in /httpd/httpd/branches/2.4.x: ./ CHANGES STATUS include/heartbeat.h modules/cluster/mod_heartmonitor.c modules/proxy/balancers/mod_lbmethod_heartbeat.c

Author: jim
Date: Mon Mar 11 16:31:57 2013
New Revision: 1455218

URL: http://svn.apache.org/r1455218
Log:
Merge r1364695 from trunk:

mod_lbmethod_heartbeat, mod_heartmonitor: Respect DefaultRuntimeDir/
DEFAULT_REL_RUNTIMEDIR for the heartbeat storage file.

Submitted by: trawick
Reviewed/backported by: jim

Modified:
    httpd/httpd/branches/2.4.x/   (props changed)
    httpd/httpd/branches/2.4.x/CHANGES
    httpd/httpd/branches/2.4.x/STATUS
    httpd/httpd/branches/2.4.x/include/heartbeat.h
    httpd/httpd/branches/2.4.x/modules/cluster/mod_heartmonitor.c
    httpd/httpd/branches/2.4.x/modules/proxy/balancers/mod_lbmethod_heartbeat.c

Propchange: httpd/httpd/branches/2.4.x/
------------------------------------------------------------------------------
  Merged /httpd/httpd/trunk:r1364695

Modified: httpd/httpd/branches/2.4.x/CHANGES
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.4.x/CHANGES?rev=1455218&r1=1455217&r2=1455218&view=diff
==============================================================================
--- httpd/httpd/branches/2.4.x/CHANGES [utf-8] (original)
+++ httpd/httpd/branches/2.4.x/CHANGES [utf-8] Mon Mar 11 16:31:57 2013
@@ -2,6 +2,9 @@
 
 Changes with Apache 2.4.5
 
+  *) mod_lbmethod_heartbeat, mod_heartmonitor: Respect DefaultRuntimeDir/
+     DEFAULT_REL_RUNTIMEDIR for the heartbeat storage file.  [Jeff Trawick]
+
   * mod_include: Use new ap_expr for 'elif', like 'if', 
     if legacy parser is not specified.  PR 54548 [Tom Donovan]
 

Modified: httpd/httpd/branches/2.4.x/STATUS
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.4.x/STATUS?rev=1455218&r1=1455217&r2=1455218&view=diff
==============================================================================
--- httpd/httpd/branches/2.4.x/STATUS (original)
+++ httpd/httpd/branches/2.4.x/STATUS Mon Mar 11 16:31:57 2013
@@ -90,14 +90,6 @@ RELEASE SHOWSTOPPERS:
 PATCHES ACCEPTED TO BACKPORT FROM TRUNK:
   [ start all new proposals below, under PATCHES PROPOSED. ]
 
-  * mod_heartmonitor/mod_lbmethod_heartbeat: Respect DefaultRuntimeDir for 
-    storage path; these have a directive to configure this location
-    and THIS CHANGE WILL BREAK PRACTICALLY ALL EXISTING 2.4 CONFIGURATIONS
-    THAT USE THOSE DIRECTIVES WITH A RELATIVE PATH; I don't think it is
-    worth consideration because of expected zero impact in the user community
-    trunk patch: http://svn.apache.org/viewvc?view=revision&revision=1364695
-    2.4.x patch: trunk patch applies (minus CHANGES)
-    +1: trawick, fuankg, jim
     
   * mod_rate_limit: Fix error because of negative rate-limit
     PR 52964 [ianyin Xu <tixu cs ucsd edu>]
@@ -156,8 +148,6 @@ PATCHES ACCEPTED TO BACKPORT FROM TRUNK:
     2.4.x patch: trunk patch applies with offset.
     +1: jailletc36, humbedooh, jim
     
-
-
 PATCHES PROPOSED TO BACKPORT FROM TRUNK:
   [ New proposals should be added at the end of the list ]
 

Modified: httpd/httpd/branches/2.4.x/include/heartbeat.h
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.4.x/include/heartbeat.h?rev=1455218&r1=1455217&r2=1455218&view=diff
==============================================================================
--- httpd/httpd/branches/2.4.x/include/heartbeat.h (original)
+++ httpd/httpd/branches/2.4.x/include/heartbeat.h Mon Mar 11 16:31:57 2013
@@ -47,6 +47,11 @@ typedef struct hm_slot_server_t
     int id;
 } hm_slot_server_t;
 
+/* default name of heartbeat data file, created in the configured
+ * runtime directory when mod_slotmem_shm is not available
+ */
+#define DEFAULT_HEARTBEAT_STORAGE "hb.dat"
+
 #ifdef __cplusplus
 }
 #endif

Modified: httpd/httpd/branches/2.4.x/modules/cluster/mod_heartmonitor.c
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.4.x/modules/cluster/mod_heartmonitor.c?rev=1455218&r1=1455217&r2=1455218&view=diff
==============================================================================
--- httpd/httpd/branches/2.4.x/modules/cluster/mod_heartmonitor.c (original)
+++ httpd/httpd/branches/2.4.x/modules/cluster/mod_heartmonitor.c Mon Mar 11 16:31:57 2013
@@ -792,7 +792,7 @@ static void *hm_create_config(apr_pool_t
     hm_ctx_t *ctx = (hm_ctx_t *) apr_palloc(p, sizeof(hm_ctx_t));
 
     ctx->active = 0;
-    ctx->storage_path = ap_server_root_relative(p, "logs/hb.dat");
+    ctx->storage_path = ap_runtime_dir_relative(p, DEFAULT_HEARTBEAT_STORAGE);
     /* TODO: Add directive for tuning the update interval
      */
     ctx->interval = apr_time_from_sec(HM_UPDATE_SEC);
@@ -816,7 +816,7 @@ static const char *cmd_hm_storage(cmd_pa
         return err;
     }
 
-    ctx->storage_path = ap_server_root_relative(p, path);
+    ctx->storage_path = ap_runtime_dir_relative(p, path);
 
     return NULL;
 }

Modified: httpd/httpd/branches/2.4.x/modules/proxy/balancers/mod_lbmethod_heartbeat.c
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.4.x/modules/proxy/balancers/mod_lbmethod_heartbeat.c?rev=1455218&r1=1455217&r2=1455218&view=diff
==============================================================================
--- httpd/httpd/branches/2.4.x/modules/proxy/balancers/mod_lbmethod_heartbeat.c (original)
+++ httpd/httpd/branches/2.4.x/modules/proxy/balancers/mod_lbmethod_heartbeat.c Mon Mar 11 16:31:57 2013
@@ -407,7 +407,7 @@ static void *lb_hb_create_config(apr_poo
 {
     lb_hb_ctx_t *ctx = (lb_hb_ctx_t *) apr_palloc(p, sizeof(lb_hb_ctx_t));
 
-    ctx->path = ap_server_root_relative(p, "logs/hb.dat");
+    ctx->path = ap_runtime_dir_relative(p, DEFAULT_HEARTBEAT_STORAGE);
 
     return ctx;
 }
@@ -442,7 +442,7 @@ static const char *cmd_lb_hb_storage(cmd
         return err;
     }
 
-    ctx->path = ap_server_root_relative(p, path);
+    ctx->path = ap_runtime_dir_relative(p, path);
 
     return NULL;
 }