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

OpentofuWorker not restarted after changing settings on podified #67

Closed
agrare opened this issue Jul 19, 2024 · 0 comments · Fixed by ManageIQ/manageiq#23112 or #68 · May be fixed by ManageIQ/manageiq#23110
Closed

OpentofuWorker not restarted after changing settings on podified #67

agrare opened this issue Jul 19, 2024 · 0 comments · Fixed by ManageIQ/manageiq#23112 or #68 · May be fixed by ManageIQ/manageiq#23110
Assignees
Labels
bug Something isn't working

Comments

@agrare
Copy link
Member

agrare commented Jul 19, 2024

If you change a worker setting for the opentofu_worker it is supposed to be restarted in order to pick up the new value
image

On appliances a MiqServer.reload_settings message is queued and the settings are detected correctly as changed and the worker is restarted.

On podified there is no OpentofuWorker record created in the MiqWorker table so the orchestrator doesn't know to restart it.

Looking at the orchestrator logs it tries to start the worker every 10 seconds:

MIQ(OpentofuWorker.sync_workers) Workers are being synchronized: Current #: [0], Desired #: [1]
MIQ(ContainerOrchestrator#patch_deployment) deployment_name: 1-opentofu-runner, data: {:spec=>{:replicas=>1}}
MIQ(MiqQueue.put) Message id: [1194934], Zone: [default], Role: [], Server: [], MiqTask id: [], Handler id: [], Ident: [generic], Target id: [], Instance id: [], Task   id: [], Command: [MiqEvent.raise_evm_event], Timeout: [600], Priority: [100], State: [ready], Deliver On: [], Data: [], Args: [[\"MiqServer\", 1], \"evm_worker_start\", {:event_details=>\"Worker started: ID [], PID [], GUID [9f79b116-8273-45fc-9efa-3288751fe873]\", :type=>\"OpentofuWorker\"}]
MIQ(OpentofuWorker#start) Worker started: ID [], PID [], GUID [9f79b116-8273-45fc-9efa-3288751fe873]
MIQ(MiqServer#heartbeat) Heartbeat [2024-07-19 12:56:02 UTC]...
MIQ(MiqServer#heartbeat) Heartbeat [2024-07-19 12:56:02 UTC]...Complete
MIQ(OpentofuWorker.sync_workers) Workers are being synchronized: Current #: [0], Desired #: [1]
irb(main):003:0> OpentofuWorker.count
=> 0
$ oc get pods | grep opentofu
1-opentofu-runner-5c976747bf-njq2s                                1/1     Running     0               28h

On podified MiqWorker records are created by the run_single_worker script due to how replicas work on kubernetes. The OpentofuWorker is a non-ruby worker and doesn't use this entrypoint which means no MiqWorker ever gets created.

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