Bug 1172316

Summary: Apache HTTP Server build: mod_cluster distribution broken on many levels
Product: [Retired] JBoss Web Server 3 Reporter: Michal Karm Babacek <mbabacek>
Component: unspecifiedAssignee: Weinan Li <weli>
Status: CLOSED EOL QA Contact: Michal Karm Babacek <mbabacek>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 3.0.0CC: bperkins, jclere, jstefl, lfuka, mbabacek, pslavice
Target Milestone: Beta   
Target Release: 3.0.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-03-27 19:08:09 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1178630    

Description Michal Karm Babacek 2014-12-09 20:09:25 UTC
Dear Weinan, I would like to highlight several things that make the current mod_cluster distribution completely non-viable within the context of jws-httpd-3.0.0-DR0-RHEL6-x86_64.

mod_cluster 1.3.x and Apache HTTP Server 2.4.x
==============================================

mod_cluster originally coming with Apache HTTP Server 2.2.x comprised of
these modules:

> slotmem_module       modules/mod_slotmem.so
> manager_module       modules/mod_manager.so
> proxy_cluster_module modules/mod_proxy_cluster.so
> advertise_module     modules/mod_advertise.so

Due to the mod_slotmem being actually a part of the new Apache HTTP Server 2.4.x,
we offer a replacement build in mod_cluster 1.3.x that avoids namespace collision:

> cluster_slotmem_module modules/mod_cluster_slotmem.so

The current jws-httpd-3.0.0-DR0-RHEL6-x86_64 contains only these:

> mod_slotmem_plain.so
> mod_slotmem_shm.so


mod_cluster.conf - loaded modules
=================================

Please, include the proper Load directives for the aforementioned four modules.
The current file references non-existent module and wrong paths.

mod_cluster.conf - auth
=======================

Please, refactor the file so as it features Requires granted instead of deprecated Allow from directives.


Thanks :-)

Cheers
K.

Comment 1 Weinan Li 2014-12-10 09:48:43 UTC
Fix Part I:

[weli@dhcp-66-78-87 jws-compose]$ git diff
diff --git a/jws-compose.spec b/jws-compose.spec
index 26d93d0..ad87665 100644
--- a/jws-compose.spec
+++ b/jws-compose.spec
@@ -238,7 +238,13 @@ sed -i -e 's:my $installbuilddir = $libdir . "/%{httpd}/build";:my $installbuild
 cp -Lr %{_libdir}/%{httpd}/modules/mod_jk.so httpd/modules/

 # mod_cluster-native
-cp -L %{_libdir}/%{httpd}/modules/mod_{advertise,manager,proxy_cluster,slotmem*}.so httpd/modules/
+# [weli@dhcp-66-78-87 x86_64]$ rpm -ql -p  mod_cluster-native-1.3.1-1.Beta1_redhat_1.el6.x86_64.rpm
+# /etc/httpd24/conf.d/mod_cluster.conf
+# /usr/lib64/httpd24/modules/mod_advertise.so
+# /usr/lib64/httpd24/modules/mod_cluster_slotmem.so
+# /usr/lib64/httpd24/modules/mod_manager.so
+# /usr/lib64/httpd24/modules/mod_proxy_cluster.so
+cp -L %{_libdir}/%{httpd}/modules/mod_{advertise,manager,proxy_cluster,cluster_slotmem}.so httpd/modules/
 cp -pr %{_sysconfdir}/%{httpd}/conf.d/mod_cluster.conf httpd/conf.d/

Comment 2 Weinan Li 2014-12-11 02:00:26 UTC
Fix Part II:

[weli@dhcp-66-78-87 mod_cluster-native]$ git diff HEAD^
diff --git a/mod_cluster-native.conf b/mod_cluster-native.conf
index 6fa4d30..d56f915 100644
--- a/mod_cluster-native.conf
+++ b/mod_cluster-native.conf
@@ -1,6 +1,6 @@
 # mod_proxy_balancer should be disabled when mod_cluster is used
 LoadModule proxy_cluster_module modules/mod_proxy_cluster.so
-LoadModule slotmem_module modules/mod_slotmem.so
+LoadModule slotmem_module modules/mod_cluster_slotmem.so
 LoadModule manager_module modules/mod_manager.so
 LoadModule advertise_module modules/mod_advertise.so

@@ -10,17 +10,13 @@ MemManagerFile /var/cache/mod_cluster
   Listen 6666
   <VirtualHost *:6666>
     <Directory />
-      Order deny,allow
-      Deny from all
-      Allow from 127.0.0.1
+      Require ip 127.0.0.1
     </Directory>
     ServerAdvertise on

@Michal, could you please help to check whether my 'Require' directive is correct? I'm a newbie to it :-)
     EnableMCPMReceive
     <Location /mod_cluster_manager>
       SetHandler mod_cluster-manager
-      Order deny,allow
-      Deny from all
-      Allow from 127.0.0.1
+      Require ip 127.0.0.1
    </Location>
   </VirtualHost>
 </IfModule>

Comment 3 Michal Karm Babacek 2014-12-11 12:16:06 UTC
Looks legit :-)

Comment 4 Michal Karm Babacek 2015-01-20 08:44:44 UTC
THX.