Apache 2.4 support for OpenSRF and Evergreen

Bug #1099685 reported by Dan Scott
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Evergreen
Fix Released
Undecided
Unassigned
OpenSRF
Fix Released
Undecided
Unassigned
2.1
New
Undecided
Unassigned

Bug Description

* Fedora 18

Fedora 18 brings Apache 2.4 to the mix, which replaces the conn_rec->remote_ip member with conn_rec->client_ip or conn_rec->useragent_ip (per http://httpd.apache.org/docs/2.4/developer/new_api_2_4.html). client_ip seems to be the best choice for us, to avoid everything being logged from the load balancer or proxy instead of the client's address.

Suggested plan of attack: ifdef this based on the version of Apache detected at configure-time.

Debian Wheezy still has Apache 2.2, but 2.4 will undoubtedly start rolling out to other distros in the near future.

Revision history for this message
Dan Scott (denials) wrote :

Also affects osrf_http_translator.c

Revision history for this message
Dan Scott (denials) wrote :

Hmm, maybe this should be an Apache 2.4 compatibility list bug... other things that need to change per http://httpd.apache.org/docs/2.4/upgrading.html :

* Access control - syntax change from "Order deny, allow\nAllow from all" to "Require all granted" (s/Deny/denied/ for the opposite case, and "Require host 10.0.0.0/8" for specific hosts/CIDR I think)

* Server-side include syntax has shifted significantly, although we will probably just use the new SSILegacyExprParser directive as a bridge (http://httpd.apache.org/docs/2.4/mod/mod_include.html#ssilegacyexprparser)

Revision history for this message
Bill Erickson (berick) wrote :

+1 to IFDEFing conn_rec->client_ip in at compile time.

Revision history for this message
Dan Scott (denials) wrote :

For the OpenSRF osrf_json_gateway / osrf_http_translator IFDEF plan, I have pushed user/dbs/apache_2_4_support - the autotools code feels a bit ugly, but that seems par for the course. Would be wonderful if someone could test this on an Apache 2.2 system to ensure that it works...

Revision history for this message
Dan Scott (denials) wrote :

For the Evergreen Apache config syntax, I pushed user/dbs/apache_2_4_support to the working/Evergreen repository.

To be clear, all is symmetrical now; there's one branch in the working/OpenSRF repository, and one branch in the working/Evergreen repository, both named user/dbs/apache_2_4_support.

Changed in evergreen:
milestone: none → 2.4.0-alpha
Changed in opensrf:
milestone: none → 2.1.3
summary: - osrf_json_gateway.c does not compile against Apache 2.4
+ Apache 2.4 support for OpenSRF and Evergreen
Revision history for this message
Bill Erickson (berick) wrote :

Confirmed OpenSRF code works with Apache 2.2.22 (Wheezy). Sign-off pushed to opensrf working => user/berick/apache_2_4_support_signoff

Revision history for this message
Dan Scott (denials) wrote :

Thanks Bill! I pushed your OpenSRF branch to master and rel_2_1.

Changed in opensrf:
status: New → Fix Committed
Ben Shum (bshum)
Changed in evergreen:
status: New → Triaged
Revision history for this message
Pasi Kallinen (paxed) wrote :

I think I'm hitting this...

*OpenSRF master
*Debian testing
*Apache 2.2.22

configure fails with:

Use of uninitialized value $includedir in concatenation (.) or string at (eval 9) line 1.
./configure: line 12375: apache2: command not found
configure: error: "could not determine apache version number"

apache2 resides in /usr/sbin/ so isn't visible to normal user.

Revision history for this message
Dan Scott (denials) wrote :

Pasi: Thanks, sounds like we need to go through the same dance to get the full path for the Apache executable as we do for the apxs2 executable. Easy enough to do, it'll just take some time.

FWIW, /usr/sbin is in the path for normal users on my distro of choice. Good fun.

Revision history for this message
Dan Scott (denials) wrote :

Pasi et al: please give user/dbs/apache_path_lookup a shot; works for me when I pull /usb/sbin out of my PATH env and give it a spin.

Changed in opensrf:
status: Fix Committed → Confirmed
Revision history for this message
Dan Scott (denials) wrote :

Err, I should note that's user/dbs/apache_path_lookup in the OpenSRF working repository - just to be clear!

Revision history for this message
Jason Etheridge (phasefx) wrote :

This works for me. I've added my sign-off, but didn't push to master, since some of the syntax in configure.ac is greek to me.

collab/phasefx/apache_path_lookup

-- Jason

Revision history for this message
Ben Shum (bshum) wrote :

Works for me too, added my sign-off as well:

working/collab/bshum/apache_path_lookup

http://git.evergreen-ils.org/?p=working/OpenSRF.git;a=shortlog;h=refs/heads/collab/bshum/apache_path_lookup

Revision history for this message
Dan Scott (denials) wrote :

Thanks, Jason and Ben. Pushed to master and rel_2_1.

So... anyone interested in testing / signing-off on the Evergreen branch at http://git.evergreen-ils.org/?p=working/Evergreen.git;a=shortlog;h=refs/heads/user/dbs/apache_2_4_support ? Testing isn't much, really, it's just a few additional Apache sample config files for 2.4, plus corresponding updates to the install docs.

Ben Shum (bshum)
Changed in opensrf:
status: Confirmed → Fix Committed
Ben Shum (bshum)
Changed in evergreen:
milestone: 2.4.0-alpha1 → 2.4.0-beta
Revision history for this message
Ben Shum (bshum) wrote :

Picked changes to Evergreen master. Thanks Dan!

(will note any other Fedora 18 changes later on in new bug tickets)

Changed in evergreen:
status: Triaged → Fix Committed
Galen Charlton (gmc)
Changed in opensrf:
milestone: 2.1.3 → 2.2.0-alpha
Ben Shum (bshum)
Changed in evergreen:
status: Fix Committed → Fix Released
Changed in opensrf:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.