Dell SC: Can incorrectly identify if it is failed over

Driver was only checking active_backend_id against None when
it should have been checking against None or an empty string.

Change-Id: Ib62b28742f32f3522a92f2f140e23ba5472eef8d
Closes-Bug: #1631149
This commit is contained in:
Tom Swanson 2016-10-06 16:12:40 -05:00
parent e885cd99ed
commit a1c0fc3b03
1 changed files with 4 additions and 1 deletions

View File

@ -87,7 +87,10 @@ class DellCommonDriver(driver.ConsistencyGroupVD, driver.ManageableVD,
self.replication_enabled = True if self.backends else False
self.is_direct_connect = False
self.active_backend_id = kwargs.get('active_backend_id', None)
self.failed_over = (self.active_backend_id is not None)
self.failed_over = True if self.active_backend_id else False
LOG.info(_LI('Loading %(name)s: Failover state is %(state)r'),
{'name': self.backend_name,
'state': self.failed_over})
self.storage_protocol = 'iSCSI'
self.failback_timeout = 30