Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -171,11 +171,7 @@ private ModifyStoragePoolAnswer sendModifyStoragePoolCommand(ModifyStoragePoolCo

@Override
public boolean hostDisconnected(long hostId, long poolId) {
StoragePoolHostVO storagePoolHost = _storagePoolHostDao.findByPoolHost(poolId, hostId);
if (storagePoolHost != null) {
_storagePoolHostDao.deleteStoragePoolHostDetails(hostId, poolId);
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@harikrishna-patnala I think, better to remove the record on host disconnect as it gets updated (with any SDC Id changes) on host re-connect. Any issue, if it is deleted from storage_pool_host_ref?

Other storage providers also remove it on disconnect, check here:

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes @sureshanaparti there is some race condition issue, entry in storage_pool_host_ref is getting deleted and the new entry is not getting added during host connect. Since we are dealing with SDC ID updation and creating a new entry if does not exist during host connect, I've removed the deleting part in host disconnect.

If the entry of SDC ID is not there in storage_pool_host_ref all Powerflex operations are affected.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes @sureshanaparti there is some race condition issue, entry in storage_pool_host_ref is getting deleted and the new entry is not getting added during host connect. Since we are dealing with SDC ID updation and creating a new entry if does not exist during host connect, I've removed the deleting part in host disconnect.

If the entry of SDC ID is not there in storage_pool_host_ref all Powerflex operations are affected.

@harikrishna-patnala What is that race condition issue? It's fine if dealing with SDC ID updation on host connect. What if the host is removed, and not connected again. Check if these entries of the host are removed from storage_pool_host_ref or not. If host is connected, ensure that SDC ID is properly added/updated for that host in storage_pool_host_ref, then no Powerflex operations are affected.

@harikrishna-patnala harikrishna-patnala Jul 3, 2023 •

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think race condition happening in multiple management server setup. Yes all entries are getting deleting when host is removed, so upon adding it again new entries will be made. Even if SDC ID is changed which is unlikely event, even then it will be updated during host connect. @sureshanaparti

// SDC ID is getting updated upon host connect, no need to delete the storage_pool_host_ref entry
return true;
}

Expand Down