Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
This bug was initially created as a copy of Bug #2092273
I am copying this bug because:
Also applies
Description of problem:
We have a customer noticing that the /boot/grub2/grubenv file is getting modified continuously, which raises an alert when executing aide monitoring tool (https://aide.github.io/).
This happens because every time a user logs in and has a session living for more than 2 minutes, the user's grub-boot-success.timer elapses, causing grub-boot-success.service unit to write "boot_success=1" into /boot/grub2/grubenv.
I have several concerns about this feature and the current implementation.
Regarding the feature itself, I understand the idea behind this is to automatically boot on the previous kernel if the newer kernel fails to boot several times in a row.
On RHEL, this doesn't work for many reason:
1. usually the latest kernel fails to boot because the initramfs is broken, which leads to a kernel panic and system sitting there
2. assuming kernel and initramfs boot fine, if the system fails after switch root, it's expected to fail whatever the booted kernel is
3. the feature is not enabled by default since its implementation inside grub.cfg relies on a "boot_counter" variable which isn't set
4. the implementation inside grub.cfg assumes the second menu entry will boot better, which is far from being true: on customer systems it's not rare that kernel updates are performed but no reboot is made in-between, waiting for a "reboot window"
5. it's unclear when a RHEL system should be considered as "booted fine": many systems are acting as services only (e.g. database server) with no user except root connecting to the system
Regarding the implementaion (the grub-boot-success.timer/grub-boot-success.service units) itself, it doesn't work on RHEL in many cases:
1. when there is only a root user accessing the system (because "ConditionUser=!@system" doesn't evaluate to true when uid is 0)
2. if other users are not using the "systemd --user" service, which is usually what we recommend and will be the default in some future for non-graphical installations
3. when users use "lingering" (i.e. starting "systemd --user" service at boot without actually logging into the system): the "boot_success=1" flag will be automatically set after 2 minutes even if users cannot effectively log in
4. there may be a race if 2 users log in concurrently: after 2 minutes, both grub-boot-success.service units will execute concurrently, which may break the grubenv file content if no proper locking is performed (I didn't check the code to confirm/infirm this)
For all these reasons and many more, I think this functionality is not wished on RHEL at all, it may bring more trouble than what it tries to solve.
For sure, if we decide to continue with this, the implementation needs to be enhanced.
Version-Release number of selected component (if applicable):
grub2-tools-minimal since RHEL8
How reproducible:
N/A
Comment 1Marta Lewandowska
2023-03-20 10:06:45 UTC
Comment 3RHEL Program Management
2023-09-16 13:24:41 UTC
Issue migration from Bugzilla to Jira is in process at this time. This will be the last message in Jira copied from the Bugzilla bug.
Comment 4RHEL Program Management
2023-09-16 13:27:48 UTC
This BZ has been automatically migrated to the issues.redhat.com Red Hat Issue Tracker. All future work related to this report will be managed there.
Due to differences in account names between systems, some fields were not replicated. Be sure to add yourself to Jira issue's "Watchers" field to continue receiving updates and add others to the "Need Info From" field to continue requesting information.
To find the migrated issue, look in the "Links" section for a direct link to the new issue location. The issue key will have an icon of 2 footprints next to it, and begin with "RHEL-" followed by an integer. You can also find this issue by visiting https://issues.redhat.com/issues/?jql= and searching the "Bugzilla Bug" field for this BZ's number, e.g. a search like:
"Bugzilla Bug" = 1234567
In the event you have trouble locating or viewing this issue, you can file an issue by sending mail to rh-issues. You can also visit https://access.redhat.com/articles/7032570 for general account information.