-
Notifications
You must be signed in to change notification settings - Fork 1.3k
CLOUDSTACK-8601. VMFS storage added as local storage can be re-added … #547
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
Conversation
…as shared storage. Fail addition of a VMFS shared storage pool in case it has already been added as local storage in CS.
|
cloudstack-pull-requests #680 SUCCESS |
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 recommend that all three of these member variables be made private.
|
Aside from a couple minor comments, LGTM. :) |
|
Who wants to step in and finish this work? It seems the original author is not able to finish it. If no one steps in, we'll have to close the PR without merging it so please help :-). |
|
The code LGTM. Are we under the assumption that it was properly tested? If so, I can just merge it at this point. |
|
@mike-tutkowski Thanks! It seems the testing / verification is still to do and that is the work. Merging itself can be done with a one-liner. Are you able to verify the fix in your lab? |
|
Hey...I just noticed something. I have a datastore that I manually added to my ESXi hosts (shared storage) that is based on an iSCSI target. When I restart the CS MS, this datastore (which I already added to CloudStack as shared primary storage) gets re-added as local storage (so it's listed as both shared and local primary storages). I think this is perhaps what led to this pull-request in the first place, but the problem still exists. What happens now that this pull-request code is in is that the datastore conflict is detected and an error message is printed, but I still see my shared primary storage has been added as well as local storage. I'm looking into this more, but wanted to point out this observation. I had forgotten about this issue (I think it's pretty old). At the time, we put in a workaround where datastores that started with "-" or "" were assumed to be shared and not re-added as local. It just happens that my manually added, shared datastore does not start with "-" or "", so I see the problem. |
|
OK, I mainly remembered the issue correctly, but not entirely. The way we avoid this problem (usually) is by looking to see if the datastore starts with "-iqn." or "_iqn.". If it does, we assume it is not local storage; otherwise, it is assumed to be local storage (an incorrect assumption in this situation that leads to shared storage (that has already been added to CS as shared primary storage) being added to CS as local primary storage). |
|
We need a more robust solution. Does anyone know how to detect that a datastore does not reside on the local storage of the host in question? |
|
Here is the relevant code (in HostMO.java): |
|
I see we already do this: dsSummary.isMultipleHostAccess() == false But that doesn't seem to work the way we thought. |
|
I found an old e-mail from me on this: |
Co-authored-by: Pearl Dsilva <[email protected]> Signed-off-by: Rohit Yadav <[email protected]>
… '4.16.0.0-scclouds' Fix submit not working on SSL Certificates form Closes apache#547 See merge request scclouds/scclouds!259
…as shared storage.
Fail addition of a VMFS shared storage pool in case it has already been added as local storage in CS.