Skip to contentSkip to conversation

add LSB header to xen-watchdog runlevel script

PATCH In review Olaf Hering 5 participants 12 messages Jul 23, 2010 – Jul 26, 2010

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 add LSB header to xen-watchdog runlevel script

Add LSB Header to /etc/init.d/xen-watchdog

---
 tools/hotplug/Linux/init.d/xen-watchdog |   11 +++++++++++
 1 file changed, 11 insertions(+)
tools/hotplug/Linux/init.d/xen-watchdog +11 -0
@@ -4,6 +4,17 @@
 #
 # chkconfig: 2345 21 79
 # description: Run domain watchdog daemon
+### BEGIN INIT INFO
+# Provides:          xen-watchdog
+# Required-Start:    xend
+# Should-Start:      $syslog $remote_fs
+# Required-Stop:     xend
+# Should-Stop:       $syslog $remote_fs
+# Default-Start:     3 4 5
+# Default-Stop:      0 1 2 6
+# Short-Description: Start/stop xen-watchdog
+# Description:       Run domain watchdog daemon.
+### END INIT INFO
 #
 
 # Source function library.
#1 lore raw

Olaf Hering writes ("[Xen-devel] [PATCH] add LSB header to xen-watchdog runlevel script"):

Quoted 1 line

Add LSB Header to /etc/init.d/xen-watchdog

...

Quoted 1 line

+# Default-Start: 3 4 5

This would have the effect of starting the watchdog by default on some systems, as I understand it ? Is that desirable ?

I don't think it's tested in our automatic tests. Do other people test and use it ?

Ian.

#2 lore raw
Quoted 7 lines · Ian Jackson

Olaf Hering writes ("[Xen-devel] [PATCH] add LSB header to xen-watchdog runlevel script"):

Quoted 1 line

Add LSB Header to /etc/init.d/xen-watchdog

...

Quoted 1 line

+# Default-Start: 3 4 5

This would have the effect of starting the watchdog by default on some systems, as I understand it ? Is that desirable ?

This tells the insserv program to create a symlink in the specified runlevels. xdm for example has only '5', because X11 is only supposed to be started in runlevel 5.

There is nothing to worry about here.

Olaf

#3 lore raw

Olaf Hering writes ("Re: [Xen-devel] [PATCH] add LSB header to xen-watchdog runlevel script"):

Quoted 3 lines

This tells the insserv program to create a symlink in the specified runlevels. xdm for example has only '5', because X11 is only supposed to be started in runlevel 5.

Yes, but the question is: do we want to start the watchdog by default ? Previously we didn't.

Quoted 1 line

There is nothing to worry about here.

I'm not so sure ...

Ian.

#4 lore raw
Quoted 7 lines · Ian Jackson

Olaf Hering writes ("Re: [Xen-devel] [PATCH] add LSB header to xen-watchdog runlevel script"):

Quoted 3 lines

This tells the insserv program to create a symlink in the specified runlevels. xdm for example has only '5', because X11 is only supposed to be started in runlevel 5.

Yes, but the question is: do we want to start the watchdog by default ? Previously we didn't.

Thats up to the packager of the binary package.

Or do you mean there should be no runlevel script in the first place?

Olaf

#5 lore raw

Re: [PATCH] add LSB header to xen-watchdog runlevel script [and 1 more messages]

Olaf Hering writes ("Re: [Xen-devel] [PATCH] add LSB header to xen-watchdog runlevel script"):

Quoted 11 lines · Ian Jackson
Quoted 7 lines

Olaf Hering writes ("Re: [Xen-devel] [PATCH] add LSB header to xen-watchdog runlevel script"):

Quoted 3 lines

This tells the insserv program to create a symlink in the specified runlevels. xdm for example has only '5', because X11 is only supposed to be started in runlevel 5.

Yes, but the question is: do we want to start the watchdog by default ? Previously we didn't.

Thats up to the packager of the binary package.
Or do you mean there should be no runlevel script in the first place?

I meant: adding these lines would seem to be likely to cause some systems to automatically start the watchdog when previously they would not have done so. I wanted to know whether that was a good idea.

Tim Deegan writes ("Re: [Xen-devel] [PATCH] add LSB header to xen-watchdog runlevel script"):

Quoted 5 lines
Quoted 2 lines · Ian Jackson

I don't think it's tested in our automatic tests. Do other people test and use it ?

XenServer uses it as part of its high-availability mechanism.

That's good enough for me. I'll apply Olaf's patch.

Thanks,
Ian.

#6 lore raw

Re: [PATCH] add LSB header to xen-watchdog runlevel script [and 1 more messages]

Quoted 10 lines · Ian Jackson

Olaf Hering writes ("Re: [Xen-devel] [PATCH] add LSB header to xen-watchdog runlevel script"):

Quoted 9 lines · Ian Jackson
Quoted 7 lines

Olaf Hering writes ("Re: [Xen-devel] [PATCH] add LSB header to xen-watchdog runlevel script"):

Quoted 3 lines

