diff options
| author | Matt Thompson <mattt@defunct.ca> | 2013-06-12 15:20:02 +0100 |
|---|---|---|
| committer | Matt Thompson <mattt@defunct.ca> | 2013-06-12 15:28:26 +0100 |
| commit | db0ac5ff995143992e306fe5246a2375473c8030 (patch) | |
| tree | bac0503a0d49571793fdf9952190d149f7df272f /nova | |
| parent | 32fca6ab41f1553476feed40cb8d64554d8a2977 (diff) | |
Check libvirt version earlier
Running libvirt 0.8 causes an exception to be thrown before
has_min_version() is run, resulting in no error message about version
being logged. This change moves the version check before the libvirt
calls are made.
Change-Id: Ifaae18c6686d72fb79fc32081c4087084ae8bbb9
Fixes: bug #1190232
Diffstat (limited to 'nova')
| -rwxr-xr-x | nova/virt/libvirt/driver.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/nova/virt/libvirt/driver.py b/nova/virt/libvirt/driver.py index 91d5b1a50..387a1cf48 100755 --- a/nova/virt/libvirt/driver.py +++ b/nova/virt/libvirt/driver.py @@ -548,9 +548,6 @@ class LibvirtDriver(driver.ComputeDriver): dispatch_thread = eventlet.spawn(self._dispatch_thread) def init_host(self, host): - libvirt.registerErrorHandler(libvirt_error_handler, None) - libvirt.virEventRegisterDefaultImpl() - if not self.has_min_version(MIN_LIBVIRT_VERSION): major = MIN_LIBVIRT_VERSION[0] minor = MIN_LIBVIRT_VERSION[1] @@ -559,6 +556,9 @@ class LibvirtDriver(driver.ComputeDriver): '%(major)i.%(minor)i.%(micro)i or greater.') % locals()) + libvirt.registerErrorHandler(libvirt_error_handler, None) + libvirt.virEventRegisterDefaultImpl() + self._init_events() def _get_connection(self): |
