From: Jim Jagielski Date: Sun, 21 Aug 2022 20:29:06 +0000 (+0000) Subject: Merge r1902117, r1902130, r1902132, r1902133 from trunk: X-Git-Tag: 2.4.55-rc1-candidate~94 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=938554adf4cc6bd99e26ec325d234d695bb73366;p=thirdparty%2Fapache%2Fhttpd.git Merge r1902117, r1902130, r1902132, r1902133 from trunk: *) 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 --- diff --git a/CHANGES b/CHANGES index fd086d83b15..d678a303c87 100644 --- 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 a359feddf36..4e8fedf3f61 100644 --- 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 index b2583580dd8..00000000000 --- a/changes-entries/mod_heartmonitor-HeartbeatMaxServers.txt +++ /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] diff --git a/docs/manual/mod/mod_heartmonitor.xml b/docs/manual/mod/mod_heartmonitor.xml index c6ee2dfde29..6001fee1933 100644 --- a/docs/manual/mod/mod_heartmonitor.xml +++ b/docs/manual/mod/mod_heartmonitor.xml @@ -76,7 +76,7 @@ use mod_slotmem_shm.

HeartbeatStorage -Path to store heartbeat data +Path to store heartbeat data when using flat-file storage HeartbeatStorage file-path HeartbeatStorage logs/hb.dat server config @@ -84,7 +84,8 @@ use mod_slotmem_shm.

The HeartbeatStorage directive specifies the path to store heartbeat data. This flat-file is used only when - mod_slotmem_shm is not loaded.

+ mod_slotmem_shm is not loaded and + HeartbeatMaxServers is set to 0.

@@ -101,6 +102,8 @@ heartbeat requests to this server 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 mod_slotmem_shm is in use.

+

For using flat-file storage (without loading mod_slotmem_shm), + this must be set to 0. The value must be either 0, or bigger or equals 10.

diff --git a/modules/cluster/mod_heartmonitor.c b/modules/cluster/mod_heartmonitor.c index 4e193d28edc..53b650469d7 100644 --- a/modules/cluster/mod_heartmonitor.c +++ b/modules/cluster/mod_heartmonitor.c @@ -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; }