Resource tracker doesn't take shut off instances into account

Bug #1084785 reported by Sam Morrison
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Invalid
High
Unassigned

Bug Description

If I suspend an instance (eg. via the dashboard) it goes into shut off state from libvirts point of view.

The resource tracker then doesn't take this instance into account. Instances could be scheduled onto this node and when the instance is resumed the compute node would become over allocated.

Revision history for this message
Russell Bryant (russellb) wrote :

Can you clarify how you determined this was the case?

Revision history for this message
Sam Morrison (sorrison) wrote :

In the nova logs it says:

AUDIT nova.compute.resource_tracker [-] Free VCPUS: 17

When I suspend an instance so in libvirt it goes to shut off state I now get: (the instance was a 1 core vm)

AUDIT nova.compute.resource_tracker [-] Free VCPUS: 18

Looking at the code in the libvirt driver it calls listDomainsID to calculate the amount of VCPUs used. From the libvirt page:

"listDomainsID returns a list of the integer ID for the currently running domains"

I don't know the libvirt API that well but I think in nova's case it would want to know about all instances whether running or not?

Michael Still (mikal)
Changed in nova:
status: New → Triaged
importance: Undecided → High
Revision history for this message
rerngvit yanggratoke (rerngvit) wrote :

I couldn't reproduce this. When I suspend the VM, the resource tracker log still produces the same "Free VCPUS". I use

What environment did you use? I use "b8b8f2032483e5f3d6c09b7b6fddd07301805230" on Ubuntu 12.04, running in a VM.

Revision history for this message
Sam Morrison (sorrison) wrote :

I'm using stable/folsom

I also see WARNING nova.compute.manager [-] Found 14 in the database and 12 on the hypervisor

Also due to it not taking into account the suspended instance

Revision history for this message
Joe Gordon (jogo) wrote :

This doesn't occur in Grizzly.

Changed in nova:
status: Triaged → Invalid
Sean Dague (sdague)
no longer affects: nova/folsom
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.