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

RHEL-10: Redirect only GLib loggers to Journal #6005

Open
wants to merge 6 commits into
base: rhel-10
Choose a base branch
from

Conversation

jkonecny12
Copy link
Member

Previously we redirected all output from the main Anaconda process to Journal to avoid GTK log messages (as GTK runs in the main process) from spamming TTY. Turns out this broke a couple things, such as the shell prompt in rescue mode.

So drop the wholesale process output redirection and instead just redirect (hopefully) all GLib based loggers (used by GTK) to Journal.

Backport of:

Resolves: RHEL-58834

@jkonecny12
Copy link
Member Author

/kickstart-test --testtype smoke

@jkonecny12
Copy link
Member Author

/kickstart-test ui_rdp

@jkonecny12
Copy link
Member Author

/kickstart-test --testtype coverage

@jkonecny12
Copy link
Member Author

Tested and works correctly.

Copy link
Contributor

@M4rtinK M4rtinK left a comment

Choose a reason for hiding this comment

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

Looks good to me code wise! :)

BTW, looks like first two commits don't have RHEL issue references - that should be fixed to avoid breakage at release time. :)

jkonecny12 and others added 6 commits November 20, 2024 11:58
We redirect all the error messages from stderr to journal in the main
Anaconda process. This is mainly covering errors and warnings from
GTK UI.

However, this code returns FileNotFound on systems which don't have
journal enabled.

To fix this move this code under our existing logic for logging to
journal which is enabled only on HW installations.

(cherry picked from commit c9f931f)

Related: RHEL-58834
On my previous commit
c9f931f
I forgot this part :(

Without it, the stderr is still redirected to journal all the time.

(cherry picked from commit 58a47cc)

Related: RHEL-58834
Previously we redirected all output from the main Anaconda process
to Journal to avoid GTK log messages (as GTK runs in the main process)
from spamming TTY. Turns out this broke a couple things, such as the
shell prompt in rescue mode.

So drop the wholesale process output redirection and instead just
redirect (hopefully) all GLib based loggers (used by GTK) to Journal.

Related: RHEL-58834
(cherry picked from commit 6fa0ee4)
This place is used for all GLib imports to avoid gi.require import
across the code base.

Related: RHEL-58834
(cherry picked from commit 310a6c3)
This is not required because we solve that on level of LogHandler which
is used in this solution.

Related: RHEL-58834
(cherry picked from commit 78b9127)
Do not ignore log levels from GLib when redirecting these logs to our
logs.

Related: RHEL-58834
(cherry picked from commit 1b14639)
@jkonecny12 jkonecny12 force-pushed the rhel-10-backport-redirect-glib-to-journal branch from 8b8c949 to 37bd1a2 Compare November 20, 2024 10:59
@jkonecny12
Copy link
Member Author

Good point. Thanks for spotting this!

@jkonecny12
Copy link
Member Author

/kickstart-test --testtype smoke

@jkonecny12
Copy link
Member Author

/kickstart-test --testtype coverage

@jkonecny12 jkonecny12 added the ready to merge The PR can be merged. It should have all BZ flags required for releasing set (usually release+). label Nov 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready to merge The PR can be merged. It should have all BZ flags required for releasing set (usually release+). rhel-10
Development

Successfully merging this pull request may close these issues.

2 participants