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

Prevent DNF from terminating on a terminal loss #2111

Open
ppisar opened this issue Jul 19, 2024 · 1 comment
Open

Prevent DNF from terminating on a terminal loss #2111

ppisar opened this issue Jul 19, 2024 · 1 comment
Labels
Priority:LOW RFE Request for Enhancement (as opposed to a bug) triaged

Comments

@ppisar
Copy link
Contributor

ppisar commented Jul 19, 2024

If DNF losses a terminal, e.g. when an SSH session aborts, DNF is receives SIGHUP from kernel and terminates according to a default disposition for SIGUP. If DNF is running an RPM transaction at that time, the transaction crashes leaving RPM database in undefined state.

While this is not technically a DNF problem (this is how all processes behave in UNIX world) and it can be prevented by a user proactively running DNF in a terminal multiplexor (e.g. screen, tmux), it's good idea to make DNF more resilient if possible.

One approach is ignoring SIGHUP signal, or detaching from the terminal before commencing the RPM transaction. This is a feature request to enhance DNF in this way. Reporting DNF progress to the current terminal needs to be preserved.

When implementing this feature it would be great to verify that concurrently running DNF is correctly prevented from changing DNF and RPM databases.

As a stretch goal, it would be great to enhance error message about concurrently running DNF that the user can watch its progress in DNF log, or the later DNF instance could present /var/log/dnf.log content to the output. (A more stretching goal would be storing DNF output to a separate log file and replying it to a terminal instead of the /var/log/dnf.log.)

@ppisar ppisar added triaged Priority:LOW RFE Request for Enhancement (as opposed to a bug) labels Jul 19, 2024
@ppisar ppisar added this to DNF team Jul 19, 2024
@github-project-automation github-project-automation bot moved this to Backlog in DNF team Jul 19, 2024
@jan-kolarik
Copy link
Member

Seems related to https://issues.redhat.com/browse/RHEL-1235.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Priority:LOW RFE Request for Enhancement (as opposed to a bug) triaged
Projects
Status: Backlog
Development

No branches or pull requests

2 participants