|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] xl / xend feature parity: Missing '-a' option for xl 'shutdown' to shutdown all domains
On Fri, 2012-08-31 at 12:32 +0100, Sander Eikelenboom wrote:
> Friday, August 31, 2012, 12:55:06 PM, you wrote:
>
> > On Fri, 2012-08-31 at 11:49 +0100, Sander Eikelenboom wrote:
> >> Hi All,
> >>
> >> Is there any reason why xl doesn't support the '-a' option for
> >> shutdown, to shutdown all domains ?
>
> > I'd never heard of it for one thing ;-)
>
> > It should be a reasonably easy patch -- I can give some pointers if you
> > are interested.
>
> > Ian.
>
> Could give it a try, although my C skills are virtually non existent :-)
> So every pointer could be handy !
[...]
> - Implement the '-a' option
In the case where -a is given you want to call libxl_list_domain, then
loop over the list and finally call libxl_dominfo_list_free.
main_list() might be a handy reference although its semantics are subtly
different (it effective assumes -a if you don't give a domain, which you
don't want for shutdown!)
vcpulist() might also be a handy reference.
> - Update docs that '-a' is supported
This should be the easiest bit ;-)
You also want to update xl_cmdtable.c to include the new option in xl
help etc.
> - Find out what "--halt" / "-H" did .. and perhaps implement that as well
tools/python/xen/xm/shutdown.py says
gopts.opt('halt', short='H',
fn=set_true, default=0,
use='Shutdown without reboot.')
which I guess means shutdown on xm can behave like xm reboot. Later on
it does:
if opts.vals.halt:
return 'halt'
elif opts.vals.reboot:
return 'reboot'
else:
return 'poweroff'
i.e.
xm shutdown -H -> "halt"
xm shutdown -R -> "reboot"
xm shutdown -> "poweroff"
Linux in a guest treats "halt" and "poweroff" identically.
So I think --halt/-H is pointless and you can remove it from the
defaults.
> - Change /etc/default to use the short option format, so it will work
> for both xm and xl
In principal it is possible for xl to support long options too (see e.g.
main_create, but changing the default would be OK for 4.2 IMHO.
Thanks for looking into this.
Ian.
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |