You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by ro...@apache.org on 2023/07/03 07:28:50 UTC
[cloudstack] branch 4.18 updated: scaleio: Avoid race condition while handling host disconnect and connect scenarios (#282) (#7689)
This is an automated email from the ASF dual-hosted git repository.
rohit pushed a commit to branch 4.18
in repository https://gitbox.apache.org/repos/asf/cloudstack.git
The following commit(s) were added to refs/heads/4.18 by this push:
new 70820137e64 scaleio: Avoid race condition while handling host disconnect and connect scenarios (#282) (#7689)
70820137e64 is described below
commit 70820137e642e026b20773214684fc2af816b856
Author: Harikrishna <ha...@gmail.com>
AuthorDate: Mon Jul 3 12:58:42 2023 +0530
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.
---
.../cloudstack/storage/datastore/provider/ScaleIOHostListener.java | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)
diff --git a/plugins/storage/volume/scaleio/src/main/java/org/apache/cloudstack/storage/datastore/provider/ScaleIOHostListener.java b/plugins/storage/volume/scaleio/src/main/java/org/apache/cloudstack/storage/datastore/provider/ScaleIOHostListener.java
index 68044baf170..bb269e85a95 100644
--- a/plugins/storage/volume/scaleio/src/main/java/org/apache/cloudstack/storage/datastore/provider/ScaleIOHostListener.java
+++ b/plugins/storage/volume/scaleio/src/main/java/org/apache/cloudstack/storage/datastore/provider/ScaleIOHostListener.java
@@ -171,11 +171,7 @@ public class ScaleIOHostListener implements HypervisorHostListener {
@Override
public boolean hostDisconnected(long hostId, long poolId) {
- StoragePoolHostVO storagePoolHost = _storagePoolHostDao.findByPoolHost(poolId, hostId);
- if (storagePoolHost != null) {
- _storagePoolHostDao.deleteStoragePoolHostDetails(hostId, poolId);
- }
-
+ // SDC ID is getting updated upon host connect, no need to delete the storage_pool_host_ref entry
return true;
}