Scheduling a vm to a reporting compute node cause the number of vms in the compute node exceed the limit

Bug #1857448 reported by tianxiang ai
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
In Progress
Medium
tianxiang ai

Bug Description

Description
===========
When scheduling a vm to a reporting compute node,
update_available_resource will clear self.stats and update compute_nodes
table in db firstly, and update this table after calculating all
instances on this node. At this moment, the scheduler filter will pass
this node because there is no num_instances in compute_nodes.stats.

Steps to reproduce
==================
1,create a new az,there is noly one compute node in this az;
2,set max_instances_per_host = 100 on the compute node;
3,boot 100 vms to this az, the vms will be scheduled to the specified node;
4,boot some vms to this az once again.

Expected result
===============
boot vm fails and return no valid host error

Actual result
=============
some vms failed but some vms will be scheduled to the compute node successfully when the compute node is reporting available resources.

Changed in nova:
status: New → In Progress
assignee: nobody → tianxiang ai (aitianxiang)
description: updated
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nova (master)

Fix proposed to branch: master
Review: https://review.opendev.org/700529

summary: - Schedule a vm to a reporting compute node
+ Scheduler a vm to a reporting compute node
summary: - Scheduler a vm to a reporting compute node
+ Scheduling a vm to a reporting compute node cause the number of vms in
+ the compute node exceed the limit
Revision history for this message
sean mooney (sean-k-mooney) wrote :

Triaging this as medium as this is a silent failure that would allow limts on vms per host to be exceeded that would not be obvious unless the operator specifically looked for it. that said this could also be considered low for many deployments as the NumInstanceFilter is not enabled by default
https://github.com/openstack/nova/blob/65aae518f81c2754e30429a3547c5cf62a3cf598/nova/conf/scheduler.py#L320-L334

Changed in nova:
importance: Undecided → Medium
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on nova (master)

Change abandoned by tianxiang ai (<email address hidden>) on branch: master
Review: https://review.opendev.org/700529
Reason: i just found that this bug:#1857448 had been fixed in another patch:https://review.opendev.org/#/c/612293/

Revision history for this message
tianxiang ai (aitianxiang) wrote :

Abandoned

i just found that this bug:#1857448 had been fixed in another patch:https://review.opendev.org/#/c/612293/

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.