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

[WIP] Move MiqWorker record creation out of run_single_worker.rb on podified #23110

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

agrare
Copy link
Member

@agrare agrare commented Jul 25, 2024

On a podified environment we cannot pass a unique GUID to a worker due to how the environment is defined by the deployment (all replicas have to have the same environment).

We worked around this by creating the MiqWorker record in the pod once it starts up which allows us to create a record with a unique GUID.

This is an issue however for non-rails/ruby workers which don't use run_single_worker.rb, resulting in a pod running with not MiqWorker record created at all.

The goal here is to move creating the worker record into MiqServer for all platform types (kubernetes, systemd, and process).

TODO:

  • Create a worker record on podified when starting the worker
  • Update run_single_worker to not create/update the worker record
  • Update MiqWorker::Runner to be able to lookup a worker record by system_uid not GUID
  • Update MiqServer::WorkerManagement::Kubernetes to link up worker records without a system_uid
  • Do we need to create MiqWorker records in development when running run_single_worker.rb directly?

Depends on:

Fixes ManageIQ/manageiq-providers-embedded_terraform#67

@jrafanie
Copy link
Member

FYI, #23109 is merged

@agrare agrare force-pushed the miq_server_worker_management_podified_worker_creation branch 2 times, most recently from d33aeb0 to b6315a5 Compare July 30, 2024 19:44
@agrare agrare force-pushed the miq_server_worker_management_podified_worker_creation branch from b6315a5 to 4b54858 Compare August 22, 2024 17:03
@miq-bot
Copy link
Member

miq-bot commented Aug 22, 2024

Checked commits agrare/manageiq@c2f60ff~...4b54858 with ruby 3.1.5, rubocop 1.56.3, haml-lint 0.51.0, and yamllint
4 files checked, 3 offenses detected

lib/workers/bin/run_single_worker.rb

@miq-bot
Copy link
Member

miq-bot commented Nov 25, 2024

This pull request has been automatically marked as stale because it has not been updated for at least 3 months.

If these changes are still valid, please remove the stale label, make any changes requested by reviewers (if any), and ensure that this issue is being looked at by the assigned/reviewer(s).

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.

OpentofuWorker not restarted after changing settings on podified
3 participants