Bug#645460: apache2.2-common: /etc/init.d/apache2 start and restart need to wait until really started

2013-01-31 Thread Nerijus Kislauskas
On 01/30/2013 06:24 PM, Arno Töll wrote:
 Hi,
 
 On 30.01.2013 15:39, Nerijus Kislauskas wrote:
 It makes lsb:apache2 unusable on pacemaker clusters.
 
 this is a known problem. I tried to address this problem partially in
 our upcoming Apache 2.4 tree, but since complex init scripts such as
 Apache's are error prone, we decided not to backport my improvements to 2.2.
 
 Could you try the new init script [1] and tell me if it fixes your
 problem? There I wait until the server is stopped, start is left as is
 so far.
 
 
 [1]
 http://anonscm.debian.org/gitweb/?p=pkg-apache/apache2.git;a=blob;f=debian/apache2.init;h=130c0f533d18abea263622dbd2673f134989b5ad;hb=refs/heads/next

No, it does not. Pacemaker result:

Jan 31 11:11:15 lrmd: [1979]: info: operation start[1579] on
apache2-test for client 1982: pid 24864 exited with return code 0
Jan 31 11:11:15 lrmd: [1979]: info: rsc:apache2-test monitor[1580] (pid
24880)
Jan 31 11:11:15 lrmd: [1979]: info: operation monitor[1580] on
apache2-test for client 1982: pid 24880 exited with return code 7
(mapped from 3)
Jan 31 11:11:16 lrmd: [1979]: info: cancel_op: operation monitor[1580]
on apache2-test for client 1982, its parameters: crm_feature_set=[3.0.6]
CRM_meta_name=[monitor] CRM_meta_interval=[6]
CRM_meta_timeout=[2]  cancelled
Jan 31 11:11:16 lrmd: [1979]: info: rsc:apache2-test stop[1581] (pid 24894)

I will stay with original wheezy apache2 init script with sleep X at
the end of start) section. Looks ugly, but works.

http://www.linux-ha.org/wiki/LSB_Resource_Agents
-- 
Nerijus Kislauskas


--
To UNSUBSCRIBE, email to debian-apache-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/510a471d.2030...@ktu.lt



Bug#645460: apache2.2-common: /etc/init.d/apache2 start and restart need to wait until really started

2013-01-30 Thread Nerijus Kislauskas
Hi,

The same problem exists in Debian wheezy:

# cat /etc/debian_version
7.0
# while true; do /etc/init.d/apache2 stop  /dev/null;
/etc/init.d/apache2 start; echo -n Exit Code: ; echo $?;
/etc/init.d/apache2 status; echo; sleep 5; done
[ ok ] Starting web server: apache2.
Exit Code: 0
Apache2 is running (pid 25328).

[ ok ] Starting web server: apache2.
Exit Code: 0
Apache2 is NOT running.

[ ok ] Starting web server: apache2.
Exit Code: 0
Apache2 is running (pid 25517).

[ ok ] Starting web server: apache2.
Exit Code: 0
Apache2 is NOT running.

[ ok ] Starting web server: apache2.
Exit Code: 0
Apache2 is NOT running.

[ ok ] Starting web server: apache2.
Exit Code: 0
Apache2 is running (pid 25757).

[ ok ] Starting web server: apache2.
Exit Code: 0
Apache2 is NOT running.
^C
#

It makes lsb:apache2 unusable on pacemaker clusters.

-- 
Nerijus Kislauskas


-- 
To UNSUBSCRIBE, email to debian-apache-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/510930b5.5080...@ktu.lt



Bug#645460: apache2.2-common: /etc/init.d/apache2 start and restart need to wait until really started

2013-01-30 Thread Arno Töll
Hi,

On 30.01.2013 15:39, Nerijus Kislauskas wrote:
 It makes lsb:apache2 unusable on pacemaker clusters.

this is a known problem. I tried to address this problem partially in
our upcoming Apache 2.4 tree, but since complex init scripts such as
Apache's are error prone, we decided not to backport my improvements to 2.2.

Could you try the new init script [1] and tell me if it fixes your
problem? There I wait until the server is stopped, start is left as is
so far.


[1]
http://anonscm.debian.org/gitweb/?p=pkg-apache/apache2.git;a=blob;f=debian/apache2.init;h=130c0f533d18abea263622dbd2673f134989b5ad;hb=refs/heads/next
-- 
with kind regards,
Arno Töll
IRC: daemonkeeper on Freenode/OFTC
GnuPG Key-ID: 0x9D80F36D



signature.asc
Description: OpenPGP digital signature


Bug#645460: apache2.2-common: /etc/init.d/apache2 start and restart need to wait until really started

2011-10-15 Thread Yukio Shiiya
Package: apache2.2-common
Version: 2.2.16-6+squeeze4
Severity: normal
Tags: patch

Dear Maintainer,

First of all, sorry for my poor English.

/etc/init.d/apache2 start is completed before apache2 is really
started.
And, /etc/init.d/apache2 restart is completed before apache2 is
really restarted.

For example, if /etc/init.d/apache2 start and /etc/init.d/apache2
status are run continuously, it will be displayed as Apache2 is NOT
running..
But, if /etc/init.d/apache2 status is run after several seconds, it
will be displayed as Apache2 is running (pid )..

# ps -ef | grep -v grep | grep apache
root  2603 1  0 05:51 ?00:00:00 /usr/sbin/apache2 -k start
www-data  2610  2603  0 05:51 ?00:00:00 /usr/sbin/apache2 -k start
www-data  2611  2603  0 05:51 ?00:00:00 /usr/sbin/apache2 -k start
www-data  2612  2603  0 05:51 ?00:00:00 /usr/sbin/apache2 -k start
www-data  2613  2603  0 05:51 ?00:00:00 /usr/sbin/apache2 -k start
www-data  2614  2603  0 05:51 ?00:00:00 /usr/sbin/apache2 -k start
# /etc/init.d/apache2 stop
Stopping web server: apache2 ... waiting .
# ps -ef | grep -v grep | grep apache
# /etc/init.d/apache2 start   ; echo $? ; /etc/init.d/apache2 status ; echo $?
Starting web server: apache2.
0
Apache2 is NOT running.
3
# /etc/init.d/apache2 status  ; echo $?
Apache2 is running (pid 2929).
0

And if /etc/init.d/apache2 restart and /etc/init.d/apache2 status
are run continuously, it will be displayed as Apache2 is NOT running..
But, if /etc/init.d/apache2 status is run after several seconds, it
will be displayed as Apache2 is running (pid )..

# ps -ef | grep -v grep | grep apache
root  2929 1  0 05:57 ?00:00:00 /usr/sbin/apache2 -k start
www-data  2940  2929  0 05:57 ?00:00:00 /usr/sbin/apache2 -k start
www-data  2941  2929  0 05:57 ?00:00:00 /usr/sbin/apache2 -k start
www-data  2942  2929  0 05:57 ?00:00:00 /usr/sbin/apache2 -k start
www-data  2943  2929  0 05:57 ?00:00:00 /usr/sbin/apache2 -k start
www-data  2944  2929  0 05:57 ?00:00:00 /usr/sbin/apache2 -k start
# /etc/init.d/apache2 restart ; echo $? ; /etc/init.d/apache2 status ; echo $?
Restarting web server: apache2 ... waiting .
0
Apache2 is NOT running.
3
# /etc/init.d/apache2 status  ; echo $?
Apache2 is running (pid 2987).
0

This symptom has a bad influence on operation of HA cluster resource
manager (such as pacemaker).

The attached patch corrects /etc/init.d/apache2 so that it waits for
apache2 to be really started or restarted.
Please review the attached patch, and if satisfactory, consider
including it in the package.

P.S.
It seems that this symptom does not occur when the load of apache is
low to some extent.

In our system, when some modules (such as perl, php5 and python) were
enabled, the above-mentioned symptom occurred.
But, when some modules (such as perl, php5 and python) were disabled,
even if I ran /etc/init.d/apache2 start and /etc/init.d/apache2
status continuously, it came to be immediately displayed as Apache2
is running (pid )..

Thanks,

-- Package-specific info:
List of enabled modules from 'apache2 -M':
  alias auth_basic authn_file authz_default authz_groupfile
  authz_host authz_user autoindex cgi deflate dir env mime
  negotiation perl php5 python reqtimeout setenvif status
List of enabled php5 extensions:
  pdo

-- System Information:
Debian Release: 6.0.3
  APT prefers stable-updates
  APT policy: (500, 'stable-updates'), (500, 'stable')
Architecture: i386 (i686)

Kernel: Linux 2.6.32-5-686 (SMP w/1 CPU core)
Locale: LANG=ja_JP.UTF-8, LC_CTYPE=ja_JP.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages apache2.2-common depends on:
ii  apache2-utils  2.2.16-6+squeeze4 utility programs for webservers
ii  apache2.2-bin  2.2.16-6+squeeze4 Apache HTTP Server common binary f
ii  libmagic1  5.04-5File type determination library us
ii  lsb-base   3.2-23.2squeeze1  Linux Standard Base 3.2 init scrip
ii  mime-support   3.48-1MIME files 'mime.types'  'mailcap
ii  perl   5.10.1-17squeeze2 Larry Wall's Practical Extraction 
ii  procps 1:3.2.8-9 /proc file system utilities

Versions of packages apache2.2-common recommends:
ii  ssl-cert  1.0.28 simple debconf wrapper for OpenSSL

Versions of packages apache2.2-common suggests:
pn  apache2-doc   none (no description available)
pn  apache2-suexec | apache2-suex none (no description available)
ii  w3m [www-browser] 0.5.2-9WWW browsable pager with excellent

Versions of packages apache2.2-common is related to:
pn  apache2-mpm-event  none(no description available)
pn  apache2-mpm-itknone(no description available)
ii  apache2-mpm-prefork2.2.16-6+squeeze4 Apache HTTP Server - traditional n
pn  apache2-mpm-worker none