]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
Merge r1902117, r1902130, r1902132, r1902133 from trunk:
authorJim Jagielski <jim@apache.org>
Sun, 21 Aug 2022 20:29:06 +0000 (20:29 +0000)
committerJim Jagielski <jim@apache.org>
Sun, 21 Aug 2022 20:29:06 +0000 (20:29 +0000)
*) mod_heartmonitor: Allow "HeartbeatMaxServers 0"
   to use file based storage instead of slotmem.
   Needed after setting HeartbeatMaxServers default
   to the documented value 10 in 2.4.54.
   [Jérôme Billiras]

Fix numeric check for HeartbeatMaxServers.

*) mod_heartmonitor: Document interaction between
   HeartbeatStorage and HeartbeatMaxServers.

Fix new typo in docs...

Submitted by: rjung
Reviewed by: rjung, rpluem, jim

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1903619 13f79535-47bb-0310-9956-ffa450edef68

CHANGES
STATUS
changes-entries/mod_heartmonitor-HeartbeatMaxServers.txt [deleted file]
docs/manual/mod/mod_heartmonitor.xml
modules/cluster/mod_heartmonitor.c

diff --git a/CHANGES b/CHANGES
index fd086d83b1548e132bc65787e23ee6f383c2fd15..d678a303c87597adf53d98bd6bdf2ad721205440 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,6 +1,11 @@
                                                          -*- coding: utf-8 -*-
 Changes with Apache 2.4.55
 
+  *) mod_heartmonitor: Allow "HeartbeatMaxServers 0" to use file based
+     storage instead of slotmem. Needed after setting
+     HeartbeatMaxServers default to the documented value 10 in 2.4.54.
+     PR 66131.  [Jérôme Billiras]
+
 Changes with Apache 2.4.54
 
   *) SECURITY: CVE-2022-31813: mod_proxy X-Forwarded-For dropped by
diff --git a/STATUS b/STATUS
index a359feddf3645e8b2c423d4937637663fd4449d1..4e8fedf3f61dc158f6ff52e4581fffda5410a127 100644 (file)
--- a/STATUS
+++ b/STATUS
@@ -149,18 +149,6 @@ RELEASE SHOWSTOPPERS:
 PATCHES ACCEPTED TO BACKPORT FROM TRUNK:
   [ start all new proposals below, under PATCHES PROPOSED. ]
 
-  *) mod_heartmonitor: Allow "HeartbeatMaxServers 0"
-     to use file based storage instead of slotmem.
-     Needed after setting HeartbeatMaxServers default
-     to the documented value 10 in 2.4.54.
-     PR 66131.  [Jérôme Billiras]
-     Trunk version of patch:
-        https://svn.apache.org/r1902117
-        https://svn.apache.org/r1902130
-        https://svn.apache.org/r1902132
-        https://svn.apache.org/r1902133
-     2.4.x patch: svn merge -c 1902117,1902130,1902132,1902133 ^/httpd/httpd/trunk .
-     +1: rjung, rpluem, jim
 
 
 PATCHES PROPOSED TO BACKPORT FROM TRUNK:
diff --git a/changes-entries/mod_heartmonitor-HeartbeatMaxServers.txt b/changes-entries/mod_heartmonitor-HeartbeatMaxServers.txt
deleted file mode 100644 (file)
index b258358..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-  *) mod_heartmonitor: Allow "HeartbeatMaxServers 0"
-     to use file based storage instead of slotmem.
-     Needed after setting HeartbeatMaxServers default
-     to the documented value 10 in 2.4.54.
-     PR 66131.  [Jérôme Billiras]
index c6ee2dfde29a6e7b76f56cc42b0c949cff26ffaa..6001fee1933eaaff3d38980e74e4948dbc90986d 100644 (file)
@@ -76,7 +76,7 @@ use <module>mod_slotmem_shm</module>.</p>
 
 <directivesynopsis>
 <name>HeartbeatStorage</name>
-<description>Path to store heartbeat data</description>
+<description>Path to store heartbeat data when using flat-file storage</description>
 <syntax>HeartbeatStorage <var>file-path</var></syntax>
 <default>HeartbeatStorage logs/hb.dat</default>
 <contextlist><context>server config</context></contextlist>
@@ -84,7 +84,8 @@ use <module>mod_slotmem_shm</module>.</p>
 <usage>
     <p>The <directive>HeartbeatStorage</directive> directive specifies the
     path to store heartbeat data.  This flat-file is used only when
-    <module>mod_slotmem_shm</module> is not loaded.</p>
+    <module>mod_slotmem_shm</module> is not loaded and
+    <directive>HeartbeatMaxServers</directive> is set to 0.</p>
 </usage>
 </directivesynopsis>
 
@@ -101,6 +102,8 @@ heartbeat requests to this server</description>
     maximum number of servers that will be sending requests to this monitor
     server.  It is used to control the size of the shared memory allocated
     to store the heartbeat info when <module>mod_slotmem_shm</module> is in use.</p>
+    <p>For using flat-file storage (without loading <module>mod_slotmem_shm</module>),
+    this must be set to 0. The value must be either 0, or bigger or equals 10.</p>
 </usage>
 </directivesynopsis>
 </modulesynopsis>
index 4e193d28edc617ca92d58ba1e5be4c4030c696de..53b650469d76189a0be1dec3b10219a67781dbbe 100644 (file)
@@ -892,8 +892,9 @@ static const char *cmd_hm_maxworkers(cmd_parms *cmd,
     }
 
     maxworkers = atoi(data);
-    if (maxworkers <= 10)
-        return "HeartbeatMaxServers: Should be bigger than 10";
+    if (maxworkers != 0 && maxworkers < 10)
+        return "HeartbeatMaxServers: Should be 0 for file storage, "
+               "or greater or equal than 10 for slotmem";
 
     return NULL;
 }