GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — CLOUDSTACK-8601. VMFS storage added as local storage can be re-added … by likitha · Pull Request #547 · apache/cloudstack

Conversation

@likitha

@likitha likitha commented Jul 1, 2015

Copy link
Copy Markdown

…as shared storage.

Fail addition of a VMFS shared storage pool in case it has already been added as local storage in CS.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Likitha Shetty
CLOUDSTACK-8601. VMFS storage added as local storage can be re-added …
13a98dd
…as shared storage.

Fail addition of a VMFS shared storage pool in case it has already been added as local storage in CS.
@asfbot

asfbot commented Jul 1, 2015

Copy link
Copy Markdown

cloudstack-pull-requests #680 SUCCESS
This pull request looks good

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

mike-tutkowski
mike-tutkowski reviewed Aug 7, 2015
View reviewed changes
Comment thread core/src/com/cloud/agent/api/ModifyStoragePoolAnswer.java

@mike-tutkowski mike-tutkowski Aug 7, 2015

Copy link
Copy Markdown
Member

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.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@mike-tutkowski

mike-tutkowski commented Aug 7, 2015

Copy link
Copy Markdown
Member

Aside from a couple minor comments, LGTM. :)

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@remibergsma

remibergsma commented Aug 9, 2015

Copy link
Copy Markdown
Contributor

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 :-).

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@mike-tutkowski

mike-tutkowski commented Aug 10, 2015

Copy link
Copy Markdown
Member

The code LGTM. Are we under the assumption that it was properly tested? If so, I can just merge it at this point.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@remibergsma

remibergsma commented Aug 10, 2015

Copy link
Copy Markdown
Contributor

@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?

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@asfgit
asfgit merged commit 13a98dd into apache:master Aug 11, 2015
@mike-tutkowski

mike-tutkowski commented Sep 4, 2015

Copy link
Copy Markdown
Member

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.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@mike-tutkowski

mike-tutkowski commented Sep 4, 2015

Copy link
Copy Markdown
Member

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).

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@mike-tutkowski

mike-tutkowski commented Sep 4, 2015

Copy link
Copy Markdown
Member

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?

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@mike-tutkowski

mike-tutkowski commented Sep 4, 2015

Copy link
Copy Markdown
Member

Here is the relevant code (in HostMO.java):

public List<Pair<ManagedObjectReference, String>> getLocalDatastoreOnHost() throws Exception {
    List<Pair<ManagedObjectReference, String>> dsList = new ArrayList<Pair<ManagedObjectReference, String>>();

    ObjectContent[] ocs = getDatastorePropertiesOnHyperHost(new String[] {"name", "summary"});
    if (ocs != null) {
        for (ObjectContent oc : ocs) {
            DatastoreSummary dsSummary = (DatastoreSummary)VmwareHelper.getPropValue(oc, "summary");
            if (dsSummary.isMultipleHostAccess() == false && dsSummary.isAccessible() && dsSummary.getType().equalsIgnoreCase("vmfs")) {
                ManagedObjectReference morDs = oc.getObj();
                String name = (String)VmwareHelper.getPropValue(oc, "name");

                if (!name.startsWith("-iqn.") && !name.startsWith("_iqn.")) {
                    dsList.add(new Pair<ManagedObjectReference, String>(morDs, name));
                }
            }
        }
    }
    return dsList;
}
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@mike-tutkowski

mike-tutkowski commented Sep 4, 2015

Copy link
Copy Markdown
Member

I see we already do this:

dsSummary.isMultipleHostAccess() == false

But that doesn't seem to work the way we thought.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@mike-tutkowski

mike-tutkowski commented Sep 4, 2015

Copy link
Copy Markdown
Member

I found an old e-mail from me on this:

http://mail-archives.apache.org/mod_mbox/cloudstack-dev/201312.mbox/%3CCACOnxCh2HGTWRWkvB-__VGgA9q-XJyA-mOuyd4iRnOkkZ7b37Q@mail.gmail.com%3E

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

yadvr pushed a commit that referenced this pull request Jan 20, 2021
@Pearl1594 Pearl Dsilva @yadvr
fix params passed during tag deletion (#547)
e2e638e
Co-authored-by: Pearl Dsilva <[email protected]>
Signed-off-by: Rohit Yadav <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

5 participants

@likitha @asfbot @mike-tutkowski @remibergsma @asfgit
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.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.