Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 475204 - enhancement: remove major slow-down in starting xenstored
Summary: enhancement: remove major slow-down in starting xenstored
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Ian Delaney (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-06-29 12:26 UTC by Another Mortal
Modified: 2013-07-30 14:42 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Another Mortal 2013-06-29 12:26:11 UTC
There's an unconditional *15* second sleep in /etc/init.d/xenstored
slowing down the boot process for no good reason.  The attached patch
replaces this with a periodic check/sleep cycle.  On the handful of
systems I tested this on xenstored was available after only a few
seconds (nowhere near 15).  Please consider a more flexible approach!

Reproducible: Always




--- /usr/portage/app-emulation/xen-tools/files/xenstored.initd  2013-05-15 11:01:03.000000000 +0200
+++ /etc/init.d/xenstored       2013-06-29 14:19:24.842794505 +0200
@@ -14,7 +14,11 @@
                --pidfile /var/run/xenstored.pid \
                -- --pid-file=/var/run/xenstored.pid \
                $XENSTORED_OPTS
-       sleep 15
+       until xenstore-exists /
+       do
+               echo -n .
+               sleep .5
+       done
        einfo "Setting domain0 name record"
        /usr/bin/xenstore-write "/local/domain/0/name" "Domain-0"
        eend $*
Comment 1 Ian Delaney (RETIRED) gentoo-dev 2013-06-29 16:20:05 UTC
nice to 'hear' from you again a.m  I'll look over it later today,
Comment 2 Ian Delaney (RETIRED) gentoo-dev 2013-07-01 05:43:26 UTC
  01 Jul 2013; Ian Delaney <idella4@gentoo.org> files/xenstored.initd,
  xen-tools-4.2.1-r3.ebuild, xen-tools-4.2.1-r4.ebuild,
  xen-tools-4.2.2-r1.ebuild:
  remove major slow-down in starting xenstored, put forward by 'a.m.' in Bug
  #475204

I'll make it a test request for now and allow for comments saying 'good here'
Comment 3 Andreas Kinzler 2013-07-01 11:05:56 UTC
CVS still contains the "sleep 15"
Comment 4 Ian Delaney (RETIRED) gentoo-dev 2013-07-04 09:43:07 UTC
og. Not any more
Comment 5 Another Mortal 2013-07-23 08:49:40 UTC
The fix in portage has 'sleep 5' instead of 'sleep .5'; this is still _way_ too long.  On my systems (with .5) I get _3_ dots max, which is still less than 2 seconds.  Why force a 5 second sleep?  Is this really needed?

If the portability of sleeping fractional seconds is at issue, could 'sleep 1' be a good compromise?
Comment 6 Ian Delaney (RETIRED) gentoo-dev 2013-07-23 13:30:08 UTC
See Bug 476572 and comment
Comment 7 Ian Delaney (RETIRED) gentoo-dev 2013-07-30 14:42:16 UTC
This can go fixed