diff options
author | Édouard Thuleau <edouard1.thuleau@orange.com> | 2011-11-09 17:37:54 +0100 |
---|---|---|
committer | Édouard Thuleau <edouard1.thuleau@orange.com> | 2011-11-10 09:52:11 +0100 |
commit | 1ecd70f23ae211c5c4ea5613adc24c0e1557790d (patch) | |
tree | 6b9e7110d8603e574a779d5b79be50d38d1a28e8 | |
parent | 26d2bad187ba8fab4f5e4b2f76b86f3e8762caa8 (diff) | |
download | nova-1ecd70f23ae211c5c4ea5613adc24c0e1557790d.tar.gz |
Bug #887805 Error during report_driver_status(): 'LibvirtConnection' object has no attribute '_host_state'
Fixes the host status reports from LibvirtConnection driver.
This fix initializes in class 'LibvirtConnection', the local variable
'_host_state' and replaces the variable 'session' by the local
variable 'read_only'.
Change-Id: Ia3ba29dc287c793c79a2bbde0d5ec69eb6ada480
-rw-r--r-- | .mailmap | 1 | ||||
-rw-r--r-- | Authors | 2 | ||||
-rw-r--r-- | nova/virt/libvirt/connection.py | 3 |
3 files changed, 4 insertions, 2 deletions
@@ -18,6 +18,7 @@ <dan@nicira.com> <danwent@dan-xs3-cs> <dan@nicira.com> <danwent@gmail.com> <devin.carlen@gmail.com> <devcamcar@illian.local> +<edouard1.thuleau@orange.com> <thuleau@gmail.com> <ewan.mellor@citrix.com> <emellor@silver> <itoumsn@nttdata.co.jp> <itoumsn@shayol> <jake@ansolabs.com> <jake@markupisart.com> @@ -39,7 +39,7 @@ Devendra Modium <dmodium@isi.edu> Devin Carlen <devin.carlen@gmail.com> Donal Lafferty <donal.lafferty@citrix.com> Ed Leafe <ed@leafe.com> -Edouard Thuleau <thuleau@gmail.com> +Edouard Thuleau <edouard1.thuleau@orange.com> Eldar Nugaev <reldan@oscloud.ru> Eric Day <eday@oddments.org> Eric Windisch <eric@cloudscaling.com> diff --git a/nova/virt/libvirt/connection.py b/nova/virt/libvirt/connection.py index a8a5caa01d..31a386977a 100644 --- a/nova/virt/libvirt/connection.py +++ b/nova/virt/libvirt/connection.py @@ -195,11 +195,12 @@ class LibvirtConnection(driver.ComputeDriver): driver_type, _sep, driver = driver_str.partition('=') driver_class = utils.import_class(driver) self.volume_drivers[driver_type] = driver_class(self) + self._host_state = None @property def host_state(self): if not self._host_state: - self._host_state = HostState(self._session) + self._host_state = HostState(self.read_only) return self._host_state def init_host(self, host): |