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

Don't delegate NetworkManager#zone to parent_manager #886

Merged
merged 1 commit into from
Sep 26, 2023

Conversation

agrare
Copy link
Member

@agrare agrare commented Sep 26, 2023

The zone_id is synchronized when the parent_manager is saved so this delegation causes issues with pausing the parent provider

#885
https://github.com/ManageIQ/manageiq/actions/runs/6306276756/job/17121144898#step:8:353

The zone_id is synchronized when the parent_manager is saved so this
delegation causes issues with pausing the parent provider
@agrare agrare added the bug label Sep 26, 2023
@agrare agrare requested a review from Fryguy as a code owner September 26, 2023 16:07
@@ -19,7 +19,6 @@ class ManageIQ::Providers::Vmware::NetworkManager < ManageIQ::Providers::Network
:authentication_status_ok?,
:authentications,
:authentication_for_summary,
:zone,
Copy link
Member

Choose a reason for hiding this comment

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

Was zone included here for a valid reason? I'm curious why it was delegated in the first place.

Copy link
Member

Choose a reason for hiding this comment

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

some places we use zone and other places we use zone_id

we tried to replicate the zone across from parent to child, but the autosave makes it a little tricky

Copy link
Member Author

Choose a reason for hiding this comment

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

This is how we handled keeping zone "in sync" with the parent manager originally, but we found that (specifically in the per_ems_worker_mixin code) doing ExtManagementSystem.where(:zone => my_zone) these were not picked up.

We now have callbacks that set child.zone_id = zone_id when the cloud_manager is updated.

@miq-bot
Copy link
Member

miq-bot commented Sep 26, 2023

Checked commit agrare@27e9f72 with ruby 2.6.10, rubocop 1.28.2, haml-lint 0.35.0, and yamllint
1 file checked, 0 offenses detected
Everything looks fine. 👍

@kbrock kbrock self-assigned this Sep 26, 2023
@kbrock kbrock merged commit 3b87893 into ManageIQ:master Sep 26, 2023
3 checks passed
@agrare agrare deleted the dont_delegate_zone_to_parent branch September 26, 2023 16:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants