From: Mandell Degerness Date: Thu, 21 Feb 2013 02:59:44 +0000 (+0000) Subject: Skip timestamp check if 'capabilities' is none X-Git-Url: https://review.fuel-infra.org/gitweb?a=commitdiff_plain;h=8169eb66832101444b0a824c932982966222097c;p=openstack-build%2Fcinder-build.git Skip timestamp check if 'capabilities' is none fix bug: #1131011 Change-Id: I6266560627d03d95862a7f2c85ac63e2e9daef6b --- diff --git a/cinder/scheduler/host_manager.py b/cinder/scheduler/host_manager.py index 66926f215..2392de859 100644 --- a/cinder/scheduler/host_manager.py +++ b/cinder/scheduler/host_manager.py @@ -116,10 +116,10 @@ class HostState(object): def update_from_volume_capability(self, capability): """Update information about a host from its volume_node info.""" - if self.updated and self.updated > capability['timestamp']: - return - if capability: + if self.updated and self.updated > capability['timestamp']: + return + self.volume_backend = capability.get('volume_backend_name', None) self.vendor_name = capability.get('vendor_name', None) self.driver_version = capability.get('driver_version', None)