Restarting nova-compute faild beucase _get_host_utilization uses Intance.localgb which is not exist

Bug #921848 reported by Nachi Ueno on 2012-01-25
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Dean Troyer

Bug Description

Commit ID commit ef50dd412b3e0ab569c85abc1b3637ff0f3f819d (Essex Trunk)

I got following error after rebooting nova-compute

2012-01-25 15:56:35,731 DEBUG nova.utils [-] Running cmd (subprocess): qemu-img info /opt/stack/nova/nova/..//instances/instance-00000001/disk from (pid=8788) debug /opt/stack/nova/nova/
2012-01-25 15:56:35,742 INFO nova.virt.libvirt_conn [-] Compute_service record updated for 356591-essex-k1
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/eventlet/hubs/", line 336, in fire_timers
  File "/usr/lib/python2.7/dist-packages/eventlet/hubs/", line 56, in __call__
    cb(*args, **kw)
  File "/usr/lib/python2.7/dist-packages/eventlet/", line 192, in main
    result = function(*args, **kwargs)
  File "/opt/stack/nova/nova/", line 88, in run_server
  File "/opt/stack/nova/nova/", line 160, in start
  File "/opt/stack/nova/nova/", line 126, in wrapped
    return f(*args, **kw)
  File "/opt/stack/nova/nova/compute/", line 1709, in update_available_resource
  File "/opt/stack/nova/nova/virt/libvirt/", line 1592, in update_available_resource
    db.compute_node_update(ctxt, compute_node_ref[0]['id'], dic)
  File "/opt/stack/nova/nova/db/", line 191, in compute_node_update
    return IMPL.compute_node_update(context, compute_id, values)
  File "/opt/stack/nova/nova/db/sqlalchemy/", line 101, in wrapper
    return f(*args, **kwargs)
  File "/opt/stack/nova/nova/db/sqlalchemy/", line 513, in compute_node_update
    _adjust_compute_node_values_for_utilization(context, values, session)
  File "/opt/stack/nova/nova/db/sqlalchemy/", line 490, in _adjust_compute_node_values_for_utilization
    values.update(_get_host_utilization(context, host, ram_mb, disk_gb))
  File "/opt/stack/nova/nova/db/sqlalchemy/", line 475, in _get_host_utilization
    free_disk_gb -= instance.local_gb
AttributeError: 'Instance' object has no attribute 'local_gb'

_get_host_utilization uses local_gb

However local_gb is no longer in
( It looks local_gb is changed to root_gb)

Nachi Ueno (nati-ueno) wrote :
Changed in nova:
status: New → Fix Committed
Thierry Carrez (ttx) on 2012-02-29
Changed in nova:
milestone: none → essex-4
status: Fix Committed → Fix Released
Mark McLoughlin (markmc) on 2012-04-03
Changed in nova:
assignee: nobody → Dean Troyer (dtroyer)
Thierry Carrez (ttx) on 2012-04-05
Changed in nova:
milestone: essex-4 → 2012.1
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers