Skip to content

Commit 7082013

Browse files
scaleio: Avoid race condition while handling host disconnect and connect scenarios (#282) (#7689)
This PR fixes an intermittent issue where SDC id (local_path) is getting deleted and not getting populated when host connects back again. Fix is to remove the code to delete the records from storage_pool_host_ref table. We are anyways updating the entry if the SDC ID is changed during agent restart which is anyways required inorder to get the new connections. I've quickly verified the host delete scenario to check the storage_pool_host_ref entries behavior, entries are getting deleted.
1 parent de6ce50 commit 7082013

1 file changed

Lines changed: 1 addition & 5 deletions

File tree

plugins/storage/volume/scaleio/src/main/java/org/apache/cloudstack/storage/datastore/provider/ScaleIOHostListener.java

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -171,11 +171,7 @@ private ModifyStoragePoolAnswer sendModifyStoragePoolCommand(ModifyStoragePoolCo
171171

172172
@Override
173173
public boolean hostDisconnected(long hostId, long poolId) {
174-
StoragePoolHostVO storagePoolHost = _storagePoolHostDao.findByPoolHost(poolId, hostId);
175-
if (storagePoolHost != null) {
176-
_storagePoolHostDao.deleteStoragePoolHostDetails(hostId, poolId);
177-
}
178-
174+
// SDC ID is getting updated upon host connect, no need to delete the storage_pool_host_ref entry
179175
return true;
180176
}
181177

0 commit comments

Comments
 (0)