-
Notifications
You must be signed in to change notification settings - Fork 898
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
[Rearch] Combine worker messages 'sync_config' and sync_active_role' into a single 'sync_config' message. #15597
[Rearch] Combine worker messages 'sync_config' and sync_active_role' into a single 'sync_config' message. #15597
Conversation
Marking as WIP because of the TODOs and because of the discussion we had |
app/models/miq_worker/runner.rb
Outdated
_log.info("#{log_prefix} Synchronizing active roles...") | ||
opts = _args.extract_options! | ||
sync_active_roles(opts[:roles]) | ||
_log.info("#{log_prefix} Synchronizing active roles complete...") |
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.
As discussed, let's just move this into the sync_config method itself (or perhaps let's just merge the two methods into message_sync_config and get rid of sync_config itself.
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.
Also, please verify the order of when sync_active_roles should be called with respect to reloading the config
6d8b07d
to
84696b0
Compare
…ngle 'sync_config' message. Preparing for running workers in pods, we won't be able to pass messages to workers over a Drb connection. Combining the messages into one that does both every time will simplify the implementation when we use a different mechanism.
…to `sync_config` method Removed all callers of `sync_active_roles`
This pull request is not mergeable. Please rebase and repush. |
84696b0
to
c801bdb
Compare
@Fryguy This one is ready to go. I did a lot of testing with this and determined that it doesn't really matter what order the roles and config are synchronized. I left it with the roles going first followed by the config because that's the order it was originally done when both things needed synchronization. |
Checked commits gtanzillo/manageiq@580b0ab~...c801bdb with ruby 2.2.6, rubocop 0.47.1, and haml-lint 0.20.0 |
Preparing for running workers in pods, we won't be able to pass messages to workers over a Drb connection. Combining
the messages into one that does both every time will simplify the implementation when we use a different mechanism.
In this case, we can simplify the logic in #15471 where memcached is new mechanism
/cc @Fryguy