Hi, the separate "," is use for hypervisor parametors and when I use "," example^ gnt-instance modify -H pci_pass=02:08.0,03:09.1 centos6-2x64 I get this: Parameter Error: Unknown parameter '03:09.1' I think if use "," for pci_pass than need change global handler separate.
Thanks, Jack On Thu, Jun 28, 2012 at 3:21 PM, Bernardo Dal Seno <[email protected]>wrote: > On Thu, Jun 28, 2012 at 1:13 PM, Guido Trotter <[email protected]> > wrote: > > +ganeti-devel, > > > > Understood. I'm just a bit worried about having different separators for > > different fields as it might be confusing, and if in the future we'll > have > > any path fields, those we won't be able to separate with "/". Maybe space > > would be better for that? Of course ":" doesn't work for this case... > sic! > > :) > > What about using a semicolon? > > Bernardo > > > On Thu, Jun 28, 2012 at 7:01 AM, Jack Sitnikov <[email protected]> > wrote: > >> > >> else may be will use pci_pass="02:08.0 03:09.1" separate is " ", but I > >> think it's no cool, and I agree use "," is the a best choose. > >> > >> > >> On Thu, Jun 28, 2012 at 2:53 PM, Jack Sitnikov <[email protected]> > >> wrote: > >>> > >>> > >>> Becouse separate "," is use for hypervisor parametors and when I use > "," > >>> > >>> example^ gnt-instance modify -H pci_pass=02:08.0,03:09.1 centos6-2x64 > I > >>> get this: > >>> Parameter Error: Unknown parameter '03:09.1' > >>> I think if use "," for pci_pass than need change global handler > >>> separate. > >>> > >>> Thank you, > >>> Jack > >>> > >>> On Thu, Jun 28, 2012 at 2:40 PM, Guido Trotter <[email protected]> > >>> wrote: > >>>> > >>>> I'm wondering if we should use ",", rather than /... It feels strange > to > >>>> separate different entities with /, and pci entries don't have , > anyway, > >>>> right? > >>>> > >>>> Thanks, > >>>> > >>>> Guido > >>>> > >>>> > >>>> On Thu, Jun 28, 2012 at 6:24 AM, Jack Sitnikov <[email protected]> > >>>> wrote: > >>>>> > >>>>> Hello. > >>>>> It's new patch for pci passthrough with multi PCI ID by separator "/" > >>>>> How can I help the team for commit this path in upstream? > >>>>> > >>>>> Best regards, > >>>>> Jack > >>>>> > >>>>> diff -r -c ganeti-2.5.1_orig/lib//constants.py > >>>>> ganeti-2.5.1/lib//constants.py > >>>>> *** ganeti-2.5.1_orig/lib//constants.py 2012-05-11 16:55:13.000000000 > >>>>> +0400 > >>>>> --- ganeti-2.5.1/lib//constants.py 2012-06-28 13:30:41.000000000 > >>>>> +0400 > >>>>> *************** > >>>>> *** 698,703 **** > >>>>> --- 698,704 ---- > >>>>> HV_KVM_USE_CHROOT = "use_chroot" > >>>>> HV_CPU_MASK = "cpu_mask" > >>>>> HV_MEM_PATH = "mem_path" > >>>>> + HV_PASSTHROUGH = "pci_pass" > >>>>> HV_BLOCKDEV_PREFIX = "blockdev_prefix" > >>>>> HV_REBOOT_BEHAVIOR = "reboot_behavior" > >>>>> > >>>>> *************** > >>>>> *** 743,748 **** > >>>>> --- 744,750 ---- > >>>>> HV_KVM_USE_CHROOT: VTYPE_BOOL, > >>>>> HV_CPU_MASK: VTYPE_STRING, > >>>>> HV_MEM_PATH: VTYPE_STRING, > >>>>> + HV_PASSTHROUGH: VTYPE_STRING, > >>>>> HV_BLOCKDEV_PREFIX: VTYPE_STRING, > >>>>> HV_REBOOT_BEHAVIOR: VTYPE_STRING, > >>>>> } > >>>>> *************** > >>>>> *** 1280,1285 **** > >>>>> --- 1282,1288 ---- > >>>>> HV_MIGRATION_MODE: HT_MIGRATION_NONLIVE, > >>>>> HV_USE_LOCALTIME: False, > >>>>> HV_BLOCKDEV_PREFIX: "hd", > >>>>> + HV_PASSTHROUGH: "", > >>>>> HV_REBOOT_BEHAVIOR: INSTANCE_REBOOT_ALLOWED, > >>>>> }, > >>>>> HT_KVM: { > >>>>> diff -r -c ganeti-2.5.1_orig/lib//hypervisor/hv_xen.py > >>>>> ganeti-2.5.1/lib//hypervisor/hv_xen.py > >>>>> *** ganeti-2.5.1_orig/lib//hypervisor/hv_xen.py 2012-05-11 > >>>>> 16:55:13.000000000 +0400 > >>>>> --- ganeti-2.5.1/lib//hypervisor/hv_xen.py 2012-06-28 > >>>>> 13:30:43.000000000 +0400 > >>>>> *************** > >>>>> *** 579,585 **** > >>>>> constants.HV_USE_LOCALTIME: hv_base.NO_CHECK, > >>>>> # TODO: Add a check for the blockdev prefix (matching [a-z:] or > >>>>> similar). > >>>>> constants.HV_BLOCKDEV_PREFIX: hv_base.NO_CHECK, > >>>>> ! constants.HV_REBOOT_BEHAVIOR: > >>>>> hv_base.ParamInSet(True, constants.REBOOT_BEHAVIORS) > >>>>> } > >>>>> > >>>>> --- 579,587 ---- > >>>>> constants.HV_USE_LOCALTIME: hv_base.NO_CHECK, > >>>>> # TODO: Add a check for the blockdev prefix (matching [a-z:] or > >>>>> similar). > >>>>> constants.HV_BLOCKDEV_PREFIX: hv_base.NO_CHECK, > >>>>> ! #passthrough pci > >>>>> ! constants.HV_PASSTHROUGH: hv_base.NO_CHECK, > >>>>> ! constants.HV_REBOOT_BEHAVIOR: > >>>>> hv_base.ParamInSet(True, constants.REBOOT_BEHAVIORS) > >>>>> } > >>>>> > >>>>> *************** > >>>>> *** 671,677 **** > >>>>> disk_data.append(iso) > >>>>> > >>>>> config.write("disk = [%s]\n" % (",".join(disk_data))) > >>>>> ! > >>>>> config.write("on_poweroff = 'destroy'\n") > >>>>> if hvp[constants.HV_REBOOT_BEHAVIOR] == > >>>>> constants.INSTANCE_REBOOT_ALLOWED: > >>>>> config.write("on_reboot = 'restart'\n") > >>>>> --- 673,684 ---- > >>>>> disk_data.append(iso) > >>>>> > >>>>> config.write("disk = [%s]\n" % (",".join(disk_data))) > >>>>> ! # this is pci pass > >>>>> ! pci_pass = hvp[constants.HV_PASSTHROUGH] > >>>>> ! if pci_pass: > >>>>> ! pci_pass_arr = [] > >>>>> ! pci_pass_arr = pci_pass.split("/") > >>>>> ! config.write("pci = %s \n" % pci_pass_arr) > >>>>> config.write("on_poweroff = 'destroy'\n") > >>>>> if hvp[constants.HV_REBOOT_BEHAVIOR] == > >>>>> constants.INSTANCE_REBOOT_ALLOWED: > >>>>> config.write("on_reboot = 'restart'\n") > >>>>> diff -r -c ganeti-2.5.1_orig/lib//query.py ganeti-2.5.1/lib//query.py > >>>>> *** ganeti-2.5.1_orig/lib//query.py 2012-05-11 16:55:13.000000000 > >>>>> +0400 > >>>>> --- ganeti-2.5.1/lib//query.py 2012-06-28 13:30:43.000000000 +0400 > >>>>> *************** > >>>>> *** 1638,1643 **** > >>>>> --- 1638,1644 ---- > >>>>> constants.HV_NIC_TYPE: "NIC_type", > >>>>> constants.HV_PAE: "PAE", > >>>>> constants.HV_VNC_BIND_ADDRESS: "VNC_bind_address", > >>>>> + constants.HV_PASSTHROUGH: "pci_pass", > >>>>> } > >>>>> > >>>>> fields = [ > >>>>> > >>>>> On Thu, Jun 7, 2012 at 5:30 PM, Jack Sitnikov <[email protected]> > >>>>> wrote: > >>>>>> > >>>>>> Hello, > >>>>>> Thanks for your attention. > >>>>>> > >>>>>> >should we disable migration, if > >>>>>> >this parameter is used? > >>>>>> I think yes, because the pci id on some nodes is difficult. > >>>>>> I think is offline move and modify this parameter will work. > >>>>>> > >>>>>> for the second question > >>>>>> one is better than nothing:) > >>>>>> I'm new in python and architecture ganeti. I try it, it's > >>>>>> not difficult, i think... > >>>>>> I send my patch for feedback and some comments, maybe I missed > >>>>>> something(eg. manuals page). > >>>>>> > >>>>>> I write CLA web form. > >>>>>> > >>>>>> Thanks > >>>>>> > >>>>>> Jack > >>>>>> > >>>>>> On Thu, Jun 7, 2012 at 4:56 PM, Guido Trotter <[email protected] > > > >>>>>> wrote: > >>>>>>> > >>>>>>> Thanks for doing this. One question: should we disable migration, > if > >>>>>>> this parameter is used? > >>>>>>> Would it make sense to be able to pass more than one device? (eg. > >>>>>>> many > >>>>>>> separated by a comma?) > >>>>>>> > >>>>>>> Finally, would you mind signing the Google code CLA, so we can > >>>>>>> include > >>>>>>> your patch? > >>>>>>> http://code.google.com/legal/individual-cla-v1.0.html > >>>>>>> > >>>>>>> Thanks a lot, > >>>>>>> > >>>>>>> Guido > >>>>>>> > >>>>>>> > >>>>>>> On Thu, Jun 7, 2012 at 1:26 PM, Jack <[email protected]> wrote: > >>>>>>> > Hi, > >>>>>>> > I wrote about pci passthrough in > >>>>>>> > > https://groups.google.com/group/ganeti/browse_thread/thread/4b66136f6950dce6 > >>>>>>> > , and I wrote this patch for use the instance parameter. > >>>>>>> > sorry for my terrible English. > >>>>>>> > > >>>>>>> > But I used ganeti-2.5.1.tar.gz, not git, and build and create > >>>>>>> > instance > >>>>>>> > with -H pci_pass=XX:XX.X instance_name > >>>>>>> > #diff command diff -r -c ganeti-2.5.1_orig/lib/ ganeti-2.5.1/lib/ > >>>>>>> > Patch text: > >>>>>>> > > >>>>>>> > diff -r -c ganeti-2.5.1_orig/lib/ ganeti-2.5.1/lib/ > >>>>>>> > diff -r -c ganeti-2.5.1_orig/lib//constants.py ganeti-2.5.1/lib// > >>>>>>> > constants.py > >>>>>>> > *** ganeti-2.5.1_orig/lib//constants.py 2012-05-11 > >>>>>>> > 16:55:13.000000000 > >>>>>>> > +0400 > >>>>>>> > --- ganeti-2.5.1/lib//constants.py 2012-06-05 > >>>>>>> > 10:50:27.000000000 > >>>>>>> > +0400 > >>>>>>> > *************** > >>>>>>> > *** 698,703 **** > >>>>>>> > --- 698,704 ---- > >>>>>>> > HV_KVM_USE_CHROOT = "use_chroot" > >>>>>>> > HV_CPU_MASK = "cpu_mask" > >>>>>>> > HV_MEM_PATH = "mem_path" > >>>>>>> > + HV_PASSTHROUGH = "pci_pass" > >>>>>>> > HV_BLOCKDEV_PREFIX = "blockdev_prefix" > >>>>>>> > HV_REBOOT_BEHAVIOR = "reboot_behavior" > >>>>>>> > > >>>>>>> > *************** > >>>>>>> > *** 743,748 **** > >>>>>>> > --- 744,750 ---- > >>>>>>> > HV_KVM_USE_CHROOT: VTYPE_BOOL, > >>>>>>> > HV_CPU_MASK: VTYPE_STRING, > >>>>>>> > HV_MEM_PATH: VTYPE_STRING, > >>>>>>> > + HV_PASSTHROUGH: VTYPE_STRING, > >>>>>>> > HV_BLOCKDEV_PREFIX: VTYPE_STRING, > >>>>>>> > HV_REBOOT_BEHAVIOR: VTYPE_STRING, > >>>>>>> > } > >>>>>>> > *************** > >>>>>>> > *** 1280,1285 **** > >>>>>>> > --- 1282,1288 ---- > >>>>>>> > HV_MIGRATION_MODE: HT_MIGRATION_NONLIVE, > >>>>>>> > HV_USE_LOCALTIME: False, > >>>>>>> > HV_BLOCKDEV_PREFIX: "hd", > >>>>>>> > + HV_PASSTHROUGH: "", > >>>>>>> > HV_REBOOT_BEHAVIOR: INSTANCE_REBOOT_ALLOWED, > >>>>>>> > }, > >>>>>>> > HT_KVM: { > >>>>>>> > diff -r -c ganeti-2.5.1_orig/lib//hypervisor/hv_xen.py > >>>>>>> > ganeti-2.5.1/ > >>>>>>> > lib//hypervisor/hv_xen.py > >>>>>>> > *** ganeti-2.5.1_orig/lib//hypervisor/hv_xen.py 2012-05-11 > >>>>>>> > 16:55:13.000000000 +0400 > >>>>>>> > --- ganeti-2.5.1/lib//hypervisor/hv_xen.py 2012-06-07 > >>>>>>> > 16:10:10.993086257 +0400 > >>>>>>> > *************** > >>>>>>> > *** 579,585 **** > >>>>>>> > constants.HV_USE_LOCALTIME: hv_base.NO_CHECK, > >>>>>>> > # TODO: Add a check for the blockdev prefix (matching [a-z:] > >>>>>>> > or > >>>>>>> > similar). > >>>>>>> > constants.HV_BLOCKDEV_PREFIX: hv_base.NO_CHECK, > >>>>>>> > ! constants.HV_REBOOT_BEHAVIOR: > >>>>>>> > hv_base.ParamInSet(True, constants.REBOOT_BEHAVIORS) > >>>>>>> > } > >>>>>>> > > >>>>>>> > --- 579,587 ---- > >>>>>>> > constants.HV_USE_LOCALTIME: hv_base.NO_CHECK, > >>>>>>> > # TODO: Add a check for the blockdev prefix (matching [a-z:] > >>>>>>> > or > >>>>>>> > similar). > >>>>>>> > constants.HV_BLOCKDEV_PREFIX: hv_base.NO_CHECK, > >>>>>>> > ! #passthrough pci > >>>>>>> > ! constants.HV_PASSTHROUGH: hv_base.NO_CHECK, > >>>>>>> > ! constants.HV_REBOOT_BEHAVIOR: > >>>>>>> > hv_base.ParamInSet(True, constants.REBOOT_BEHAVIORS) > >>>>>>> > } > >>>>>>> > > >>>>>>> > *************** > >>>>>>> > *** 671,677 **** > >>>>>>> > disk_data.append(iso) > >>>>>>> > > >>>>>>> > config.write("disk = [%s]\n" % (",".join(disk_data))) > >>>>>>> > ! > >>>>>>> > config.write("on_poweroff = 'destroy'\n") > >>>>>>> > if hvp[constants.HV_REBOOT_BEHAVIOR] == > >>>>>>> > constants.INSTANCE_REBOOT_ALLOWED: > >>>>>>> > config.write("on_reboot = 'restart'\n") > >>>>>>> > --- 673,682 ---- > >>>>>>> > disk_data.append(iso) > >>>>>>> > > >>>>>>> > config.write("disk = [%s]\n" % (",".join(disk_data))) > >>>>>>> > ! # this is pci pass > >>>>>>> > ! pci_pass = hvp[constants.HV_PASSTHROUGH] > >>>>>>> > ! if pci_pass: > >>>>>>> > ! config.write("pci = ['%s']\n" % pci_pass) > >>>>>>> > config.write("on_poweroff = 'destroy'\n") > >>>>>>> > if hvp[constants.HV_REBOOT_BEHAVIOR] == > >>>>>>> > constants.INSTANCE_REBOOT_ALLOWED: > >>>>>>> > config.write("on_reboot = 'restart'\n") > >>>>>>> > diff -r -c ganeti-2.5.1_orig/lib//query.py > >>>>>>> > ganeti-2.5.1/lib//query.py > >>>>>>> > *** ganeti-2.5.1_orig/lib//query.py 2012-05-11 > >>>>>>> > 16:55:13.000000000 > >>>>>>> > +0400 > >>>>>>> > --- ganeti-2.5.1/lib//query.py 2012-06-05 10:50:27.000000000 > +0400 > >>>>>>> > *************** > >>>>>>> > *** 1638,1643 **** > >>>>>>> > --- 1638,1644 ---- > >>>>>>> > constants.HV_NIC_TYPE: "NIC_type", > >>>>>>> > constants.HV_PAE: "PAE", > >>>>>>> > constants.HV_VNC_BIND_ADDRESS: "VNC_bind_address", > >>>>>>> > + constants.HV_PASSTHROUGH: "pci_pass", > >>>>>>> > } > >>>>>>> > > >>>>>>> > fields = [ > >>>>>>> > >>>>>>> > >>>>>>> > >>>>>>> -- > >>>>>>> Guido Trotter > >>>>>>> Google - Corporate Computing Services SRE > >>>>>>> > >>>>>>> Google Ireland Ltd. : Registered in Ireland with company number > >>>>>>> 368047. > >>>>>>> Gordon House, Barrow Street, Dublin 4, Ireland. > >>>>>> > >>>>>> > >>>>>> > >>>>>> > >>>>> > >>>>> > >>>>> > >>>>> \ > >>>> > >>>> > >>>> > >>>> > >>>> -- > >>>> Guido Trotter > >>>> SRE - Corp Computing Services (aka Horsepower) > >>>> Google Ireland > >>> > >>> > >>> > >>> > >>> -- > >>> С уважением, > >>> Ситников Евгений > >>> mailto:[email protected] > >>> icq: 319044459 > >>> tel. +7 (916)4215405 > >> > >> > >> > >> > >> -- > >> С уважением, > >> Ситников Евгений > >> mailto:[email protected] > >> icq: 319044459 > >> tel. +7 (916)4215405 > > > > > > > > > > -- > > Guido Trotter > > SRE - Corp Computing Services (aka Horsepower) > > Google Ireland > -- С уважением, Ситников Евгений mailto:[email protected] icq: 319044459 tel. +7 (916)4215405
