lxc: libvirt error due to use of dom.vcpus()

Bug #903943 reported by Scott Moser
22
This bug affects 3 people
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Undecided
Chuck Short
Diablo
Fix Released
Undecided
Unassigned

Bug Description

running a devstack with with LIBVIRT_TYPE=lxc and nova at:
  commit f597dc5548d66530e68ff5809ac2c56b7edbc6d8
  Merge: c979656 724e5e7
  Date: Tue Dec 13 18:05:39 2011 +0000

I ran a couple instances, killed some, and eventually saw this in nova compute log:

2011-12-13 21:13:41,875 DEBUG nova.virt.libvirt_conn [43af388f-bc82-4ad9-b4d5-7dfa1c0263fc None None] Updating host stats from (pid=5839) update_status /opt/stack/nova/nova/virt/libvirt/connection.py:1913
libvir: error : this function is not supported by the connection driver: virDomainGetVcpus
2011-12-13 21:13:41,881 ERROR nova.manager [43af388f-bc82-4ad9-b4d5-7dfa1c0263fc None None] Error during ComputeManager._report_driver_status: 'NoneType' object has no attribute '__getitem__'
(nova.manager): TRACE: Traceback (most recent call last):
(nova.manager): TRACE: File "/opt/stack/nova/nova/manager.py", line 154, in periodic_tasks
(nova.manager): TRACE: task(self, context)
(nova.manager): TRACE: File "/opt/stack/nova/nova/compute/manager.py", line 1896, in _report_driver_status
(nova.manager): TRACE: self.driver.get_host_stats(refresh=True))
(nova.manager): TRACE: File "/opt/stack/nova/nova/virt/libvirt/connection.py", line 1883, in get_host_stats
(nova.manager): TRACE: return self.host_state.get_host_stats(refresh=refresh)
(nova.manager): TRACE: File "/opt/stack/nova/nova/virt/libvirt/connection.py", line 1908, in get_host_stats
(nova.manager): TRACE: self.update_status()
(nova.manager): TRACE: File "/opt/stack/nova/nova/virt/libvirt/connection.py", line 1918, in update_status
(nova.manager): TRACE: data["vcpus_used"] = self.connection.get_vcpu_used()
(nova.manager): TRACE: File "/opt/stack/nova/nova/virt/libvirt/connection.py", line 1357, in get_vcpu_used
(nova.manager): TRACE: total += len(dom.vcpus()[1])
(nova.manager): TRACE: TypeError: 'NoneType' object has no attribute '__getitem__'
(nova.manager): TRACE:

and also:
2011-12-13 21:15:42,029 DEBUG nova.virt.libvirt_conn [d3c67c9b-08db-4238-9dde-7fa0e81bf6e4 None None] Updating host stats from (pid=5839) update_status /opt/stack/nova/nova/virt/libvirt/connection.py:1913
libvir: error : this function is not supported by the connection driver: virDomainGetVcpus
2011-12-13 21:15:42,033 ERROR nova.manager [d3c67c9b-08db-4238-9dde-7fa0e81bf6e4 None None] Error during ComputeManager._report_driver_status: 'NoneType' object has no attribute '__getitem__'
(nova.manager): TRACE: Traceback (most recent call last):
(nova.manager): TRACE: File "/opt/stack/nova/nova/manager.py", line 154, in periodic_tasks
(nova.manager): TRACE: task(self, context)
(nova.manager): TRACE: File "/opt/stack/nova/nova/compute/manager.py", line 1896, in _report_driver_status
(nova.manager): TRACE: self.driver.get_host_stats(refresh=True))
(nova.manager): TRACE: File "/opt/stack/nova/nova/virt/libvirt/connection.py", line 1883, in get_host_stats
(nova.manager): TRACE: return self.host_state.get_host_stats(refresh=refresh)
(nova.manager): TRACE: File "/opt/stack/nova/nova/virt/libvirt/connection.py", line 1908, in get_host_stats
(nova.manager): TRACE: self.update_status()
(nova.manager): TRACE: File "/opt/stack/nova/nova/virt/libvirt/connection.py", line 1918, in update_status
(nova.manager): TRACE: data["vcpus_used"] = self.connection.get_vcpu_used()
(nova.manager): TRACE: File "/opt/stack/nova/nova/virt/libvirt/connection.py", line 1357, in get_vcpu_used
(nova.manager): TRACE: total += len(dom.vcpus()[1])
(nova.manager): TRACE: TypeError: 'NoneType' object has no attribute '__getitem__'
(nova.manager): TRACE:

Revision history for this message
Openstack Gerrit (openstack-gerrit) wrote : Fix merged to nova (master)

Reviewed: https://review.openstack.org/2305
Committed: http://github.com/openstack/nova/commit/f4368e5cdf286d065742e0da1977a3e48c091123
Submitter: Jenkins
Branch: master

 status fixcommitted
 done

commit f4368e5cdf286d065742e0da1977a3e48c091123
Author: Scott Moser <email address hidden>
Date: Tue Dec 13 16:48:05 2011 -0500

    avoid error and trace on dom.vcpus() in lxc

    This fixes bug 903943. If you used lxc, you'd eventually
    see stack traces in nova-compute due to use of dom.vcpus().

    Change-Id: I8ff4e973d33eef3df116feb237b2febc8e6a59b5

