Hi, attached patch supports cpupool specification for xl create. Juergen -- Juergen Gross Principal Developer Operating Systems TSP ES&S SWE OS6 Telephone: +49 (0) 89 3222 2967 Fujitsu Technology Solutions e-mail: juergen.gross@ts.fujitsu.com Domagkstr. 28 Internet: ts.fujitsu.com D-80807 Muenchen Company details: ts.fujitsu.com/imprint.html _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Jeremy Fitzhardinge
2010-May-07 21:57 UTC
Re: [Xen-devel] [Patch] support cpupool for xl create
On 05/07/2010 01:14 AM, Juergen Gross wrote:> Hi, > > attached patch supports cpupool specification for xl create.This crashes for me: (gdb) run create /etc/xen/f13pv64 Starting program: /usr/sbin/xl create /etc/xen/f13pv64 [Thread debugging using libthread_db enabled] Parsing config file /etc/xen/f13pv64 Program received signal SIGSEGV, Segmentation fault. 0x00007ffff79cd805 in libxl_domain_make (ctx=0x60f8a0, info=0x7fffffffe0b0, domid=0x60f890) at libxl.c:172 172 xs_write(ctx->xsh, t, libxl_sprintf(ctx, "%s/pool_name", vm_path), info->poolname, strlen(info->poolname)); (gdb) p info->poolname $2 = 0x0 Adding diff -r bbf009817ffb tools/libxl/libxl.c --- a/tools/libxl/libxl.c Fri May 07 19:22:28 2010 +0100 +++ b/tools/libxl/libxl.c Fri May 07 14:57:00 2010 -0700 @@ -169,7 +169,8 @@ xs_write(ctx->xsh, t, libxl_sprintf(ctx, "%s/uuid", vm_path), uuid_string, strlen(uuid_string)); xs_write(ctx->xsh, t, libxl_sprintf(ctx, "%s/name", vm_path), info->name, strlen(info->name)); - xs_write(ctx->xsh, t, libxl_sprintf(ctx, "%s/pool_name", vm_path), info->poolname, strlen(info->poolname)); + if (info->poolname) + xs_write(ctx->xsh, t, libxl_sprintf(ctx, "%s/pool_name", vm_path), info->poolname, strlen(info->poolname)); libxl_xs_writev(ctx, t, dom_path, info->xsdata); libxl_xs_writev(ctx, t, libxl_sprintf(ctx, "%s/platform", dom_path), info->platformdata); fixes it for me. J _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
On 05/07/2010 11:57 PM, Jeremy Fitzhardinge wrote:> On 05/07/2010 01:14 AM, Juergen Gross wrote: >> Hi, >> >> attached patch supports cpupool specification for xl create. > > This crashes for me: > > (gdb) run create /etc/xen/f13pv64 > Starting program: /usr/sbin/xl create /etc/xen/f13pv64 > [Thread debugging using libthread_db enabled] > Parsing config file /etc/xen/f13pv64 > > Program received signal SIGSEGV, Segmentation fault. > 0x00007ffff79cd805 in libxl_domain_make (ctx=0x60f8a0, info=0x7fffffffe0b0, > domid=0x60f890) at libxl.c:172 > 172 xs_write(ctx->xsh, t, libxl_sprintf(ctx, "%s/pool_name", vm_path), info->poolname, strlen(info->poolname)); > (gdb) p info->poolname > $2 = 0x0 > > Adding > > diff -r bbf009817ffb tools/libxl/libxl.c > --- a/tools/libxl/libxl.c Fri May 07 19:22:28 2010 +0100 > +++ b/tools/libxl/libxl.c Fri May 07 14:57:00 2010 -0700 > @@ -169,7 +169,8 @@ > > xs_write(ctx->xsh, t, libxl_sprintf(ctx, "%s/uuid", vm_path), uuid_string, strlen(uuid_string)); > xs_write(ctx->xsh, t, libxl_sprintf(ctx, "%s/name", vm_path), info->name, strlen(info->name)); > - xs_write(ctx->xsh, t, libxl_sprintf(ctx, "%s/pool_name", vm_path), info->poolname, strlen(info->poolname)); > + if (info->poolname) > + xs_write(ctx->xsh, t, libxl_sprintf(ctx, "%s/pool_name", vm_path), info->poolname, strlen(info->poolname)); > > libxl_xs_writev(ctx, t, dom_path, info->xsdata); > libxl_xs_writev(ctx, t, libxl_sprintf(ctx, "%s/platform", dom_path), info->platformdata); > > fixes it for me.You seem to have specified a not existing cpupool. The solution should not be to ignore this, but to do a proper test on the pool parameter. Attached patch does this. Juergen -- Juergen Gross Principal Developer Operating Systems TSP ES&S SWE OS6 Telephone: +49 (0) 89 3222 2967 Fujitsu Technology Solutions e-mail: juergen.gross@ts.fujitsu.com Domagkstr. 28 Internet: ts.fujitsu.com D-80807 Muenchen Company details: ts.fujitsu.com/imprint.html _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Jeremy Fitzhardinge
2010-May-10 06:42 UTC
Re: [Xen-devel] [Patch] support cpupool for xl create
On 05/09/2010 11:05 PM, Juergen Gross wrote:>> diff -r bbf009817ffb tools/libxl/libxl.c >> --- a/tools/libxl/libxl.c Fri May 07 19:22:28 2010 +0100 >> +++ b/tools/libxl/libxl.c Fri May 07 14:57:00 2010 -0700 >> @@ -169,7 +169,8 @@ >> >> xs_write(ctx->xsh, t, libxl_sprintf(ctx, "%s/uuid", vm_path), >> uuid_string, strlen(uuid_string)); >> xs_write(ctx->xsh, t, libxl_sprintf(ctx, "%s/name", vm_path), >> info->name, strlen(info->name)); >> - xs_write(ctx->xsh, t, libxl_sprintf(ctx, "%s/pool_name", >> vm_path), info->poolname, strlen(info->poolname)); >> + if (info->poolname) >> + xs_write(ctx->xsh, t, libxl_sprintf(ctx, "%s/pool_name", >> vm_path), info->poolname, strlen(info->poolname)); >> >> libxl_xs_writev(ctx, t, dom_path, info->xsdata); >> libxl_xs_writev(ctx, t, libxl_sprintf(ctx, "%s/platform", >> dom_path), info->platformdata); >> >> fixes it for me. > > > You seem to have specified a not existing cpupool. > The solution should not be to ignore this, but to do a proper test on the > pool parameter. > Attached patch does this.I''m not using cpupools. My config makes no mention of "pool" at all. J _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
On 05/10/2010 08:42 AM, Jeremy Fitzhardinge wrote:> On 05/09/2010 11:05 PM, Juergen Gross wrote: >>> diff -r bbf009817ffb tools/libxl/libxl.c >>> --- a/tools/libxl/libxl.c Fri May 07 19:22:28 2010 +0100 >>> +++ b/tools/libxl/libxl.c Fri May 07 14:57:00 2010 -0700 >>> @@ -169,7 +169,8 @@ >>> >>> xs_write(ctx->xsh, t, libxl_sprintf(ctx, "%s/uuid", vm_path), >>> uuid_string, strlen(uuid_string)); >>> xs_write(ctx->xsh, t, libxl_sprintf(ctx, "%s/name", vm_path), >>> info->name, strlen(info->name)); >>> - xs_write(ctx->xsh, t, libxl_sprintf(ctx, "%s/pool_name", >>> vm_path), info->poolname, strlen(info->poolname)); >>> + if (info->poolname) >>> + xs_write(ctx->xsh, t, libxl_sprintf(ctx, "%s/pool_name", >>> vm_path), info->poolname, strlen(info->poolname)); >>> >>> libxl_xs_writev(ctx, t, dom_path, info->xsdata); >>> libxl_xs_writev(ctx, t, libxl_sprintf(ctx, "%s/platform", >>> dom_path), info->platformdata); >>> >>> fixes it for me. >> >> >> You seem to have specified a not existing cpupool. >> The solution should not be to ignore this, but to do a proper test on the >> pool parameter. >> Attached patch does this. > > I''m not using cpupools. My config makes no mention of "pool" at all.Strange. I tested this case and it worked for me. Are you sure you have all actual patches installed? Could you try "xl create -d" and look for the cpupool settings? Juergen -- Juergen Gross Principal Developer Operating Systems TSP ES&S SWE OS6 Telephone: +49 (0) 89 3222 2967 Fujitsu Technology Solutions e-mail: juergen.gross@ts.fujitsu.com Domagkstr. 28 Internet: ts.fujitsu.com D-80807 Muenchen Company details: ts.fujitsu.com/imprint.html _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Jeremy Fitzhardinge
2010-May-10 20:07 UTC
Re: [Xen-devel] [Patch] support cpupool for xl create
On 05/09/2010 11:58 PM, Juergen Gross wrote:> On 05/10/2010 08:42 AM, Jeremy Fitzhardinge wrote: >> On 05/09/2010 11:05 PM, Juergen Gross wrote: >>>> diff -r bbf009817ffb tools/libxl/libxl.c >>>> --- a/tools/libxl/libxl.c Fri May 07 19:22:28 2010 +0100 >>>> +++ b/tools/libxl/libxl.c Fri May 07 14:57:00 2010 -0700 >>>> @@ -169,7 +169,8 @@ >>>> >>>> xs_write(ctx->xsh, t, libxl_sprintf(ctx, "%s/uuid", vm_path), >>>> uuid_string, strlen(uuid_string)); >>>> xs_write(ctx->xsh, t, libxl_sprintf(ctx, "%s/name", vm_path), >>>> info->name, strlen(info->name)); >>>> - xs_write(ctx->xsh, t, libxl_sprintf(ctx, "%s/pool_name", >>>> vm_path), info->poolname, strlen(info->poolname)); >>>> + if (info->poolname) >>>> + xs_write(ctx->xsh, t, libxl_sprintf(ctx, "%s/pool_name", >>>> vm_path), info->poolname, strlen(info->poolname)); >>>> >>>> libxl_xs_writev(ctx, t, dom_path, info->xsdata); >>>> libxl_xs_writev(ctx, t, libxl_sprintf(ctx, "%s/platform", >>>> dom_path), info->platformdata); >>>> >>>> fixes it for me. >>> >>> >>> You seem to have specified a not existing cpupool. >>> The solution should not be to ignore this, but to do a proper test >>> on the >>> pool parameter. >>> Attached patch does this. >> >> I''m not using cpupools. My config makes no mention of "pool" at all. > > Strange. > I tested this case and it worked for me.Perhaps one thing that you''re not testing: I''m using oxenstored, and I''m xl without ever having started xend, so xenstore starts out completely empty. I don''t know if that makes a difference.> Are you sure you have all actual patches installed?Yes. I''m seeing this with version bbf009817ffb.> Could you try "xl create -d" and look for the cpupool settings?sh-4.0# xl create -dc /etc/xen/f13pv64 Parsing config file /etc/xen/f13pv64 *** domain_create_info *** hvm: 0 hap: 0 oos: 1 ssidref: 0 name: f13pv64 uuid: 31878242-49a2-8dce-589c-0ec5a1f297a6 cpupool: (null) (0) xsdata: (null) platformdata: (null) *** domain_build_info *** timer_mode: -1 hpet: 1 vpt_align: -1 max_vcpus: 1 tsc_mode: 0 max_memkb: 524288 target_memkb: 524288 kernel: /usr/lib/xen/boot/pv-grub-x86_64.gz hvm: 0 cmdline: (null) ramdisk: (null) *** disks_info: 0 *** backend_domid 0 domid 0 physpath /dev/vg_lilith-raid/xen-f13-64 phystype 4 virtpath xvda unpluggable 1 readwrite 1 is_cdrom 0 *** vfbs_info: 0 *** backend_domid 0 domid 0 devid 0 vnc: 1 vnclisten: 0.0.0.0 vncdisplay: 0 vncunused: 1 keymap: (null) sdl: 0 opengl: 0 display: (null) xauthority: (null) Segmentation fault J _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
On 05/10/2010 10:07 PM, Jeremy Fitzhardinge wrote:> On 05/09/2010 11:58 PM, Juergen Gross wrote: >> On 05/10/2010 08:42 AM, Jeremy Fitzhardinge wrote: >>> On 05/09/2010 11:05 PM, Juergen Gross wrote: >>>>> diff -r bbf009817ffb tools/libxl/libxl.c >>>>> --- a/tools/libxl/libxl.c Fri May 07 19:22:28 2010 +0100 >>>>> +++ b/tools/libxl/libxl.c Fri May 07 14:57:00 2010 -0700 >>>>> @@ -169,7 +169,8 @@ >>>>> >>>>> xs_write(ctx->xsh, t, libxl_sprintf(ctx, "%s/uuid", vm_path), >>>>> uuid_string, strlen(uuid_string)); >>>>> xs_write(ctx->xsh, t, libxl_sprintf(ctx, "%s/name", vm_path), >>>>> info->name, strlen(info->name)); >>>>> - xs_write(ctx->xsh, t, libxl_sprintf(ctx, "%s/pool_name", >>>>> vm_path), info->poolname, strlen(info->poolname)); >>>>> + if (info->poolname) >>>>> + xs_write(ctx->xsh, t, libxl_sprintf(ctx, "%s/pool_name", >>>>> vm_path), info->poolname, strlen(info->poolname)); >>>>> >>>>> libxl_xs_writev(ctx, t, dom_path, info->xsdata); >>>>> libxl_xs_writev(ctx, t, libxl_sprintf(ctx, "%s/platform", >>>>> dom_path), info->platformdata); >>>>> >>>>> fixes it for me. >>>> >>>> >>>> You seem to have specified a not existing cpupool. >>>> The solution should not be to ignore this, but to do a proper test >>>> on the >>>> pool parameter. >>>> Attached patch does this. >>> >>> I''m not using cpupools. My config makes no mention of "pool" at all. >> >> Strange. >> I tested this case and it worked for me. > > Perhaps one thing that you''re not testing: I''m using oxenstored, and I''m > xl without ever having started xend, so xenstore starts out completely > empty. I don''t know if that makes a difference.It does :-) Without proper xenstore entries it is impossible to get a cpupool name from it''s id. Id 0 is hard wired to "Pool-0", so this case can be handled even without xenstore. I modified the patch accordingly. Juergen -- Juergen Gross Principal Developer Operating Systems TSP ES&S SWE OS6 Telephone: +49 (0) 89 3222 2967 Fujitsu Technology Solutions e-mail: juergen.gross@ts.fujitsu.com Domagkstr. 28 Internet: ts.fujitsu.com D-80807 Muenchen Company details: ts.fujitsu.com/imprint.html _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel