get_memory_mb_total in nova/virt/libvirt/connection.py not working for Xen/libvirt
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Compute (nova) |
New
|
Undecided
|
Unassigned |
Bug Description
After upgrading from 2012.1 to 2012.1.1 nova-compute with libvirt/Xen is not working because of a static method using self.
satsuma:~ # nova-compute
2012-07-02 10:50:20 AUDIT nova.service [-] Starting compute node (version 2012.1.
2012-07-02 10:50:21 WARNING nova.utils [req-b67d9038-
Pool.
2012-07-02 10:50:21 WARNING nova.utils [req-b67d9038-
self.
Traceback (most recent call last):
File "/usr/lib64/
timer()
File "/usr/lib64/
cb(*args, **kw)
File "/usr/lib64/
result = function(*args, **kwargs)
File "/usr/lib64/
server.start()
File "/usr/lib64/
self.
File "/usr/lib64/
self.
File "/usr/lib64/
'memory_mb': self.get_
File "/usr/lib64/
meminfo = self._conn.
NameError: global name 'self' is not defined
can be fixed for 2012.1.1 with this patch, i'll check if bug is available in trunk, too, and commit the patch if trunk is affected.
--- nova/virt/ libvirt/ connection. py.orig 2012-07-02 10:51:10.000000000 +0200 libvirt/ connection. py 2012-07-02 10:51:57.000000000 +0200
"This error can be safely ignored for now."))
+++ nova/virt/
@@ -1703,8 +1703,7 @@
return 0
- @staticmethod mb_total( ): mb_total( self):
- def get_memory_
+ def get_memory_
"""Get the total memory size(MB) of physical computer.
:returns: the total amount of memory(MB).