Re: [Openais] init script runlevel at 20/20 instead of 20/80 debate

2010-09-03 Thread Fabio M. Di Nitto
On 9/2/2010 9:09 PM, Steven Dake wrote:
 On 08/31/2010 08:45 PM, Vladislav Bogdanov wrote:
 Hi,
 31.08.2010 22:22, Steven Dake wrote:
 I am pleased to announce Corosync 1.2.8 is available for immediate
 download from our website.

 Initscript doesn't seem to be fixed yet.
 http://marc.info/?l=openaism=128271460429681w=2
 http://www.mail-archive.com/pacema...@oss.clusterlabs.org/msg05833.html

 Best,
 Vladislav
 
 Fabio,
 
 Any chance you can provide feedback on this topic?  I'm at a loss in
 this area of distro integration.

so the current init script has:

 # chkconfig: - 20 20

and that is definitely wrong. It must have slept through the crack when
we re-did the init script a while ago. Kudos to Vladislav for noticing it.

(making a bunch of assumptions here) the general rule is:

stop-priority-value = 100 - start-priority-value.

to guarantee the service start/stop symmetry that is pretty much the
case for corosync.

So a value of 20/80 would be correct.

Now this should address the first concern reported.

The other issue with start-early/late, that´s very debatable and
dependent on use cases and distribution init process implementation (and
the way it calculates init dependencies).

My general approach is that the generic/default init script should
satisfy the majority of the cases out there (it´s called generic for a
good reason) and the current values do (modulo the error in the stop
sequence that needs to be addressed).

Every sysadmin has the power to tailor those values with system command
tools, without the need to rebuild the rpm or editing the init script
itself (chkconfig or whatever they use nowadays).

The idea of having an early/late script is something I really don´t
like. It involves a chain of changes to be done properly that adds an
unnecessary complexity specially when there are already tools to move
scripts priority around that are tailored to the OS/Distribution behavior.

Fabio
___
Openais mailing list
Openais@lists.linux-foundation.org
https://lists.linux-foundation.org/mailman/listinfo/openais


Re: [Openais] init script runlevel at 20/20 instead of 20/80 debate

2010-09-03 Thread Keisuke MORI
2010/9/3 Fabio M. Di Nitto fabbi...@fabbione.net:
 so the current init script has:

 # chkconfig: - 20 20

 and that is definitely wrong. It must have slept through the crack when
 we re-did the init script a while ago. Kudos to Vladislav for noticing it.

 (making a bunch of assumptions here) the general rule is:

 stop-priority-value = 100 - start-priority-value.

 to guarantee the service start/stop symmetry that is pretty much the
 case for corosync.

 So a value of 20/80 would be correct.

 Now this should address the first concern reported.


As for the starting order, I would be grad if you could also consider
the attached patch.

It will adjust the dependency with syslog correctly so that can
prevent a problem when you use rsyslog as I reported before:
https://lists.linux-foundation.org/pipermail/openais/2010-July/014946.html

Thanks,
-- 
Keisuke MORI
--- corosync-1.2.8/init/generic.in.orig	2010-09-03 16:42:39.0 +0900
+++ corosync-1.2.8/init/generic.in	2010-09-03 16:46:34.0 +0900
@@ -12,9 +12,8 @@
 #
 ### BEGIN INIT INFO
 # Provides:		corosync
-# Required-Start:	$network
-# Should-Start:		$syslog
-# Required-Stop:	$network
+# Required-Start:	$network $syslog
+# Required-Stop:	$network $syslog
 # Default-Start:
 # Default-Stop:
 # Short-Description:	Starts and stops Corosync Cluster Engine.
___
Openais mailing list
Openais@lists.linux-foundation.org
https://lists.linux-foundation.org/mailman/listinfo/openais

Re: [Openais] init script runlevel at 20/20 instead of 20/80 debate

2010-09-03 Thread Fabio M. Di Nitto
On 9/3/2010 10:00 AM, Keisuke MORI wrote:
 2010/9/3 Fabio M. Di Nitto fabbi...@fabbione.net:
 so the current init script has:

 # chkconfig: - 20 20

 and that is definitely wrong. It must have slept through the crack when
 we re-did the init script a while ago. Kudos to Vladislav for noticing it.

 (making a bunch of assumptions here) the general rule is:

 stop-priority-value = 100 - start-priority-value.

 to guarantee the service start/stop symmetry that is pretty much the
 case for corosync.

 So a value of 20/80 would be correct.

 Now this should address the first concern reported.
 
 
 As for the starting order, I would be grad if you could also consider
 the attached patch.
 
 It will adjust the dependency with syslog correctly so that can
 prevent a problem when you use rsyslog as I reported before:
 https://lists.linux-foundation.org/pipermail/openais/2010-July/014946.html

I think this is a sane patch and should go in.

The only thing that puzzles me about this requirement is that many
daemons do use syslog before the daemon is available and don´t fail.

All C calls to syslog returns void so there is no way to know if they
succeeded or not (as sign that the daemon is running), and glibc should
make that transparent. So I wonder if the issue is really corosync that
needs to start after syslog or we are masking another bug somewhere else
(most likely glibc).

Fabio
___
Openais mailing list
Openais@lists.linux-foundation.org
https://lists.linux-foundation.org/mailman/listinfo/openais


Re: [Openais] init script runlevel at 20/20 instead of 20/80 debate

2010-09-03 Thread Vladislav Bogdanov
03.09.2010 11:16, Fabio M. Di Nitto wrote:
 On 9/3/2010 10:00 AM, Keisuke MORI wrote:
 2010/9/3 Fabio M. Di Nitto fabbi...@fabbione.net:
 so the current init script has:

 # chkconfig: - 20 20

 and that is definitely wrong. It must have slept through the crack when
 we re-did the init script a while ago. Kudos to Vladislav for noticing it.

 (making a bunch of assumptions here) the general rule is:

 stop-priority-value = 100 - start-priority-value.

 to guarantee the service start/stop symmetry that is pretty much the
 case for corosync.

 So a value of 20/80 would be correct.

 Now this should address the first concern reported.


 As for the starting order, I would be grad if you could also consider
 the attached patch.

 It will adjust the dependency with syslog correctly so that can
 prevent a problem when you use rsyslog as I reported before:
 https://lists.linux-foundation.org/pipermail/openais/2010-July/014946.html
 
 I think this is a sane patch and should go in.

BTW shouldn't openais initscript also include LSB stanza
# Provides: corosync
So f.e. pacemaker MCP will be satisfied at LSB level too, not only on
chkconfig legacy one (LSB has priority BTW). Pacemaker MCP initscript
already has
# Required-Start:   $network corosync
And personally I start openais instead of corosync to have support for
OCFS2/GFS2.

Best,
Vladislav
___
Openais mailing list
Openais@lists.linux-foundation.org
https://lists.linux-foundation.org/mailman/listinfo/openais


Re: [Openais] init script runlevel at 20/20 instead of 20/80 debate

2010-09-03 Thread Fabio M. Di Nitto
On 9/3/2010 10:26 AM, Vladislav Bogdanov wrote:
 03.09.2010 11:16, Fabio M. Di Nitto wrote:
 On 9/3/2010 10:00 AM, Keisuke MORI wrote:
 2010/9/3 Fabio M. Di Nitto fabbi...@fabbione.net:
 so the current init script has:

 # chkconfig: - 20 20

 and that is definitely wrong. It must have slept through the crack when
 we re-did the init script a while ago. Kudos to Vladislav for noticing it.

 (making a bunch of assumptions here) the general rule is:

 stop-priority-value = 100 - start-priority-value.

 to guarantee the service start/stop symmetry that is pretty much the
 case for corosync.

 So a value of 20/80 would be correct.

 Now this should address the first concern reported.


 As for the starting order, I would be grad if you could also consider
 the attached patch.

 It will adjust the dependency with syslog correctly so that can
 prevent a problem when you use rsyslog as I reported before:
 https://lists.linux-foundation.org/pipermail/openais/2010-July/014946.html

 I think this is a sane patch and should go in.
 
 BTW shouldn't openais initscript also include LSB stanza
 # Provides: corosync

Yes, ACK.

Fabio
___
Openais mailing list
Openais@lists.linux-foundation.org
https://lists.linux-foundation.org/mailman/listinfo/openais


Re: [Openais] init script runlevel at 20/20 instead of 20/80 debate

2010-09-03 Thread Steven Dake

On 09/03/2010 01:00 AM, Keisuke MORI wrote:

2010/9/3 Fabio M. Di Nittofabbi...@fabbione.net:

