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

Fixes for host_switches #338

Merged
merged 2 commits into from
Feb 14, 2019
Merged

Conversation

agrare
Copy link
Member

@agrare agrare commented Feb 13, 2019

@agrare agrare force-pushed the fixes_for_host_switches branch 2 times, most recently from 68b68f3 to 291e9bb Compare February 13, 2019 21:37
@agrare agrare force-pushed the fixes_for_host_switches branch from 291e9bb to beb2768 Compare February 13, 2019 21:55
@miq-bot
Copy link
Member

miq-bot commented Feb 13, 2019

Checked commits agrare/manageiq-providers-ovirt@ea5648c~...beb2768 with ruby 2.3.3, rubocop 0.52.1, haml-lint 0.20.0, and yamllint 1.10.0
5 files checked, 0 offenses detected
Everything looks fine. 🍪

Copy link
Contributor

@borod108 borod108 left a comment

Choose a reason for hiding this comment

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

Can you please explain a little what happened here? Also the NetworkCollection was related to the ovn was it not?

@agrare
Copy link
Member Author

agrare commented Feb 14, 2019

Can you please explain a little what happened here

Right so couple of things here,

  1. We're updating core refresh to save host_switches as a separate collection similar to host_storages, this is because there isn't a way to infer the switches when dealing with shared/distributed switches (https://github.com/ManageIQ/manageiq/pull/18427/files#diff-50f9feed046a3410ac5531492059a6fbR324)
  2. The addition of host_id to switches (Add missing ems_id to switch manageiq-schema#232 which was a dependency of Update host switch association manageiq#18427) allows us to fix graph refresh's handling of switches. We basically never deleted switches when using graph refresh because the associations had no :dependent => :destroy

Also the NetworkCollection was related to the ovn was it not?

Maybe? Using just the :uid_ems to lookup the switch which is really bad and leads to linking up completely unrelated inventory (like what happened recently with clusters/resource pools).

If using the uid_ems was so that it would find switches from another EMS we'll need to revisit that, probably scoping to the network manager for the specific infra_manager.

The existing graph refresh handling of switches was known to be broken (see this TODO https://github.com/ManageIQ/manageiq/pull/18427/files#diff-8c72a69b69e5a71cc8352d65d78b60b6L210) so hopefully we weren't depending on that behavior here. /cc @Ladas

@agrare
Copy link
Member Author

agrare commented Feb 14, 2019

Also the NetworkCollection was related to the ovn was it not?

Looking into this a bit further I don't see how the ManageIQ::Providers::Redhat::Inventory::Persister::Definitions::InfraGroup::NetworksCollections is used by the ManageIQ::Providers::Redhat::NetworkManager (assuming that is what you mean by OVN). It added the Switch inventory collection and the OpenStack NetworkManager doesn't save switches at all so I think we're good there.

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

@agrare agrare closed this Feb 14, 2019
@agrare agrare reopened this Feb 14, 2019
@gtanzillo gtanzillo added this to the Sprint 105 Ending Feb 18, 2019 milestone Feb 14, 2019
@gtanzillo gtanzillo merged commit 406c1f7 into ManageIQ:master Feb 14, 2019
@agrare agrare deleted the fixes_for_host_switches branch February 14, 2019 23:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants