-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Fix ScaleIO/Powerflex SDC id deletion on host disconnect #7689
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
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:
cloudstack/plugins/storage/volume/datera/src/main/java/org/apache/cloudstack/storage/datastore/provider/DateraHostListener.java
Line 115 in f3ad9e6
cloudstack/plugins/storage/volume/solidfire/src/main/java/org/apache/cloudstack/storage/datastore/provider/SolidFireSharedHostListener.java
Line 120 in f3ad9e6
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@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.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
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