so the current init script has:


# chkconfig: - 20 20


and that is definitely wrong. It must have slept through the crack when
we re-did the init script a while ago. Kudos to Vladislav for noticing it.

(making a bunch of assumptions here) the general rule is:

stop-priority-value = 100 - start-priority-value.

to guarantee the service start/stop symmetry that is pretty much the
case for corosync.

So a value of 20/80 would be correct.

Now this should address the first concern reported.



As for the starting order, I would be grad if you could also consider
the attached patch.

It will adjust the dependency with syslog correctly so that can
prevent a problem when you use rsyslog as I reported before:
https://lists.linux-foundation.org/pipermail/openais/2010-July/014946.html

Thanks,


I've attached a patch which applies against the current corosync trunk 
and merged it into trunk based upon the patch in that link.


Regards
-steve
Index: init/generic.in
===
--- init/generic.in (revision 3035)
+++ init/generic.in (working copy)
@@ -12,9 +12,8 @@
 #
 ### BEGIN INIT INFO
 # Provides:corosync
-# Required-Start:  $network
-# Should-Start:$syslog
-# Required-Stop:   $network
+# Required-Start:  $network $syslog
+# Required-Stop:   $network $syslog
 # Default-Start:
 # Default-Stop:
 # Short-Description:   Starts and stops Corosync Cluster Engine.
___
Openais mailing list
Openais@lists.linux-foundation.org
https://lists.linux-foundation.org/mailman/listinfo/openais

Re: [Openais] init script runlevel at 20/20 instead of 20/80 debate

2010-09-03 Thread Steven Dake
On 09/02/2010 09:15 PM, Vladislav Bogdanov wrote:
 03.09.2010 00:04, Steven Dake wrote:
 On 09/02/2010 01:28 PM, Vadym Chepkov wrote:

 On Sep 2, 2010, at 3:09 PM, Steven Dake wrote:

 On 08/31/2010 08:45 PM, Vladislav Bogdanov wrote:
 Hi,
 31.08.2010 22:22, Steven Dake wrote:
 I am pleased to announce Corosync 1.2.8 is available for immediate
 download from our website.

 Initscript doesn't seem to be fixed yet.
 http://marc.info/?l=openaism=128271460429681w=2
 http://www.mail-archive.com/pacema...@oss.clusterlabs.org/msg05833.html

 Best,
 Vladislav

 Fabio,

 Any chance you can provide feedback on this topic?  I'm at a loss in
 this area of distro integration.


 I have complained about it some time ago, but was dismissed :)

 Vadym,

 My general take is it is the responsibility of individual distros to
 tailor the init scripts to their particular startup order.

 But rather then you being dismissed, I'd like to hear Fabio's reasoning
 so we can all come to some agreement.  Unfortunately I don't know enough
 about the particulars of the init script dependencies to make that
 judgement.  Fabio should be able to provide appropriate reasoning.


 One option to make everybody happy would be the following:
 Provide two init scripts, say 'corosync-early' and 'corosync-late' (the
 same is for openais), former has 20 80 - for CMAN/PCMKv1/whatever else,
 later has 98 02 - for PCMKv0. And control which one should be started by
 variable in /etc/sysconfig/corosync which should be mandatory and
 checked very early in that scripts. Redhat already has same suffixes for
 readehead.


Agree with Fabio, this sounds too complicated and works around a problem 
which can be addressed with distro tools.  Also pcmkv0 is legacy, so we 
would be working around a problem which doesn't exist upstream.

I don't know enough about the LSB stanzas, but shouldn't these dependent 
init scripts all have a start-requires of corosync?  Would that solve 
all these problems?

Regards
-steve

 Best,
 Vladislav

___
Openais mailing list
Openais@lists.linux-foundation.org
https://lists.linux-foundation.org/mailman/listinfo/openais


Re: [Openais] init script runlevel at 20/20 instead of 20/80 debate

2010-09-03 Thread Vladislav Bogdanov
03.09.2010 19:01, Steven Dake wrote:
 
 Agree with Fabio, this sounds too complicated and works around a problem
 which can be addressed with distro tools.  Also pcmkv0 is legacy, so we
 would be working around a problem which doesn't exist upstream.
 
 I don't know enough about the LSB stanzas, but shouldn't these dependent
 init scripts all have a start-requires of corosync?  Would that solve
 all these problems?

They should and MCP has. I can't check right now, but I think it should
also include stop-requires: corosync (if I understand LSB stanzas
correctly).

Best,
Vladislav
___
Openais mailing list
Openais@lists.linux-foundation.org
https://lists.linux-foundation.org/mailman/listinfo/openais


[Openais] init script runlevel at 20/20 instead of 20/80 debate

2010-09-02 Thread Steven Dake
On 08/31/2010 08:45 PM, Vladislav Bogdanov wrote:
 Hi,
 31.08.2010 22:22, Steven Dake wrote:
 I am pleased to announce Corosync 1.2.8 is available for immediate
 download from our website.

 Initscript doesn't seem to be fixed yet.
 http://marc.info/?l=openaism=128271460429681w=2
 http://www.mail-archive.com/pacema...@oss.clusterlabs.org/msg05833.html

 Best,
 Vladislav

Fabio,

Any chance you can provide feedback on this topic?  I'm at a loss in 
this area of distro integration.

Thanks
-steve


 ___
 Openais mailing list
 Openais@lists.linux-foundation.org
 https://lists.linux-foundation.org/mailman/listinfo/openais

___
Openais mailing list
Openais@lists.linux-foundation.org
https://lists.linux-foundation.org/mailman/listinfo/openais


Re: [Openais] init script runlevel at 20/20 instead of 20/80 debate

2010-09-02 Thread Fabio M. Di Nitto
On 09/02/2010 09:09 PM, Steven Dake wrote:
 On 08/31/2010 08:45 PM, Vladislav Bogdanov wrote:
 Hi,
 31.08.2010 22:22, Steven Dake wrote:
 I am pleased to announce Corosync 1.2.8 is available for immediate
 download from our website.

 Initscript doesn't seem to be fixed yet.
 http://marc.info/?l=openaism=128271460429681w=2
 http://www.mail-archive.com/pacema...@oss.clusterlabs.org/msg05833.html

 Best,
 Vladislav

 Fabio,

 Any chance you can provide feedback on this topic? I'm at a loss in this
 area of distro integration.

Sure, but it will have to wait tomorrow morning once I get in the office.

Fabio
___
Openais mailing list
Openais@lists.linux-foundation.org
https://lists.linux-foundation.org/mailman/listinfo/openais


Re: [Openais] init script runlevel at 20/20 instead of 20/80 debate

2010-09-02 Thread Vadym Chepkov

On Sep 2, 2010, at 3:09 PM, Steven Dake wrote:

 On 08/31/2010 08:45 PM, Vladislav Bogdanov wrote:
 Hi,
 31.08.2010 22:22, Steven Dake wrote:
 I am pleased to announce Corosync 1.2.8 is available for immediate
 download from our website.
 
 Initscript doesn't seem to be fixed yet.
 http://marc.info/?l=openaism=128271460429681w=2
 http://www.mail-archive.com/pacema...@oss.clusterlabs.org/msg05833.html
 
 Best,
 Vladislav
 
 Fabio,
 
 Any chance you can provide feedback on this topic?  I'm at a loss in 
 this area of distro integration.
 

I have complained about it some time ago, but was dismissed :)
So, I build my own rpm

diff -ur corosync-1.2.4.orig/init/generic.in corosync-1.2.4/init/generic.in
--- corosync-1.2.4.orig/init/generic.in 2010-03-22 12:08:57.0 -0400
+++ corosync-1.2.4/init/generic.in  2010-07-28 10:00:00.0 -0400
@@ -6,7 +6,7 @@
 #
 # License: Revised BSD
 
-# chkconfig: - 20 20
+# chkconfig: - 99 01
 # description: Corosync Cluster Engine
 # processname: corosync
 #


___
Openais mailing list
Openais@lists.linux-foundation.org
https://lists.linux-foundation.org/mailman/listinfo/openais


Re: [Openais] init script runlevel at 20/20 instead of 20/80 debate

