Skip to content

Commit 74d5d3e

Browse files
authored
Merge pull request #119 from web-servers/ModCluster_RHEL9
added default modcluster.conf update to manage new naming convention
2 parents ba22ef0 + b65b990 commit 74d5d3e

File tree

3 files changed

+9
-3
lines changed

3 files changed

+9
-3
lines changed

core/src/main/groovy/noe/common/DefaultProperties.groovy

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ package noe.common
22

33
import noe.common.utils.Library
44
import noe.common.utils.OpenSslVersion
5+
import noe.common.utils.Platform
56
import noe.common.utils.Version
67
/**
78
*
@@ -127,4 +128,8 @@ class DefaultProperties {
127128
public static final String MODCLUSTER_MCAST_PORT = Library.getUniversalProperty('modcluster.mcast.port', '23364')
128129
public static final String UDP_MCAST_ADDRESS = Library.getUniversalProperty('udp.mcast.address', Library.getUniversalProperty("MCAST_ADDR", '228.11.11.11'))
129130
public static final String JGROUPS_MCAST_PORT = Library.getUniversalProperty('jgroups.mcast.port', Library.getUniversalProperty("MCAST_PORT", '45688'))
131+
132+
// Added to allow for the new naming convention used in RHEL9
133+
static final String MOD_CLUSTER_CONFIG_FILE = new Platform().isRHEL9() ? Library.getUniversalProperty('mod.proxy.cluster.config.file', "mod_proxy_cluster.conf") : Library.getUniversalProperty('modcluster.config.file', "mod_cluster.conf")
134+
static final String MOD_PROXY_CLUSTER_CONFIG_FILE = MOD_CLUSTER_CONFIG_FILE
130135
}

core/src/main/groovy/noe/rhel/server/workspace/WorkspaceHttpdTomcatsBaseOS.groovy

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ class WorkspaceHttpdTomcatsBaseOS extends WorkspaceMultipleTomcats{
9595
* @param httpd Instance of `Httpd` server
9696
*/
9797
private void copyModClusterConfIfMissing(Httpd httpd) {
98-
List<String> confRelativePaths = ["conf.d/mod_cluster.conf"]
98+
List<String> confRelativePaths = ["conf.d/${DefaultProperties.MOD_CLUSTER_CONFIG_FILE}"]
9999
confRelativePaths.each() { String confRelativePath->
100100
File confPath = new File(httpd.getServerRoot(), confRelativePath)
101101
File sclConfPath = new File("${DefaultProperties.HTTPD_SCL_ROOT}/etc/httpd/${confRelativePath}")

testsuite/src/test/groovy/noe/HttpdKillTestIT.groovy

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
package noe
22

33
import groovy.util.logging.Slf4j
4+
import noe.common.DefaultProperties
45
import noe.common.TestAbstract
56
import noe.common.utils.JBFile
67
import noe.common.utils.Platform
@@ -35,8 +36,8 @@ class HttpdKillTestIT extends TestAbstract {
3536
log.debug("Deleting ssl.conf: $sslConfFile.absolutePath")
3637
JBFile.delete(sslConfFile)
3738
// we are not testing mod_cluster here, lets remove mod_cluster
38-
def mod_clusterConfFile = new File(httpdServer.getConfDeploymentPath(), "mod_cluster.conf")
39-
log.debug("Deleting mod-cluster.conf: $mod_clusterConfFile.absolutePath")
39+
def mod_clusterConfFile = new File(httpdServer.getConfDeploymentPath(), DefaultProperties.MOD_CLUSTER_CONFIG_FILE)
40+
log.debug("Deleting ${DefaultProperties.MOD_CLUSTER_CONFIG_FILE}: $mod_clusterConfFile.absolutePath")
4041
JBFile.delete(mod_clusterConfFile)
4142
}
4243
}

0 commit comments

Comments
 (0)