Bug 2082295
Summary: | dnf needs-restart does not work well on systems without a hardware clock | ||
---|---|---|---|
Product: | Red Hat Enterprise Linux 8 | Reporter: | alex |
Component: | dnf-plugins-core | Assignee: | Nicola Sella <nsella> |
Status: | CLOSED WONTFIX | QA Contact: | swm-qe |
Severity: | low | Docs Contact: | |
Priority: | unspecified | ||
Version: | CentOS Stream | CC: | bstinson, james.antill, jwboyer, nsella |
Target Milestone: | rc | Keywords: | Triaged |
Target Release: | --- | ||
Hardware: | aarch64 | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | If docs needed, set a value | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2022-05-18 14:56:16 UTC | Type: | Bug |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
alex
2022-05-05 18:18:50 UTC
Hello, the issue seems too specific. To solve it, my suggestion would be to create a specific patch in downstream RockyLinux or releasing a dnf plugin that fixes it. Currently, the team will not have enough capacity to target a case like this, so, I will close it. However, if you have a patch and would like to make a change upstream, please don't hesitate to submit a PR, and we will be more than happy to include the fix upstream. Thank you. > However, if you have a patch and would like to make a change upstream, please don't hesitate to submit a PR, and we will be more than happy to include the fix upstream. Just to be clear on this, if I submit a PR on GH to this file: https://github.com/rpm-software-management/dnf-plugins-core/blob/master/plugins/needs_restarting.py#L202 Changing it so that it calculates the boot time in a different way (my intention could be to look at how uptime does it, which works correctly)... Would it be feasible for such PR to make it to RHEL 8? Could I know what should happen in order for this to reach RHEL *8*? Unfortunately, uptime does not work well with containers and virtual machines. Generally, I would say that the first IF with needs-restarting code, is to understand where dnf is running, and that's not an easy task. If you are outside a vm, that's easy and uptime works. Inside a vm... eeh. That's why I believe that a plugin would be more appropriate. It can solve a specific case without impacting on all RHEL customers (this line broke quite some stuff). Other bugs that are targeting similar issues are: https://bugzilla.redhat.com/show_bug.cgi?id=1914251 https://bugzilla.redhat.com/show_bug.cgi?id=1960437 The line is correct, and if you want more details about it and work on a PR, I could also help you on dnf's IRC. BTW, if anyone is curious, it seems this was solved later here https://bugzilla.redhat.com/show_bug.cgi?id=2137935 , and it has been included in EL9: https://gitlab.com/redhat/centos-stream/rpms/dnf-plugins-core/-/blob/c9s/0006-Fix-boot-time-derivation-for-systems-with-no-rtc.patch?ref_type=heads , but not in EL8. So if anyone finds this by googling, likely updating to EL9 solves the issue. |