2010-09-02 Thread Steven Dake
On 09/02/2010 01:28 PM, Vadym Chepkov wrote:

 On Sep 2, 2010, at 3:09 PM, Steven Dake wrote:

 On 08/31/2010 08:45 PM, Vladislav Bogdanov wrote:
 Hi,
 31.08.2010 22:22, Steven Dake wrote:
 I am pleased to announce Corosync 1.2.8 is available for immediate
 download from our website.

 Initscript doesn't seem to be fixed yet.
 http://marc.info/?l=openaism=128271460429681w=2
 http://www.mail-archive.com/pacema...@oss.clusterlabs.org/msg05833.html

 Best,
 Vladislav

 Fabio,

 Any chance you can provide feedback on this topic?  I'm at a loss in
 this area of distro integration.


 I have complained about it some time ago, but was dismissed :)

Vadym,

My general take is it is the responsibility of individual distros to 
tailor the init scripts to their particular startup order.

But rather then you being dismissed, I'd like to hear Fabio's reasoning 
so we can all come to some agreement.  Unfortunately I don't know enough 
about the particulars of the init script dependencies to make that 
judgement.  Fabio should be able to provide appropriate reasoning.

Regards
-steve

 So, I build my own rpm

 diff -ur corosync-1.2.4.orig/init/generic.in corosync-1.2.4/init/generic.in
 --- corosync-1.2.4.orig/init/generic.in   2010-03-22 12:08:57.0 
 -0400
 +++ corosync-1.2.4/init/generic.in2010-07-28 10:00:00.0 -0400
 @@ -6,7 +6,7 @@
   #
   # License: Revised BSD

 -# chkconfig: - 20 20
 +# chkconfig: - 99 01
   # description: Corosync Cluster Engine
   # processname: corosync
   #



___
Openais mailing list
Openais@lists.linux-foundation.org
https://lists.linux-foundation.org/mailman/listinfo/openais


Re: [Openais] init script runlevel at 20/20 instead of 20/80 debate

2010-09-02 Thread Vadym Chepkov

On Sep 2, 2010, at 5:04 PM, Steven Dake wrote:

 On 09/02/2010 01:28 PM, Vadym Chepkov wrote:
 
 On Sep 2, 2010, at 3:09 PM, Steven Dake wrote:
 
 On 08/31/2010 08:45 PM, Vladislav Bogdanov wrote:
 Hi,
 31.08.2010 22:22, Steven Dake wrote:
 I am pleased to announce Corosync 1.2.8 is available for immediate
 download from our website.
 
 Initscript doesn't seem to be fixed yet.
 http://marc.info/?l=openaism=128271460429681w=2
 http://www.mail-archive.com/pacema...@oss.clusterlabs.org/msg05833.html
 
 Best,
 Vladislav
 
 Fabio,
 
 Any chance you can provide feedback on this topic?  I'm at a loss in
 this area of distro integration.
 
 
 I have complained about it some time ago, but was dismissed :)
 
 Vadym,
 
 My general take is it is the responsibility of individual distros to tailor 
 the init scripts to their particular startup order.
 
 But rather then you being dismissed, I'd like to hear Fabio's reasoning so we 
 can all come to some agreement.  Unfortunately I don't know enough about the 
 particulars of the init script dependencies to make that judgement.  Fabio 
 should be able to provide appropriate reasoning.
 
 Regards
 -steve
 
 So, I build my own rpm
 
 diff -ur corosync-1.2.4.orig/init/generic.in corosync-1.2.4/init/generic.in
 --- corosync-1.2.4.orig/init/generic.in  2010-03-22 12:08:57.0 
 -0400
 +++ corosync-1.2.4/init/generic.in   2010-07-28 10:00:00.0 -0400
 @@ -6,7 +6,7 @@
  #
  # License: Revised BSD
 
 -# chkconfig: - 20 20
 +# chkconfig: - 99 01
  # description: Corosync Cluster Engine
  # processname: corosync
  #
 
 
 

This is one of those cases where you can't make everybody happy. In some cases 
corosync needs to start early to support cman/gfs, in other case it needs to 
start later to support XEN with drbd block device. so 20 vs 99 is pretty much 
subjective and since you added 
postinstall scriptlet (using /bin/sh):
if [ $1 -eq 1 ]; then
/sbin/chkconfig --add corosync || :
fi
 it doesn't destroy local preferences during upgrade, so it is just something 
that administrator has to decide for himself.

I need to have corosync to start after ntpd, after sendmail, after winbind, 
after xend and this pretty much leaves me with 99

Vadym
___
Openais mailing list
Openais@lists.linux-foundation.org
https://lists.linux-foundation.org/mailman/listinfo/openais