Date: Thu, 21 Oct 2010 12:21:09 -0400 (EDT) From: Vivek Khera <vivek@khera.org> To: FreeBSD-gnats-submit@FreeBSD.org Subject: ports/151623: apache22 update to 2.2.16_2 broke back compatibilty with profiles Message-ID: <20101021162109.B95013F421@vk-dev.int.kcilink.com> Resent-Message-ID: <201010211630.o9LGUANT043608@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 151623 >Category: ports >Synopsis: apache22 update to 2.2.16_2 broke back compatibilty with profiles >Confidential: no >Severity: critical >Priority: high >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Thu Oct 21 16:30:10 UTC 2010 >Closed-Date: >Last-Modified: >Originator: Vivek Khera >Release: FreeBSD 8.1-RELEASE-p1 i386 >Organization: >Environment: System: FreeBSD vk-dev.int.kcilink.com 8.1-RELEASE-p1 FreeBSD 8.1-RELEASE-p1 #1: Wed Oct 6 10:06:18 EDT 2010 vivek@vk-dev.int.kcilink.com:/n/yertle1/sources/usr8/obj.i386/n/yertle1/sources/usr8/src/sys/KCI32 i386 >Description: I updated a box running apache 2.2 with multiple profiles to the 2.2.16_2 version. Controlling the individual profiles suddenly stopped working, and I traced it down to the pidfile being written incorrectly. It was always writing the pid file as /var/run/httpd.pid regardless of the profile I was starting. I looked into the port's change long on freshports and discovered that the patch from 2.2.16_1 to 2.2.16_2 introduced this change. The comment indicates that "With profiles the old defaults remain unchanged" which is incorrect. To achieve this change the following patch is required. This would have been disastrous had this happened on a production server rather than a development server. >How-To-Repeat: Set up a system running 2.2.16_1 with at least two profiles that write to different PID files. They will be named /var/run/httpd.PROFILENAME.pid Now upgrade to 2.2.16_2 and start the profiles. Now try to stop just one of them. The one started last will be stopped because the pidfile is now called /var/run/httpd.pid for all instances. Note also how it totally overrides the PidFile directive in the httpd.conf for each profile. >Fix: This patch restores the original default pid file value for systems with apache and profiles. Without it, each apache instance will overwrite the /var/run/httpd.pid file causing great confusion when you try to stop/restart one of the profiles. You can still override the pid file with the new config settings (which are totally not documented in the apache22 rc.d file, either.) --- apache22-save 2010-10-21 12:07:04.000000000 -0400 +++ apache22 2010-10-21 12:07:51.000000000 -0400 @@ -64,6 +64,7 @@ if [ -n "$2" ]; then profile="$2" if [ "x${apache22_profiles}" != "x" ]; then + pidfile="${_pidprefix}.${profile}.pid" eval apache22_configfile="\${apache22_${profile}_configfile:-}" if [ "x${apache22_configfile}" = "x" ]; then echo "You must define a configuration file (apache22_${profile}_configfile)" >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20101021162109.B95013F421>