Merge "Skip check whether volume is local if it's None"

This commit is contained in:
Jenkins 2015-12-15 22:15:24 +00:00 committed by Gerrit Code Review
commit 4c4e23c9ed

View File

@ -2653,10 +2653,11 @@ class VolumeManager(manager.SchedulerDependentManager):
# self.host is 'host@backend'
# volume_ref['host'] is 'host@backend#pool'
# Extract host before doing comparison
new_host = vol_utils.extract_host(volume_ref['host'])
if new_host != self.host:
raise exception.InvalidVolume(
reason=_("Volume is not local to this node"))
if volume_ref['host']:
new_host = vol_utils.extract_host(volume_ref['host'])
if new_host != self.host:
raise exception.InvalidVolume(
reason=_("Volume is not local to this node"))
self._notify_about_consistencygroup_usage(
context, group, "delete.start")