Skip to content
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

Handle duplicate storages in the refresh parser #361

Merged

Conversation

agrare
Copy link
Member

@agrare agrare commented Jan 29, 2019

VMware datastores in multiple datacenters will have the same location but different ems_refs. This leads to "duplicate" storages in the parser that will lead to a single storage record.

Due to an issue with the saver if duplicate storages are sent from the parser they will actually be all created so we get duplicate storage records, then subsequent refreshes pick up only the first one leading to orphans.

This change adapts the parser to handle these "duplicate" storages in the parser. One trick is that we need to handle mapping multiple ems_refs (mors) to the single storage record.

@miq-bot
Copy link
Member

miq-bot commented Jan 29, 2019

Checked commit agrare@4843e84 with ruby 2.3.3, rubocop 0.52.1, haml-lint 0.20.0, and yamllint 1.10.0
2 files checked, 0 offenses detected
Everything looks fine. 🏆

Copy link
Contributor

@Ladas Ladas left a comment

Choose a reason for hiding this comment

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

Looks good 👍

@Ladas Ladas merged commit c716f77 into ManageIQ:master Jan 30, 2019
@Ladas Ladas added this to the Sprint 104 Ending Feb 4, 2019 milestone Jan 30, 2019
@agrare agrare deleted the fix_duplicate_datastore_location_handling branch January 30, 2019 14:47
agrare pushed a commit to agrare/manageiq-providers-vmware that referenced this pull request Apr 15, 2019
…ble_tower_job

Changed ansible_tower_job instance to use AutomationManagement namespace.
simaishi pushed a commit that referenced this pull request Oct 25, 2019
…handling

Handle duplicate storages in the refresh parser

(cherry picked from commit c716f77)

Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1765583
@simaishi
Copy link
Contributor

Hammer backport details:

$ git log -1
commit c7aebad1ef912ef3d96d0ec1eab364711c3fab11
Author: Ladislav Smola <lsmola@redhat.com>
Date:   Wed Jan 30 15:46:54 2019 +0100

    Merge pull request #361 from agrare/fix_duplicate_datastore_location_handling
    
    Handle duplicate storages in the refresh parser
    
    (cherry picked from commit c716f77dd43a705cb33ba3848a42247a301023da)
    
    Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1765583

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants