Skip to contentSkip to conversation

Patch and question about init.d

DISCUSSION Fantu 6 participants 11 messages May 24, 2011 – May 26, 2011

lore
Share & tools
lore

Fantu

author
#0 lore raw

I made a patch based on staging/xen-unstable.hg, I hope it is correct, i add in post below, add runlevel 2 to default-start on init where missed. I have also some question:
xen-watchdog works only with xend and need it or not? if not xend must be moved from required to should if I'm not mistaken
(http://refspecs.freestandards.org/LSB_3.2.0/LSB-Core-generic/LSB-Core-generic/initscrcomconv.html).
Same question also about xendomain, is possible execute also with xl only? if yes xend must be moved from required to should and xenstored add to required.
If xendomains now is not working with xl only should be done, xendomains do some essentials functions (for example autostart of domU or restore if exists savefile)
If you give me your answer do I patch and post it here, patch must be all based on staging/xen-unstable and backports to staging/xen-4.1-testing.hg and staging/xen-4.0-testing.hg if necessary, right?

--
View this message in context: http://xen.1045712.n5.nabble.com/Patch-and-question-about-init-d-tp4421670p4421670.html
Sent from the Xen - Dev mailing list archive at Nabble.com.

author
#1 lore raw

# HG changeset patch
# User Fabio Fantoni
# Date 1306230538 -7200
# Branch fabio
# Node ID 79341a653633ffde213dfa7d071b677d419707bb # Parent d74585e5dc9f33f6d840718c5afa8fe002107fc7 tools/hotplug/Linux: start all xen daemons in runlevel 2

tools/hotplug/Linux/init.d/xen-watchdog +2 -2
diff -r d74585e5dc9f -r 79341a653633 tools/hotplug/Linux/init.d/xen-watchdog
@@ -10,8 +10,8 @@
 # Should-Start:      $syslog $remote_fs
 # Required-Stop:     xend
 # Should-Stop:       $syslog $remote_fs
-# Default-Start:     3 4 5
-# Default-Stop:      0 1 2 6
+# Default-Start:     2 3 4 5
+# Default-Stop:      0 1 6
 # Short-Description: Start/stop xen-watchdog
 # Description:       Run domain watchdog daemon.
 ### END INIT INFO
tools/hotplug/Linux/init.d/xend +2 -2
diff -r d74585e5dc9f -r 79341a653633 tools/hotplug/Linux/init.d/xend
@@ -12,8 +12,8 @@
 # Should-Start:
 # Required-Stop:     $syslog $remote_fs xenstored
 # Should-Stop:
-# Default-Start:     3 4 5
-# Default-Stop:      0 1 2 6
+# Default-Start:     2 3 4 5
+# Default-Stop:      0 1 6
 # Short-Description: Start/stop xend
 # Description:       Starts and stops the Xen control daemon.
 ### END INIT INFO
tools/hotplug/Linux/init.d/xendomains +2 -2
diff -r d74585e5dc9f -r 79341a653633 tools/hotplug/Linux/init.d/xendomains
@@ -20,8 +20,8 @@
 # Should-Start:
 # Required-Stop:     $syslog $remote_fs xend
 # Should-Stop:
-# Default-Start:     3 4 5
-# Default-Stop:      0 1 2 6
+# Default-Start:     2 3 4 5
+# Default-Stop:      0 1 6
 # Short-Description: Start/stop secondary xen domains
 # Description:       Start / stop domains automatically when domain 0 
 #                    boots / shuts down.

--
View this message in context: http://xen.1045712.n5.nabble.com/Patch-and-question-about-init-d-tp4421670p4421675.html
Sent from the Xen - Dev mailing list archive at Nabble.com.

#2 lore raw

Fantu writes ("[Xen-devel] Re: Patch and question about init.d"):

Quoted 1 line

tools/hotplug/Linux: start all xen daemons in runlevel 2

I'm tempted to apply this but I'd like to solicit opinions.

Ian.

Acked-by
#3 lore raw
Quoted 4 lines · Ian Jackson

Fantu writes ("[Xen-devel] Re: Patch and question about init.d"):

Quoted 1 line

tools/hotplug/Linux: start all xen daemons in runlevel 2

I'm tempted to apply this but I'd like to solicit opinions.

Since I added the runlevel 2 to the xencommons initscript I feel qualified to give one...

IMHO it makes sense to start all the services we provide in the same set of runlevels, whatever those might be, by default.

Further, I think having everything started in run-levels 2, 3, 4 and 5 by default is the correct default so this change is the correct one.

Ian.

author
#4 lore raw

About xendomains and xenwatchdog, probably I didn't wrote the right questions, I try to write them better.
Xenwatchdog works also with xl only or requires also xend? Xendomains works also with xl only or requires also xend? Since xendomains has essential functions I think that it should also work in xl only According to your replies I'll post the patch with the modified lsb headers Thanks for any reply

--
View this message in context: http://xen.1045712.n5.nabble.com/Patch-and-question-about-init-d-tp4421670p4424792.html
Sent from the Xen - Dev mailing list archive at Nabble.com.

#5 lore raw
Quoted 3 lines · Fantu

About xendomains and xenwatchdog, probably I didn't wrote the right questions, I try to write them better.
Xenwatchdog works also with xl only or requires also xend?

I don't see anything which requires one or the other, it appears to be completely toolstack independent. Best evidence would be to try it though.

Quoted 1 line

Xendomains works also with xl only or requires also xend?

It is supposed to work with both but evidently the xl support is buggy. Please see Carsten Schiers' recent posts to this list.

Ian.

Quoted 13 lines

Since xendomains
has essential functions I think that it should also work in xl only According to your replies I'll post the patch with the modified lsb headers Thanks for any reply

--
View this message in context: http://xen.1045712.n5.nabble.com/Patch-and-question-about-init-d-tp4421670p4424792.html
Sent from the Xen - Dev mailing list archive at Nabble.com.

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel

#8 lore raw
In reply to Ian Campbell
Quoted 2 lines · Ian Campbell

Further, I think having everything started in run-levels 2, 3, 4 and 5 by default is the correct default so this change is the correct one.

Runlevel 4 is for the local sysadmin, it should not be part of the listed runlevels. Maybe that part can be changed as well when the code is touched now.

Olaf

#9 lore raw
Quoted 7 lines · Olaf Hering
Quoted 2 lines · Ian Campbell

Further, I think having everything started in run-levels 2, 3, 4 and 5 by default is the correct default so this change is the correct one.

Runlevel 4 is for the local sysadmin, it should not be part of the listed runlevels.

Any meaning attached to a specific runlevels between 2-5 is distro specific. 0, 1, and 6 have reasonably consistent meanings across distros (perhaps something somewhere specifies this?).

Under Debian for example all run-levels 2-5 are deemed to be the same with any differences being up to the admin.

I don't think we can easily resolve this disparity in the initscripts shipped with Xen so I think the choices boil down to either all runlevels or none, and I think all is the least surprising / most useful.

Ian.

Quoted 5 lines

Maybe that part can be changed as well when the code
is touched now.

Olaf

#6 lore raw
In reply to Ian Campbell
Quoted 8 lines · Ian Campbell
Quoted 3 lines · Fantu

About xendomains and xenwatchdog, probably I didn't wrote the right questions, I try to write them better.
Xenwatchdog works also with xl only or requires also xend?

I don't see anything which requires one or the other, it appears to be completely toolstack independent. Best evidence would be to try it though.

Do we actually need xenwatchdog anymore? Jan's Xen Watchdog driver uses the watchdog API, so if one uses the 'watchdog' service it should start automatically?

#7 lore raw
Quoted 6 lines · Konrad Rzeszutek Wilk
Quoted 5 lines · Ian Campbell
Quoted 3 lines · Fantu

About xendomains and xenwatchdog, probably I didn't wrote the right questions, I try to write them better.
Xenwatchdog works also with xl only or requires also xend?

Quoted 7 lines
Quoted 3 lines

I don't see anything which requires one or the other, it appears to be completely toolstack independent. Best evidence would be to try it though.

Do we actually need xenwatchdog anymore? Jan's Xen Watchdog driver uses the watchdog API, so if one uses the 'watchdog' service it should start automatically?

People on older or non-Linux kernels still need xenwatchdogd, but for modern Linux kernels we should probably recommend using the standard watchdog tools via Jan's driver. Do any other guest OSes have a proper watchdog driver?

Ian.

#10 lore raw
In reply to Ian Campbell

Ian Campbell writes ("Re: [Xen-devel] Re: Patch and question about init.d"):

Quoted 11 lines

Any meaning attached to a specific runlevels between 2-5 is distro specific. 0, 1, and 6 have reasonably consistent meanings across distros (perhaps something somewhere specifies this?).

Under Debian for example all run-levels 2-5 are deemed to be the same with any differences being up to the admin.

I don't think we can easily resolve this disparity in the initscripts shipped with Xen so I think the choices boil down to either all runlevels or none, and I think all is the least surprising / most useful.

I agree with Ian. I have committed the original version of the patch. Thanks.

Ian.