All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] add LSB header to xen-watchdog runlevel script
@ 2010-07-23 12:13 Olaf Hering
  2010-07-23 16:45 ` Ian Jackson
  0 siblings, 1 reply; 12+ messages in thread
From: Olaf Hering @ 2010-07-23 12:13 UTC (permalink / raw)
  To: xen-devel


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


Signed-off-by: Olaf Hering <olaf@aepfle.de>

---
 tools/hotplug/Linux/init.d/xen-watchdog |   11 +++++++++++
 1 file changed, 11 insertions(+)

--- xen-unstable.hg-4.1.21836.orig/tools/hotplug/Linux/init.d/xen-watchdog
+++ xen-unstable.hg-4.1.21836/tools/hotplug/Linux/init.d/xen-watchdog
@@ -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.

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH] add LSB header to xen-watchdog runlevel script
  2010-07-23 12:13 [PATCH] add LSB header to xen-watchdog runlevel script Olaf Hering
@ 2010-07-23 16:45 ` Ian Jackson
  2010-07-23 17:36   ` Olaf Hering
  2010-07-26  9:23   ` Tim Deegan
  0 siblings, 2 replies; 12+ messages in thread
From: Ian Jackson @ 2010-07-23 16:45 UTC (permalink / raw)
  To: Olaf Hering; +Cc: xen-devel

Olaf Hering writes ("[Xen-devel] [PATCH] add LSB header to xen-watchdog runlevel script"):
> Add LSB Header to /etc/init.d/xen-watchdog
...
> +# 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.

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH] add LSB header to xen-watchdog runlevel script
  2010-07-23 16:45 ` Ian Jackson
@ 2010-07-23 17:36   ` Olaf Hering
  2010-07-23 18:04     ` Ian Jackson
  2010-07-26  9:23   ` Tim Deegan
  1 sibling, 1 reply; 12+ messages in thread
From: Olaf Hering @ 2010-07-23 17:36 UTC (permalink / raw)
  To: Ian Jackson; +Cc: xen-devel

On Fri, Jul 23, Ian Jackson wrote:

> Olaf Hering writes ("[Xen-devel] [PATCH] add LSB header to xen-watchdog runlevel script"):
> > Add LSB Header to /etc/init.d/xen-watchdog
> ...
> > +# 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

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH] add LSB header to xen-watchdog runlevel script
  2010-07-23 17:36   ` Olaf Hering
@ 2010-07-23 18:04     ` Ian Jackson
  2010-07-23 18:43       ` Olaf Hering
  0 siblings, 1 reply; 12+ messages in thread
From: Ian Jackson @ 2010-07-23 18:04 UTC (permalink / raw)
  To: Olaf Hering; +Cc: xen-devel@lists.xensource.com

Olaf Hering writes ("Re: [Xen-devel] [PATCH] add LSB header to xen-watchdog runlevel script"):
> 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.

> There is nothing to worry about here.

I'm not so sure ...

Ian.

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH] add LSB header to xen-watchdog runlevel script
  2010-07-23 18:04     ` Ian Jackson
@ 2010-07-23 18:43       ` Olaf Hering
  0 siblings, 0 replies; 12+ messages in thread
From: Olaf Hering @ 2010-07-23 18:43 UTC (permalink / raw)
  To: Ian Jackson; +Cc: xen-devel@lists.xensource.com

On Fri, Jul 23, Ian Jackson wrote:

> Olaf Hering writes ("Re: [Xen-devel] [PATCH] add LSB header to xen-watchdog runlevel script"):
> > 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

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH] add LSB header to xen-watchdog runlevel script
  2010-07-23 16:45 ` Ian Jackson
  2010-07-23 17:36   ` Olaf Hering
@ 2010-07-26  9:23   ` Tim Deegan
  2010-07-26 10:08     ` [PATCH] add LSB header to xen-watchdog runlevel script [and 1 more messages] Ian Jackson
  1 sibling, 1 reply; 12+ messages in thread
From: Tim Deegan @ 2010-07-26  9:23 UTC (permalink / raw)
  To: Ian Jackson; +Cc: Olaf Hering, xen-devel@lists.xensource.com

At 17:45 +0100 on 23 Jul (1279907152), Ian Jackson wrote:
> 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.

-- 
Tim Deegan <Tim.Deegan@citrix.com>
Principal Software Engineer, XenServer Engineering
Citrix Systems UK Ltd.  (Company #02937203, SL9 0BG)

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH] add LSB header to xen-watchdog runlevel script [and 1 more messages]
  2010-07-26  9:23   ` Tim Deegan
@ 2010-07-26 10:08     ` Ian Jackson
  2010-07-26 10:16       ` Ian Campbell
  0 siblings, 1 reply; 12+ messages in thread
From: Ian Jackson @ 2010-07-26 10:08 UTC (permalink / raw)
  To: Tim Deegan, Olaf Hering; +Cc: xen-devel@lists.xensource.com

