<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Tue, May 29, 2018 at 2:21 PM, Balázs Gibizer <span dir="ltr"><<a href="mailto:balazs.gibizer@ericsson.com" target="_blank">balazs.gibizer@ericsson.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div class="gmail-HOEnZb"><div class="gmail-h5"><br>
<br>
On Tue, May 29, 2018 at 1:47 PM, Sylvain Bauza <<a href="mailto:sbauza@redhat.com" target="_blank">sbauza@redhat.com</a>> wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
<br>
Le mar. 29 mai 2018 à 11:02, Balázs Gibizer <<a href="mailto:balazs.gibizer@ericsson.com" target="_blank">balazs.gibizer@ericsson.com</a>> a écrit :<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
<br>
On Tue, May 29, 2018 at 9:38 AM, Sylvain Bauza <<a href="mailto:sbauza@redhat.com" target="_blank">sbauza@redhat.com</a>><br>
wrote:<br>
><br>
><br>
> On Tue, May 29, 2018 at 3:08 AM, TETSURO NAKAMURA<br>
> <<a href="mailto:nakamura.tetsuro@lab.ntt.co.jp" target="_blank">nakamura.tetsuro@lab.ntt.co.j<wbr>p</a>> wrote<br>
><br>
>> > In that situation, say for example with VGPU inventories, that<br>
>> would mean<br>
>> > that the compute node would stop reporting inventories for its<br>
>> root RP, but<br>
>> > would rather report inventories for at least one single child RP.<br>
>> > In that model, do we reconcile the allocations that were already<br>
>> made<br>
>> > against the "root RP" inventory ?<br>
>><br>
>> It would be nice to see Eric and Jay comment on this,<br>
>> but if I'm not mistaken, when the virt driver stops reporting<br>
>> inventories for its root RP, placement would try to delete that<br>
>> inventory inside and raise InventoryInUse exception if any<br>
>> allocations still exist on that resource.<br>
>><br>
>> ```<br>
>> update_from_provider_tree() (nova/compute/resource_tracker<wbr>.py)<br>
>> + _set_inventory_for_provider() (nova/scheduler/client/report.<wbr>py)<br>
>> + put() - PUT /resource_providers/<rp_uuid>/<wbr>inventories with<br>
>> new inventories (scheduler/client/report.py)<br>
>> + set_inventories() (placement/handler/inventory.p<wbr>y)<br>
>> + _set_inventory()<br>
>> (placement/objects/resource_pr<wbr>oveider.py)<br>
>> + _delete_inventory_from_provide<wbr>r()<br>
>> (placement/objects/resource_pr<wbr>oveider.py)<br>
>> -> raise exception.InventoryInUse<br>
>> ```<br>
>><br>
>> So we need some trick something like deleting VGPU allocations<br>
>> before upgrading and set the allocation again for the created new<br>
>> child after upgrading?<br>
>><br>
><br>
> I wonder if we should keep the existing inventory in the root RP, and<br>
> somehow just reserve the left resources (so Placement wouldn't pass<br>
> that root RP for queries, but would still have allocations). But<br>
> then, where and how to do this ? By the resource tracker ?<br>
><br>
<br>
AFAIK it is the virt driver that decides to model the VGU resource at a<br>
different place in the RP tree so I think it is the responsibility of<br>
the same virt driver to move any existing allocation from the old place<br>
to the new place during this change.<br>
<br>
Cheers,<br>
gibi<br>
</blockquote>
<br>
Why not instead not move the allocation but rather have the virt driver updating the root RP by modifying the reserved value to the total size?<br>
<br>
That way, the virt driver wouldn't need to ask for an allocation but rather continue to provide inventories...<br>
<br>
Thoughts?<br>
</blockquote>
<br></div></div>
Keeping the old allocaton at the old RP and adding a similar sized reservation in the new RP feels hackis as those are not really reserved GPUs but used GPUs just from the old RP. If somebody sums up the total reported GPUs in this setup via the placement API then she will get more GPUs in total that what is physically visible for the hypervisor as the GPUs part of the old allocation reported twice in two different total value. Could we just report less GPU inventories to the new RP until the old RP has GPU allocations?<br>
<br></blockquote><div><br><br></div><div>We could keep the old inventory in the root RP for the previous vGPU type already supported in Queens and just add other inventories for other vGPU types now supported. That looks possibly the simpliest option as the virt driver knows that.<br><br> <br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
Some alternatives from my jetlagged brain:<br>
<br>
a) Implement a move inventory/allocation API in placement. Given a resource class and a source RP uuid and a destination RP uuid placement moves the inventory and allocations of that resource class from the source RP to the destination RP. Then the virt drive can call this API to move the allocation. This has an impact on the fast forward upgrade as it needs running virt driver to do the allocation move.<br>
<br></blockquote><div><br></div><div>Instead of having the virt driver doing that (TBH, I don't like that given both Xen and libvirt drivers have the same problem), we could write a nova-manage upgrade call for that that would call the Placement API, sure.<br> <br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
b) For this I assume that live migrating an instance having a GPU allocation on the old RP will allocate GPU for that instance from the new RP. In the virt driver do not report GPUs to the new RP while there is allocation for such GPUs in the old RP. Let the deployer live migrate away the instances. When the virt driver detects that there is no more GPU allocations on the old RP it can delete the inventory from the old RP and report it to the new RP.<br>
<br></blockquote><div><br></div><div>For the moment, vGPUs don't support live migration, even within QEMU. I haven't checked that, but IIUC when you live-migrate an instance that have vGPUs, it will just migrate it without recreating the vGPUs.<br></div><div>Now, the problem is with the VGPU allocation, we should delete it then. Maybe a new bug report ?<br> <br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
c) For this I assume that there is no support for live migration of an instance having a GPU. If there is GPU allocation in the old RP then virt driver does not report GPU inventory to the new RP just creates the new nested RPs. Provide a placement-manage command to do the inventory + allocation copy from the old RP to the new RP.<br>
<br></blockquote><div><br></div><div>what's the difference with the first alternative ?<br><br></div><div>Anyway, looks like it's pretty simple to just keep the inventory for the already existing vGPU type in the root RP, and just add nested RPs for other vGPU types.<br></div><div>Oh, and btw. we could possibly have the same problem when we implement the NUMA spec that I need to rework <a href="https://review.openstack.org/#/c/552924/">https://review.openstack.org/#/c/552924/</a><br><br></div><div>-Sylvain<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
Cheers,<br>
gibi<div class="gmail-HOEnZb"><div class="gmail-h5"><br>
<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
> -Sylvain<br>
><br>
<br>
<br>
______________________________<wbr>______________________________<wbr>______________<br>
OpenStack Development Mailing List (not for usage questions)<br>
Unsubscribe: <a href="http://OpenStack-dev-request@lists.openstack.org?subject:unsubscribe" rel="noreferrer" target="_blank">OpenStack-dev-request@lists.op<wbr>enstack.org?subject:unsubscrib<wbr>e</a><br>
<a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev" rel="noreferrer" target="_blank">http://lists.openstack.org/cgi<wbr>-bin/mailman/listinfo/openstac<wbr>k-dev</a><br>
</blockquote></blockquote>
<br>
<br>
______________________________<wbr>______________________________<wbr>______________<br>
OpenStack Development Mailing List (not for usage questions)<br>
Unsubscribe: <a href="http://OpenStack-dev-request@lists.openstack.org?subject:unsubscribe" rel="noreferrer" target="_blank">OpenStack-dev-request@lists.op<wbr>enstack.org?subject:unsubscrib<wbr>e</a><br>
<a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev" rel="noreferrer" target="_blank">http://lists.openstack.org/cgi<wbr>-bin/mailman/listinfo/openstac<wbr>k-dev</a><br>
</div></div></blockquote></div><br></div></div>