This tells the insserv program to create a symlink in the specified runlevels. xdm for example has only '5', because X11 is only supposed to be started in runlevel 5.

Yes, but the question is: do we want to start the watchdog by default ? Previously we didn't.

Quoted 6 lines
Quoted 2 lines

Thats up to the packager of the binary package.
Or do you mean there should be no runlevel script in the first place?

I meant: adding these lines would seem to be likely to cause some systems to automatically start the watchdog when previously they would not have done so. I wanted to know whether that was a good idea.

IMHO no -- enabling a watchdog should be an explicit admin action.

Ian.

#7 lore raw

Re: [PATCH] add LSB header to xen-watchdog runlevel script [and 1 more messages]

Ian Campbell writes ("Re: [Xen-devel] [PATCH] add LSB header to xen-watchdog runlevel script [and 1 more messages]"):

Quoted 6 lines · Ian Jackson
Quoted 3 lines

I meant: adding these lines would seem to be likely to cause some systems to automatically start the watchdog when previously they would not have done so. I wanted to know whether that was a good idea.

IMHO no -- enabling a watchdog should be an explicit admin action.

So I conclude that you think the patch is wrong ?

Ian.

#8 lore raw

Re: [PATCH] add LSB header to xen-watchdog runlevel script [and 1 more messages]

Quoted 9 lines · Ian Jackson

Ian Campbell writes ("Re: [Xen-devel] [PATCH] add LSB header to xen-watchdog runlevel script [and 1 more messages]"):

Quoted 6 lines · Ian Jackson
Quoted 3 lines

I meant: adding these lines would seem to be likely to cause some systems to automatically start the watchdog when previously they would not have done so. I wanted to know whether that was a good idea.

IMHO no -- enabling a watchdog should be an explicit admin action.

So I conclude that you think the patch is wrong ?

If it causes the watchdog to be enabled then yes.

However, looking back over the whole thread I think Olaf suggested that just adding this header won't do that and that the admin (or the packages) has to add an explicit request (I guess to chkconfig or something similar) to cause the header to have any actual effect, is that right?

BTW, from the original patch:
+# Required-Start: xend

Is that accurate? I'd have thought the watchdog ought to function independent of xend, e.g. on a pure xl system. I don't see anything to the contrary in a quick glance through the code.

Ian.

#9 lore raw

Re: [PATCH] add LSB header to xen-watchdog runlevel script [and 1 more messages]

Ian Campbell writes ("Re: [Xen-devel] [PATCH] add LSB header to xen-watchdog runlevel script [and 1 more messages]"):

Quoted 4 lines · Ian Jackson
Quoted 1 line

So I conclude that you think the patch is wrong ?

If it causes the watchdog to be enabled then yes.

LSB 3.2 Core 20.3 [1]
says:

Default-Start: run_level_1 [run_level_2...]
Default-Stop: run_level_1 [run_level_2...]

which run levels should by default run the init script with a start (stop) argument to start (stop) the services controlled by the init script

For example, if a service should run in runlevels 3,4, and 5 only, specify "Default-Start 3 4 5" and "Default-Stop: 0 1 2 6"

That seems fairly clear that it's supposed to control the default. I don't know whether any distros automatically honour these settings but I wouldn't be surprised if some of the fancy new parallel init systems did.

[1] http://refspecs.linux-foundation.org/LSB_3.2.0/LSB-Core-generic/LSB-Core-generic/initscrcomconv.html

Quoted 6 lines

BTW, from the original patch:
+# Required-Start: xend

Is that accurate? I'd have thought the watchdog ought to function independent of xend, e.g. on a pure xl system. I don't see anything to the contrary in a quick glance through the code.

You are quite right.

Ian.

#10 lore raw

Re: [PATCH] add LSB header to xen-watchdog runlevel script [and 1 more messages]

In reply to Ian Jackson
Quoted 9 lines · Ian Jackson

Ian Campbell writes ("Re: [Xen-devel] [PATCH] add LSB header to xen-watchdog runlevel script [and 1 more messages]"):

Quoted 6 lines · Ian Jackson
Quoted 3 lines

I meant: adding these lines would seem to be likely to cause some systems to automatically start the watchdog when previously they would not have done so. I wanted to know whether that was a good idea.

IMHO no -- enabling a watchdog should be an explicit admin action.

So I conclude that you think the patch is wrong ?

Ian,

the patch is not wrong. If it were, the chkconfig line had to be removed as well. Both lines just tell the tools about the ordering in the specifieed rulevels, when the admin actually wants to have the script enabled by calling 'chkconfig -a xen-watchdog' or 'insserv watchdog'.

Olaf

#11 lore raw
In reply to Ian Jackson
Quoted 2 lines · Ian Jackson

I don't think it's tested in our automatic tests. Do other people test and use it ?

XenServer uses it as part of its high-availability mechanism.

Tim.

Signature · 3 lines
Tim Deegan <[email protected]>
Principal Software Engineer, XenServer Engineering
Citrix Systems UK Ltd.  (Company #02937203, SL9 0BG)