Olaf Hering writes ("Re: [Xen-devel] [PATCH] add LSB header to xen-watchdog runlevel script"):
> On Fri, Jul 23, Ian Jackson wrote:
> > Olaf Hering writes ("Re: [Xen-devel] [PATCH] add LSB header to xen-watchdog runlevel script"):
> > > 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"):
> At 17:45 +0100 on 23 Jul (1279907152), Ian Jackson wrote:
> > 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.

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH] add LSB header to xen-watchdog runlevel script [and 1 more messages]
  2010-07-26 10:08     ` [PATCH] add LSB header to xen-watchdog runlevel script [and 1 more messages] Ian Jackson
@ 2010-07-26 10:16       ` Ian Campbell
  2010-07-26 10:22         ` Ian Jackson
  0 siblings, 1 reply; 12+ messages in thread
From: Ian Campbell @ 2010-07-26 10:16 UTC (permalink / raw)
  To: Ian Jackson; +Cc: Tim Deegan, Olaf Hering, xen-devel

On Mon, 2010-07-26 at 11:08 +0100, Ian Jackson wrote:
> Olaf Hering writes ("Re: [Xen-devel] [PATCH] add LSB header to xen-watchdog runlevel script"):
> > On Fri, Jul 23, Ian Jackson wrote:
> > > Olaf Hering writes ("Re: [Xen-devel] [PATCH] add LSB header to xen-watchdog runlevel script"):
> > > > 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.

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

Ian.

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH] add LSB header to xen-watchdog runlevel script [and 1 more messages]
  2010-07-26 10:16       ` Ian Campbell
@ 2010-07-26 10:22         ` Ian Jackson
  2010-07-26 10:33           ` Ian Campbell
  2010-07-26 11:05           ` Olaf Hering
  0 siblings, 2 replies; 12+ messages in thread
From: Ian Jackson @ 2010-07-26 10:22 UTC (permalink / raw)
  To: Ian Campbell; +Cc: Tim Deegan, Olaf Hering, xen-devel@lists.xensource.com

Ian Campbell writes ("Re: [Xen-devel] [PATCH] add LSB header to xen-watchdog runlevel script [and 1 more messages]"):
> On Mon, 2010-07-26 at 11:08 +0100, Ian Jackson wrote:
> > 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.

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH] add LSB header to xen-watchdog runlevel script [and 1 more messages]
  2010-07-26 10:22         ` Ian Jackson
@ 2010-07-26 10:33           ` Ian Campbell
  2010-07-26 10:53             ` Ian Jackson
  2010-07-26 11:05           ` Olaf Hering
  1 sibling, 1 reply; 12+ messages in thread
From: Ian Campbell @ 2010-07-26 10:33 UTC (permalink / raw)
  To: Ian Jackson; +Cc: Tim Deegan, Olaf Hering, xen-devel

On Mon, 2010-07-26 at 11:22 +0100, Ian Jackson wrote:
> Ian Campbell writes ("Re: [Xen-devel] [PATCH] add LSB header to xen-watchdog runlevel script [and 1 more messages]"):
> > On Mon, 2010-07-26 at 11:08 +0100, Ian Jackson wrote:
> > > 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.

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH] add LSB header to xen-watchdog runlevel script [and 1 more messages]
  2010-07-26 10:33           ` Ian Campbell
@ 2010-07-26 10:53             ` Ian Jackson
  0 siblings, 0 replies; 12+ messages in thread
From: Ian Jackson @ 2010-07-26 10:53 UTC (permalink / raw)
  To: Ian Campbell; +Cc: Tim Deegan, Olaf Hering, xen-devel@lists.xensource.com

Ian Campbell writes ("Re: [Xen-devel] [PATCH] add LSB header to xen-watchdog runlevel script [and 1 more messages]"):
> On Mon, 2010-07-26 at 11:22 +0100, Ian Jackson wrote:
> > 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

> 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.

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH] add LSB header to xen-watchdog runlevel script [and 1 more messages]
  2010-07-26 10:22         ` Ian Jackson
  2010-07-26 10:33           ` Ian Campbell
@ 2010-07-26 11:05           ` Olaf Hering
  1 sibling, 0 replies; 12+ messages in thread
From: Olaf Hering @ 2010-07-26 11:05 UTC (permalink / raw)
  To: Ian Jackson; +Cc: Ian Campbell, Tim Deegan, xen-devel@lists.xensource.com

On Mon, Jul 26, Ian Jackson wrote:

> Ian Campbell writes ("Re: [Xen-devel] [PATCH] add LSB header to xen-watchdog runlevel script [and 1 more messages]"):
> > On Mon, 2010-07-26 at 11:08 +0100, Ian Jackson wrote:
> > > 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

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2010-07-26 11:05 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-07-23 12:13 [PATCH] add LSB header to xen-watchdog runlevel script Olaf Hering
2010-07-23 16:45 ` Ian Jackson
2010-07-23 17:36   ` Olaf Hering
2010-07-23 18:04     ` Ian Jackson
2010-07-23 18:43       ` Olaf Hering
2010-07-26  9:23   ` Tim Deegan
2010-07-26 10:08     ` [PATCH] add LSB header to xen-watchdog runlevel script [and 1 more messages] Ian Jackson
2010-07-26 10:16       ` Ian Campbell
2010-07-26 10:22         ` Ian Jackson
2010-07-26 10:33           ` Ian Campbell
2010-07-26 10:53             ` Ian Jackson
2010-07-26 11:05           ` Olaf Hering

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.