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

Run MiqServer.status_update in server process #20904

Conversation

jrafanie
Copy link
Member

Fixes #20835
[Errno::ESRCH]: No such process ... when run from a worker.

In appliance/systemd, you can run status_update in the server's workers.
In podified, each process is isolated so we must run this, specifically
process_status, in the server process.

It didn't make sense to run this is in the worker processes anyway so
change all installations to run this in the server process.

Note, I'm looking at the surrounding lines in this file and seeing that we're logging stuff in random generic/priority workers and much of it doesn't make sense in pods or even appliances... I'll add :queue_name => 'miq_server' to them in a followup as they're not BROKEN but just weird. I'll keep this separate since it's broken and more backportable.

@jrafanie jrafanie force-pushed the run_miq_server_status_update_in_server_process branch from 1c3d8a7 to 1b1aa03 Compare December 18, 2020 17:43
@jrafanie jrafanie marked this pull request as ready for review December 18, 2020 17:44
@jrafanie
Copy link
Member Author

jrafanie commented Dec 18, 2020

@agrare I have a followup I'm working on to do the same for other logging here. While this other logging is in the same place, it doesn't blow up so I though it's better to keep it separate so this surgical fix is easy to backport. The other logging is just convenient to be logged in the server/orchestrator process in pods since you don't have mixed server/worker processes logging to the same file.

EDIT: PR: #20909

Fixes ManageIQ#20835
[Errno::ESRCH]: No such process ... when run from a worker.

In appliance/systemd, you can run status_update in the server's workers.
In podified, each process is isolated so we must run this, specifically
process_status, in the server process.

It didn't make sense to run this is in the worker processes anyway so
change all installations to run this in the server process.
@jrafanie jrafanie force-pushed the run_miq_server_status_update_in_server_process branch from 1b1aa03 to e2018db Compare December 18, 2020 17:49
@miq-bot
Copy link
Member

miq-bot commented Dec 18, 2020

Checked commit jrafanie@e2018db with ruby 2.6.3, rubocop 0.82.0, haml-lint 0.35.0, and yamllint
2 files checked, 0 offenses detected
Everything looks fine. ⭐

jrafanie added a commit to jrafanie/manageiq that referenced this pull request Dec 18, 2020
In appliances it doesn't matter since the evm.log is the used by all
of the processes with the same server guid, but in podified, these
processes are isolated and logging is all over the place.

It's more convenient to log this in the server process.

Followup to ManageIQ#20904
Copy link
Member

@agrare agrare left a comment

Choose a reason for hiding this comment

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

👍 LGTM

@agrare agrare merged commit e7297f0 into ManageIQ:master Dec 18, 2020
@jrafanie jrafanie deleted the run_miq_server_status_update_in_server_process branch December 18, 2020 21:14
jrafanie added a commit to jrafanie/manageiq that referenced this pull request Dec 18, 2020
In appliances it doesn't matter since the evm.log is the used by all
of the processes with the same server guid, but in podified, these
processes are isolated and logging is all over the place.

It's more convenient to log this in the server process.

Followup to ManageIQ#20904
jrafanie added a commit to jrafanie/manageiq that referenced this pull request Dec 18, 2020
This change benefits pods by having this logging all in the same log file,
like appliances, by making the same server process log these messages.
This doesn't affect  appliances much but will make finding these log
message much easier in pods.

Followup to ManageIQ#20904
simaishi pushed a commit that referenced this pull request Jan 7, 2021
…in_server_process

Run MiqServer.status_update in server process

(cherry picked from commit e7297f0)
@simaishi
Copy link
Contributor

simaishi commented Jan 7, 2021

Kasparov backport details:

$ git log -1
commit 160f72da0454a1bb918a7536503db28b401f7251
Author: Adam Grare <agrare@redhat.com>
Date:   Fri Dec 18 14:42:51 2020 -0500

    Merge pull request #20904 from jrafanie/run_miq_server_status_update_in_server_process

    Run MiqServer.status_update in server process

    (cherry picked from commit e7297f0af20879f0a8da63ec49bda8a588bdedad)

simaishi pushed a commit that referenced this pull request Jan 7, 2021
…in_server_process

Run MiqServer.status_update in server process

(cherry picked from commit e7297f0)
@simaishi
Copy link
Contributor

simaishi commented Jan 7, 2021

Jansa backport details:

$ git log -1
commit 7b1de2f8a8af859e016624dfd6731cd85b10f9a6
Author: Adam Grare <agrare@redhat.com>
Date:   Fri Dec 18 14:42:51 2020 -0500

    Merge pull request #20904 from jrafanie/run_miq_server_status_update_in_server_process

    Run MiqServer.status_update in server process

    (cherry picked from commit e7297f0af20879f0a8da63ec49bda8a588bdedad)

kbrock pushed a commit to kbrock/manageiq that referenced this pull request Jan 27, 2021
This change benefits pods by having this logging all in the same log file,
like appliances, by making the same server process log these messages.
This doesn't affect  appliances much but will make finding these log
message much easier in pods.

Followup to ManageIQ#20904
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.

Scheduled MiqServer.status_update fails on Podified
5 participants