OpenStack Compute (Nova)

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

Reported by Nachi Ueno on 2012-01-25
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Undecided
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/log.py:175
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/hub.py", line 336, in fire_timers
    timer()
  File "/usr/lib/python2.7/dist-packages/eventlet/hubs/timer.py", line 56, in __call__
    cb(*args, **kw)
  File "/usr/lib/python2.7/dist-packages/eventlet/greenthread.py", line 192, in main
    result = function(*args, **kwargs)
  File "/opt/stack/nova/nova/service.py", line 88, in run_server
    server.start()
  File "/opt/stack/nova/nova/service.py", line 160, in start
    self.manager.update_available_resource(ctxt)
  File "/opt/stack/nova/nova/exception.py", line 126, in wrapped
    return f(*args, **kw)
  File "/opt/stack/nova/nova/compute/manager.py", line 1709, in update_available_resource
    self.driver.update_available_resource(context, self.host)
  File "/opt/stack/nova/nova/virt/libvirt/connection.py", line 1592, in update_available_resource
    db.compute_node_update(ctxt, compute_node_ref[0]['id'], dic)
  File "/opt/stack/nova/nova/db/api.py", line 191, in compute_node_update
    return IMPL.compute_node_update(context, compute_id, values)
  File "/opt/stack/nova/nova/db/sqlalchemy/api.py", line 101, in wrapper
    return f(*args, **kwargs)
  File "/opt/stack/nova/nova/db/sqlalchemy/api.py", line 513, in compute_node_update
    _adjust_compute_node_values_for_utilization(context, values, session)
  File "/opt/stack/nova/nova/db/sqlalchemy/api.py", 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/api.py", 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
https://github.com/openstack/nova/blob/master/nova/db/sqlalchemy/api.py#L475

However local_gb is no longer in
https://github.com/openstack/nova/blob/master/nova/db/sqlalchemy/models.py#L173
( 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