Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 248797 - xen-tools: xendomains init script forcedfully shuts down domUs with PARALLEL_SHUTDOWN=yes
Summary: xen-tools: xendomains init script forcedfully shuts down domUs with PARALLEL_...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High critical
Assignee: Gentoo Xen Devs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-11-25 17:06 UTC by Wolfram Schlich (RETIRED)
Modified: 2009-09-01 09:58 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 Wolfram Schlich (RETIRED) gentoo-dev 2008-11-25 17:06:53 UTC
When using /etc/init.d/xendomains with PARALLEL_SHUTDOWN=yes from
/etc/conf.d/xendomains, it signals all running domUs that were
started from AUTODIR to shutdown by running "xm shutdown DOMAIN".
After that, it cycles through the list of those domains and
runs "xm shutdown -w DOMAIN" which should return after each
corresponding domain has really shut down (-w == wait).
Unfortunately, the domUs are forcedfully terminated when that
command is run, so they don't shut down cleanly (filesystem
issues etc.).
Comment 1 Wolfram Schlich (RETIRED) gentoo-dev 2008-11-26 13:28:37 UTC
used xen versions:

app-emulation/xen-3.2.1
app-emulation/xen-tools-3.2.1
sys-kernel/xen-sources-2.6.18-r12
Comment 2 Zoltán Halassy 2009-01-07 13:32:39 UTC
Found the same problem. The thing is, if you call "xm shutdown" and after that "xm shutdown --wait" (before the domU would complete RL0) the second one TERMINATES the domU, rather to wait till it halts properly.

The script could be modified easily, start shutdown --wait processes parallel, then wait all process to terminate, like:

        if [[ "$PARALLEL_SHUTDOWN" = "yes" ]] ; then
                ebegin "  Asking ALL domains to shutdown..."
                for dom in $DOMAINS ; do
                        name=$(get_domname ${dom})
                        if is_running ${name} ; then
                            xm shutdown --wait ${name} >/dev/null &
                        fi
                done
                wait
                eend $?
        elif
            for dom in $DOMAINS ; do
                name=$(get_domname ${dom})
                if is_running ${name} ; then
                        ebegin "  Waiting for domain ${name} to shutdown"
                                xm shutdown --wait ${name} >/dev/null
                        eend $?
                else
                        einfo "  Not stopping domain ${name} - not running"
                fi
            done
        fi
Comment 3 Zoltán Halassy 2009-01-07 13:35:41 UTC
sorry, made a mistake, write "else" instead of "elif"
Comment 4 Wolfram Schlich (RETIRED) gentoo-dev 2009-01-26 13:49:09 UTC
ping
Comment 5 Wolfram Schlich (RETIRED) gentoo-dev 2009-01-28 10:45:37 UTC
Zoltán, please test the 3.2.3 ebuilds I just committed to my testing overlay:
http://overlays.gentoo.org/dev/wschlich/browser/testing/app-emulation
(use "layman -a wschlich-testing"). They contain the fix(es). Reports
are very welcome :)
Comment 6 Patrick Lauer gentoo-dev 2009-06-27 07:30:45 UTC
(In reply to comment #5)
> Zoltán, please test the 3.2.3 ebuilds I just committed to my testing overlay:
> http://overlays.gentoo.org/dev/wschlich/browser/testing/app-emulation
> (use "layman -a wschlich-testing"). They contain the fix(es). Reports
> are very welcome :)
> 
Wolfram:
Please fix in tree if that works for you. I don't have a xen setup I can test that on at the moment ...
Comment 7 Wolfram Schlich (RETIRED) gentoo-dev 2009-09-01 09:58:55 UTC
In portage (3.4.1-r1).