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

webui: send stderr from webui-desktop to a webui-desktop.log file #5233

Merged
merged 1 commit into from
Oct 17, 2023

Conversation

KKoukiou
Copy link
Contributor

@KKoukiou KKoukiou commented Oct 6, 2023

Previously the error logs were swallowed.

@KKoukiou
Copy link
Contributor Author

KKoukiou commented Oct 6, 2023

@jkonecny12 @VladimirSlavik is there a better place to send these to?

@VladimirSlavik
Copy link
Contributor

Thanks! I think this is a good destination.

Please add the file also to the list in exception.py, search for def initExceptionHandling(anaconda): and the rest is self-explanatory.

@KKoukiou
Copy link
Contributor Author

KKoukiou commented Oct 9, 2023

@VladimirSlavik I just realized that if firefix process exits with non 0 exit code, we will get the logs now correctly - but without inst.nokill the machine will shutdown. This is different issue than not getting the logs, but still we are not there yet for a good user experience if firefox crashes.

@M4rtinK
Copy link
Contributor

M4rtinK commented Oct 9, 2023

@VladimirSlavik I just realized that if firefix process exits with non 0 exit code, we will get the logs now correctly - but without inst.nokill the machine will shutdown. This is different issue than not getting the logs, but still we are not there yet for a good user experience if firefox crashes.

Yeah, this is a known issues that we need to fix - basically, due to how Anaconda used to be built, the UI process was considered the main process & shutdown was initiated when it exits. This made sense for the old monolithic single process Anaconda, made much less sense for the modular Anaconda with separate frontend/backend and is totally insane right now when Firefox became the main process!

So what needs to happen is either replace the main process with something sane - like a script or some simple DBus module that we can start and then tell (over DBus/kill via PID ?) to terminate when needed. Alternatively we can take a look at the whole "main process" concept and do it all somehow differently.

@M4rtinK
Copy link
Contributor

M4rtinK commented Oct 9, 2023

@jkonecny12 @VladimirSlavik is there a better place to send these to?

My suggestion would be to also forward them to Journal if possible (and if the messages are not already going there). That makes it much easier to compare with other events happening at the same time. Its also more likely we will get the Journal/syslog dump when debugging user issues than the other files, especially if this is a new log file that might not be known to the various log grabbing tools/filters.

@KKoukiou
Copy link
Contributor Author

KKoukiou commented Oct 10, 2023

@M4rtinK do you have some expectation how I should connect the webui-desktop script's output to the journal? Using systemd-cat with the script? And if yes, what identifier should I use? anaconda?

@M4rtinK
Copy link
Contributor

M4rtinK commented Oct 12, 2023

@M4rtinK do you have some expectation how I should connect the webui-desktop script's output to the journal? Using systemd-cat with the script? And if yes, what identifier should I use? anaconda?

I just checked how we do it in the Initial Setup startup script and we do use systemd-cat:

echo "Starting Initial Setup GUI" | systemd-cat -t initial-setup -p 6

(https://github.com/rhinstaller/initial-setup/blob/master/scripts/run-initial-setup#L21)

This has been in use for years by now, so should be fine to use here as well. As for the identifier I guess we can just use "anaconda" as its Anaconda related and we don't expect other users uses of this script ?

Previously the error logs were swallowed.
@KKoukiou
Copy link
Contributor Author

@M4rtinK since we are going to send the stderr to the journal I don't see the purpose of creating a seperate file.

Here is an illustration how the output looks in the journal (see prefixedf usr/lib/webui-desktop)

Screen Shot 2023-10-12 at 17 47 48

Note: I removed firefox before starting the WebUI to reproduce this issue.

@KKoukiou KKoukiou requested a review from M4rtinK October 12, 2023 15:49
Copy link
Contributor

@VladimirSlavik VladimirSlavik left a comment

Choose a reason for hiding this comment

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

Thank you, even better. Dumping to journal is really the better choice, as one does not have to hunt for all the logs.

@M4rtinK
Copy link
Contributor

M4rtinK commented Oct 17, 2023

@M4rtinK since we are going to send the stderr to the journal I don't see the purpose of creating a seperate file.

Here is an illustration how the output looks in the journal (see prefixedf usr/lib/webui-desktop)

Agreed with just logging to Journal.

Also this looks very good & useful. Already a couple times in the past we had the startup script or Firefox crashing ant there was just nothing visible in the Journal. :P

This might also very well help me during the ongoing debugging of Halflines no-root Firefox PR. :)

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 as well, thanks! :)

@KKoukiou
Copy link
Contributor Author

/kickstart-test --waive webui only

@KKoukiou KKoukiou merged commit 98f01f4 into rhinstaller:master Oct 17, 2023
17 checks passed
@KKoukiou KKoukiou deleted the webui-desktop-stderr branch October 17, 2023 15:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

3 participants