<div dir="ltr"><font face="georgia, serif" color="#000000" style="background-color:rgb(255,255,255)">Hi All,</font><div><font face="georgia, serif" color="#000000" style="background-color:rgb(255,255,255)"><br></font></div><div><font face="georgia, serif"><span style="color:rgb(0,0,0)">I see negative values being returned by resource tracker, which is surprising, since enough capacity is available on Hypervisor (as seen through df -ha output [0]). </span></font><font color="#000000" style="font-family:georgia,serif">In my setup I have configured nova.conf to created instance snapshot locally and </font><span style="font-family:georgia,serif;color:rgb(0,0,0)">I </span><b style="font-family:georgia,serif;color:rgb(0,0,0)">don't have</b><span style="font-family:georgia,serif;color:rgb(0,0,0)"> disk-filter enabled</span><span style="font-family:georgia,serif;color:rgb(0,0,0)">. </span></div><div><font face="georgia, serif"><br></font></div><div><font face="georgia, serif"><span style="color:rgb(0,0,0)">Local instance snapshot means the snapshot creation (and conversion from RAW=>QCOW2) happens on the Hypervisor where the instance was created. After the conversion the snapshot is uploaded to Glance and deleted from the Hypervisor.</span></font></div><div><span style="color:rgb(0,0,0);line-height:15.2727px;white-space:pre"><font face="georgia, serif"><br></font></span></div><div><font color="#000000" face="georgia, serif"><span style="line-height:15.2727px;white-space:pre">Questions are :-</span></font></div><div><font face="georgia, serif"><br></font></div><div><font face="georgia, serif">1. compute_nodes['free_disk_gb'] is not in-sync with the actual free disk capacity for that partition (as seen by df -ha) [0]  (see /home). </font></div><div><font face="georgia, serif"><br></font></div><div><font face="georgia, serif"><span style="color:rgb(0,0,0)">This is because resource tracker is returning negative values for free_disk_gb [1] and that is because the value of </span><span style="color:rgb(0,0,0);line-height:15.2727px;white-space:pre">resources[</span><span class="" style="color:rgb(0,0,0);line-height:15.2727px;white-space:pre"><span class="">'</span>local_gb_used<span class="">'</span></span><span style="color:rgb(0,0,0);line-height:15.2727px;white-space:pre">] is greater than </span><span style="color:rgb(0,0,0);line-height:15.2727px;white-space:pre">resources[</span><span class="" style="color:rgb(0,0,0);line-height:15.2727px;white-space:pre"><span class="">'</span>local_gb<span class="">'</span></span><span style="color:rgb(0,0,0);line-height:15.2727px;white-space:pre">]. The value for </span><span style="color:rgb(0,0,0);line-height:15.2727px;white-space:pre">resources[</span><span class="" style="color:rgb(0,0,0);line-height:15.2727px;white-space:pre"><span class="">'</span>local_gb_used<span class="">'</span></span><span style="color:rgb(0,0,0);line-height:15.2727px;white-space:pre">] should ideally be the local gigabytes (787G [0]) used by the Hypervisor but in-fact is the local gigabytes allocated on the Hypervisor (3525 G [0])</span><span style="color:rgb(0,0,0);line-height:15.2727px;white-space:pre">. Allocated is the sum of used capacity on hypervisor + space consumed by instances spawned on that Hypervisor ( and there size depends on which flavor VM was spawned on the Hypervisor). Because of [2] the used space on the Hypervisor is discarded and only the space consumed by the instances on the HV is taken into consideration. </span></font></div><div><font face="georgia, serif"><span style="color:rgb(0,0,0);line-height:15.2727px;white-space:pre"><br></span></font></div><div><span style="color:rgb(0,0,0);font-family:georgia,serif;line-height:15.2727px;white-space:pre">Was there a specific reason to do so, specifically [2] i.e. resetting the value of resources['local_gb_used'] ?</span><font face="georgia, serif"><span style="color:rgb(0,0,0);line-height:15.2727px;white-space:pre"><br></span></font></div><div><span style="color:rgb(0,0,0);line-height:15.2727px;white-space:pre"><font face="georgia, serif"><br></font></span></div><div><font face="georgia, serif"><span style="color:rgb(0,0,0);line-height:15.2727px;white-space:pre">2. </span><font color="#000000"><span style="line-height:15.2727px;white-space:pre"> Is seeing negative values for compute_nodes['free_disk_gb'] and compute_nodes['</span></font>disk_available_least'] a normal pattern ? When can we expect to see them ?</font></div><div><font face="georgia, serif"><br></font></div><div><font face="georgia, serif">3. Lets say in future I plan to enable disk filter, scheduler logic will make sure not to pick up this Hypervisor if its reaching its consumption (considering it might need to have enough space for snapshot creation and later a scratch space for snapshot conversion from RAW => QCOW2) will it help so that resource tracker does not return negative values. Is there a recommended overcommit ration suggestion in these scenario where you happen to create/convert snapshot locally before uploading to glance.</font></div><div><font face="georgia, serif"><br></font></div><div><font face="georgia, serif">4. How will multiple snapshot request for instances on same Hypervisor be handled because till the time the request reaches the compute it has no clear idea about the free capacity on HV which might lead to instance unusable. Will something of this sort [3]  help? How do people using local snapshots handle it right now ?</font></div><div><font face="georgia, serif"><br></font></div><div><font face="georgia, serif">-Vilobh</font></div>







<div><font face="georgia, serif" color="#000000" style="background-color:rgb(255,255,255)"><br></font></div><div><font face="georgia, serif" color="#000000" style="background-color:rgb(255,255,255)">[0] </font><font color="#000000" face="georgia, serif"><a href="http://paste.openstack.org/show/477926/">http://paste.openstack.org/show/477926/</a></font></div><div><font face="georgia, serif" color="#000000" style="background-color:rgb(255,255,255)">[1] </font><font color="#000000" face="georgia, serif"><a href="https://github.com/openstack/nova/blob/stable/liberty/nova/compute/resource_tracker.py#L576">https://github.com/openstack/nova/blob/stable/liberty/nova/compute/resource_tracker.py#L576</a></font></div><div><font face="georgia, serif" color="#000000" style="background-color:rgb(255,255,255)">[2] </font><font color="#000000" face="georgia, serif"><a href="https://github.com/openstack/nova/blob/stable/liberty/nova/compute/resource_tracker.py#L853">https://github.com/openstack/nova/blob/stable/liberty/nova/compute/resource_tracker.py#L853</a></font></div><div><font face="georgia, serif" color="#000000" style="background-color:rgb(255,255,255)">[3] </font><font color="#000000" face="georgia, serif"><a href="https://review.openstack.org/#/c/208078/">https://review.openstack.org/#/c/208078/</a></font></div><div><font face="georgia, serif" color="#000000" style="background-color:rgb(255,255,255)"><br></font></div><div><font face="georgia, serif" color="#000000" style="background-color:rgb(255,255,255)"><br></font></div><div><br></div></div>