ResourceTracker auditing the wrong amount of free resources for Ironic

Bug #1313779 reported by Lucas Alvares Gomes
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Ironic
Won't Fix
High
Unassigned
OpenStack Compute (nova)
Fix Released
Low
Unassigned

Bug Description

I've two nodes avaiable in Ironic, they both have cpus=1, memory_mb=512, local_gb=10, cpu_arch=x86_64 but when you look at the audit logs it seems to be reporting the amount of resources of only one of the nodes:

N-cpu:
2014-04-28 16:09:47.200 AUDIT nova.compute.resource_tracker [-] Free ram (MB): 512
2014-04-28 16:09:47.200 AUDIT nova.compute.resource_tracker [-] Free disk (GB): 10
2014-04-28 16:09:47.200 AUDIT nova.compute.resource_tracker [-] Free VCPUS: 1

If I update the first of the nodes of the list and let's say double the ram, the audit will report it:

N-cpu:
2014-04-28 16:11:26.885 AUDIT nova.compute.resource_tracker [req-8a8a5d53-8cf1-4b9e-9420-5f0e3a6f9b27 None None] Free ram (MB): 1024

But if I update the second node, no changes are reported back to the resource tracker...

...

Worst, if I delete the properties from the first node, now the Resource Tracker will report:

$ ironic node-update $NODE remove properties

N-cpu:
2014-04-28 16:13:07.735 AUDIT nova.compute.resource_tracker [req-c3211bd1-768d-40ea-b2cf-6e73c69e39b1 None None] Free ram (MB): 0
2014-04-28 16:13:07.735 AUDIT nova.compute.resource_tracker [req-c3211bd1-768d-40ea-b2cf-6e73c69e39b1 None None] Free disk (GB): 0
2014-04-28 16:13:07.735 AUDIT nova.compute.resource_tracker [req-c3211bd1-768d-40ea-b2cf-6e73c69e39b1 None None] Free VCPU information unavailable

UPD from comment:
We need to change Nova to understand the Ironic use case better. For nova each n-cpu is responsable for managing a X number of machines, but when the Ironic driver is loaded the n-cpu is just a small thin layer that talks to the Ironic api, and every n-cpu is managing _all_ the machines in the cluster. So in the Ironic use case different n-cpus would share the same machines and that's what making nova confused when auditing the resources.

Tags: ironic
Changed in ironic:
assignee: nobody → Lucas Alvares Gomes (lucasagomes)
Changed in ironic:
importance: Undecided → High
Revision history for this message
Dmitry Tantsur (divius) wrote :

Hi Lucas! I see you've been assigned to this task for more than a month, but no code review is linked here. Could you give a status update on this?

Changed in ironic:
assignee: Lucas Alvares Gomes (lucasagomes) → nobody
Revision history for this message
Lucas Alvares Gomes (lucasagomes) wrote :

Right, I tried a couple of approachs for this problem none really suceed... We need to change Nova to understand the Ironic use case better. For nova each n-cpu is responsable for managing a X number of machines, but when the Ironic driver is loaded the n-cpu is just a small thin layer that talks to the Ironic api, and every n-cpu is managing _all_ the machines in the cluster. So in the Ironic use case different n-cpus would share the same machines and that's what making nova confused when auditing the resources.

Revision history for this message
Dmitry Tantsur (divius) wrote :

Copied your comment to description - it describes the situation very well, thank you!

Changed in ironic:
status: New → Triaged
description: updated
Dmitry Tantsur (divius)
tags: added: driver
aeva black (tenbrae)
tags: added: nova-driver
removed: driver
Dmitry Tantsur (divius)
summary: - ResourceTracker auditing the wrong amout of free resources
+ ResourceTracker auditing the wrong amount of free resources for Ironic
tags: added: ironic
Sean Dague (sdague)
Changed in nova:
status: New → Confirmed
importance: Undecided → Low
aeva black (tenbrae)
tags: removed: nova-driver
Changed in ironic:
status: Triaged → Won't Fix
Revision history for this message
aeva black (tenbrae) wrote :

Hi Lucas,

I have checked this on a local devstack install with 3 ironic nodes, and I could not reproduce your results. n-cpu is logging the available resources for each node individually, and upon updating a node, I see the change to that node in n-cpu's log at the next periodic interval. Updates to additional nodes also are logged appropraitely for each additional node.

As such, I'm closing this bug. Please re-open and add more details if you can reproduce with the current code.

Changed in nova:
status: Confirmed → Won't Fix
status: Won't Fix → Fix Committed
Thierry Carrez (ttx)
Changed in nova:
milestone: none → juno-rc1
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in nova:
milestone: juno-rc1 → 2014.2
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.