Project

General

Profile

Bug #1850

startscript /etc/init.d/xendomains ignores XENDOMAINS_CREATE_USLEEP defined in /etc/default/xendomains

Added by Dieter Bloms about 6 years ago. Updated about 6 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Boot sequence
Target version:
Start date:
05/08/2013
Due date:
% Done:

100%

Estimated time:
Affected versions:
Security IDs:

Description

Hi,

in the configfile /etc/default/xendomains is a parameter XENDOMAINS_CREATE_USLEEP=5000000.
For me it looks like this parameter is ignored by the start script and the domains are started without
waiting this defined time after each domain start.
If attached a little patch which fixes this problem for me.
Maybe you will accept and include it for the final release.

xendomains.diff (227 Bytes) xendomains.diff my little patch which add a usleep to each start of a domU Dieter Bloms, 05/08/2013 09:11 PM

Associated revisions

Revision ef80eb1f (diff)
Added by Natanael Copa about 6 years ago

main/xen: sleep a bit when starting up xen domains

fixes #1850

Revision 939441c1 (diff)
Added by Natanael Copa about 6 years ago

main/xen: sleep a bit when starting up xen domains

fixes #1850
(cherry picked from commit ef80eb1f042d2bfe8d0588e6d248b42cb1b33552)

History

#1 Updated by Natanael Copa about 6 years ago

Dieter Bloms wrote:

Hi,

in the configfile /etc/default/xendomains is a parameter XENDOMAINS_CREATE_USLEEP=5000000.
For me it looks like this parameter is ignored by the start script and the domains are started without
waiting this defined time after each domain start.

The /etc/defaults/xendomains is completely ignored. We use /etc/conf.d/xendomains.

If attached a little patch which fixes this problem for me.
Maybe you will accept and include it for the final release.

The diff looks good to me.

#2 Updated by Natanael Copa about 6 years ago

With that diff, it will sleep even if there is only a single domain. I suggest this instead:

diff --git a/main/xen/xendomains.initd b/main/xen/xendomains.initd
index ff6fcdb..794a786 100644
--- a/main/xen/xendomains.initd
+++ b/main/xen/xendomains.initd
@@ -68,9 +68,15 @@ start() {
                fi
        fi
        # Create all domains with config files in AUTODIR.
+       want_usleep=
        for dom in $(ls "${AUTODIR:=/etc/xen/auto}/"* 2>/dev/null | sort); do
                name=$(get_domname ${dom})
                if ! is_running ${name} ; then
+                       if [ -n "$want_usleep" ]; then
+                               usleep ${XENDOMAINS_CREATE_USLEEP:=5000000}
+                       else
+                               want_usleep=1
+                       fi
                        ebegin "  Starting domain ${name}" 
                        if using_screen ; then
                                ${screen_cmd} screen -t ${name} xl create ${dom}

Could you please test it?
Thanks!

#3 Updated by Natanael Copa about 6 years ago

  • Status changed from New to Resolved
  • % Done changed from 0 to 100

#4 Updated by Natanael Copa about 6 years ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF