Disk resource consumption is inconsistent between scheduler and resource tracker

Bug #1550098 reported by Yingxin
16
This bug affects 3 people
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Invalid
Medium
Unassigned

Bug Description

The way scheduler consumes disk resources in host state is inconsistent with RT's way in compute service.

The scheduler consumes "free_disk_mb" in its host state.
https://github.com/openstack/nova/blob/master/nova/scheduler/host_manager.py#L266

It comes from the min value of "free_disk_gb" and "disk_available_least" in ComputeNode object.
https://github.com/openstack/nova/blob/master/nova/scheduler/host_manager.py#L189-L201

But compute node changes "local_gb_used" instead in consuming resources from a request. https://github.com/openstack/nova/blob/master/nova/compute/resource_tracker.py#L709-L710

There is a inconsistent gap(confirmed) of compute node state between scheduler and resource tracker, but somehow the compute node will be updated by virt driver to the consistent status after maybe 10 seconds.

Tags: scheduler
Yingxin (cyx1231st)
Changed in nova:
assignee: nobody → Yingxin (cyx1231st)
status: New → In Progress
Changed in nova:
status: In Progress → Confirmed
Revision history for this message
Yingxin (cyx1231st) wrote :

Change to Medium because it is a prerequisite of future schedulers such as resource-provider scheduler and shared-state scheduler.

Changed in nova:
importance: Undecided → Medium
Changed in nova:
status: Confirmed → In Progress
Yingxin (cyx1231st)
tags: added: scheduler
Revision history for this message
Rodolfo Alonso (rodolfo-alonso-hernandez) wrote :

Hello @Yingxin:

I've seen this error in gate-tempest-dsvm-neutron-identity-v3-only-full-ubuntu-xenial-nv too.

Do you have a fix for this problem? I don't want to step over your solution on this problem. If you are stuck on this bug, do you want to transfer it to me?

A possible solution: to test in https://github.com/openstack/nova/blob/master/nova/scheduler/host_manager.py#L205 if free_gb is None. If it is, assign free_gb = least_gb. What do you think?

Revision history for this message
Yingxin (cyx1231st) wrote :

Hi Rodolfo,

I had a fix in https://review.openstack.org/#/c/290302/ long ago. I think it still works. It moves the "least_disk_mb" calculation to disk_filter, so free_disk_mb in host manager is now consistent with the resource tracker "free_disk_gb".

If it doesn't fix the error in gate-tempest-dsvm-neutron-identity-v3-only-full-ubuntu-xenial-nv, feel free to upload your version :)

Revision history for this message
Sean Dague (sdague) wrote :

There are no currently open reviews on this bug, changing
the status back to the previous state and unassigning. If
there are active reviews related to this bug, please include
links in comments.

Changed in nova:
status: In Progress → Confirmed
assignee: Yingxin (cyx1231st) → nobody
Sean Dague (sdague)
Changed in nova:
assignee: nobody → Yingxin (cyx1231st)
status: Confirmed → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on nova (master)

Change abandoned by Yingxin Cheng (<email address hidden>) on branch: master
Review: https://review.openstack.org/290302
Reason: This fix is very old and may not be valid now...
Anyone interested in this can try to pick it up.

Yingxin (cyx1231st)
Changed in nova:
assignee: Yingxin (cyx1231st) → nobody
Revision history for this message
Matt Riedemann (mriedem) wrote :

The DiskFilter was deprecated in Stein https://review.opendev.org/#/c/596502/ and this bug was reported before the scheduler was using placement for disk filtering in Pike, so it may not be valid anymore. If you think it is, please recreate on the latest release of Stein 19.* and re-open with new details (or report a new bug).

Changed in nova:
status: In Progress → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.