Changed in nova:
status: New → Fix Committed
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nova (stable/diablo)

Fix proposed to branch: stable/diablo
Review: https://review.openstack.org/2802

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (stable/diablo)

Reviewed: https://review.openstack.org/2802
Committed: http://github.com/openstack/nova/commit/abea7aac12704dcd0bc337e03f4e47a8ec189df8
Submitter: Jenkins
Branch: stable/diablo

commit abea7aac12704dcd0bc337e03f4e47a8ec189df8
Author: Scott Moser <email address hidden>
Date: Tue Dec 13 16:48:05 2011 -0500

    avoid error and trace on dom.vcpus() in lxc

    This fixes bug 903943. If you used lxc, you'd eventually
    see stack traces in nova-compute due to use of dom.vcpus().

    Change-Id: I8ff4e973d33eef3df116feb237b2febc8e6a59b5

tags: added: in-stable-diablo
Thierry Carrez (ttx)
Changed in nova:
status: Fix Committed → Fix Released
Revision history for this message
Chuck Short (zulcss) wrote :
Download full text (5.0 KiB)

libvir: error : this function is not supported by the connection driver: virDomainGetVcpus
2013-01-27 08:24:50.832 ERROR nova.manager [-] Error during ComputeManager._report_driver_status: this function is not supported by the connection driver: virDomainGetVcpus
2013-01-27 08:24:50.832 TRACE nova.manager Traceback (most recent call last):
2013-01-27 08:24:50.832 TRACE nova.manager File "/opt/stack/nova/nova/manager.py", line 230, in periodic_tasks
2013-01-27 08:24:50.832 TRACE nova.manager task(self, context)
2013-01-27 08:24:50.832 TRACE nova.manager File "/opt/stack/nova/nova/compute/manager.py", line 3275, in _report_driver_status
2013-01-27 08:24:50.832 TRACE nova.manager capabilities = self.driver.get_host_stats(refresh=True)
2013-01-27 08:24:50.832 TRACE nova.manager File "/opt/stack/nova/nova/virt/libvirt/driver.py", line 2925, in get_host_stats
2013-01-27 08:24:50.832 TRACE nova.manager return self.host_state.get_host_stats(refresh=refresh)
2013-01-27 08:24:50.832 TRACE nova.manager File "/opt/stack/nova/nova/virt/libvirt/driver.py", line 3198, in get_host_stats
2013-01-27 08:24:50.832 TRACE nova.manager self.update_status()
2013-01-27 08:24:50.832 TRACE nova.manager File "/opt/stack/nova/nova/virt/libvirt/driver.py", line 3208, in update_status
2013-01-27 08:24:50.832 TRACE nova.manager data["vcpus_used"] = self.connection.get_vcpu_used()
2013-01-27 08:24:50.832 TRACE nova.manager File "/opt/stack/nova/nova/virt/libvirt/driver.py", line 2109, in get_vcpu_used
2013-01-27 08:24:50.832 TRACE nova.manager vcpus = dom.vcpus()
2013-01-27 08:24:50.832 TRACE nova.manager File "/usr/lib/python2.7/dist-packages/eventlet/tpool.py", line 187, in doit
2013-01-27 08:24:50.832 TRACE nova.manager result = proxy_call(self._autowrap, f, *args, **kwargs)
2013-01-27 08:24:50.832 TRACE nova.manager File "/usr/lib/python2.7/dist-packages/eventlet/tpool.py", line 147, in proxy_call
2013-01-27 08:24:50.832 TRACE nova.manager rv = execute(f,*args,**kwargs)
2013-01-27 08:24:50.832 TRACE nova.manager File "/usr/lib/python2.7/dist-packages/eventlet/tpool.py", line 76, in tworker
2013-01-27 08:24:50.832 TRACE nova.manager rv = meth(*args,**kwargs)
2013-01-27 08:24:50.832 TRACE nova.manager File "/usr/lib/python2.7/dist-packages/libvirt.py", line 2087, in vcpus
2013-01-27 08:24:50.832 TRACE nova.manager if ret == -1: raise libvirtError ('virDomainGetVcpus() failed', dom=self)
2013-01-27 08:24:50.832 TRACE nova.manager libvirtError: this function is not supported by the connection driver: virDomainGetVcpus
2013-01-27 08:24:50.832 TRACE nova.manager
ERROR:nova.manager:Error during ComputeManager._report_driver_status: this function is not supported by the connection driver: virDomainGetVcpus
2013-01-27 08:24:50.832 TRACE nova.manager Traceback (most recent call last):
2013-01-27 08:24:50.832 TRACE nova.manager File "/opt/stack/nova/nova/manager.py", line 230, in periodic_tasks
2013-01-27 08:24:50.832 TRACE nova.manager task(self, context)
2013-01-27 08:24:50.832 TRACE nova.manager File "/opt/stack/nova/nova/compute/manager.py", line 3275, in _report_driver_status
20...

Read more...

Changed in nova:
status: Fix Released → New
assignee: nobody → Chuck Short (zulcss)
Chuck Short (zulcss)
Changed in nova:
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.