The _sync_power_states task should filter out instances.task_state != None up front
Bug #1572730 reported by
Matt Riedemann
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Compute (nova) |
Won't Fix
|
Medium
|
Sarafraj Singh |
Bug Description
The _sync_power_states periodic task queries all instances on the compute host:
Then later it skips any that are in the middle of an operation:
We should avoid the roundtrip to the DB and RPC traffic to load up all of the instances on the compute host that are in the middle of a task and will just be skipped in code anyway and filter out the instance list by task_state in the initial DB query.
tags: | added: low-hanging-fruit |
Changed in nova: | |
assignee: | nobody → Chuck Carmack (chuckcarmack75) |
Changed in nova: | |
assignee: | Chuck Carmack (chuckcarmack75) → Sarafraj Singh (sarafraj-singh) |
To post a comment you must log in.
Matt, the periodic task compares the numbers of instances in the db vs. the actual number of VMs.
https:/ /github. com/openstack/ nova/blob/ 4ad414f3b121639 3301ef268a64e61 ca1a3d5be9/ nova/compute/ manager. py#L6180
Should that warning be removed?