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.
Bug 2042772 - RFE: recognize "auto_reset_crashkernel" in /etc/kdump.conf
Summary: RFE: recognize "auto_reset_crashkernel" in /etc/kdump.conf
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 9
Classification: Red Hat
Component: augeas
Version: 9.0
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: rc
: ---
Assignee: Laszlo Ersek
QA Contact: YongkuiGuo
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-01-20 05:58 UTC by YongkuiGuo
Modified: 2022-11-15 10:58 UTC (History)
4 users (show)

Fixed In Version: augeas-1.13.0-2.el9
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2022-11-15 10:11:04 UTC
Type: Feature Request
Target Upstream Version:
Embargoed:
pm-rhel: mirror+


Attachments (Terms of Use)
/etc/kdump.conf (8.68 KB, text/plain)
2022-01-20 05:58 UTC, YongkuiGuo
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 1895258 1 None None None 2023-09-03 14:58:19 UTC
Red Hat Issue Tracker RHELPLAN-108862 0 None None None 2022-01-20 06:01:16 UTC
Red Hat Product Errata RHBA-2022:8017 0 None None None 2022-11-15 10:11:05 UTC

Description YongkuiGuo 2022-01-20 05:58:42 UTC
Created attachment 1852075 [details]
/etc/kdump.conf

Description of problem:
augeas fails to parse /etc/kdump.conf file in RHEL-9.0.0-20220118.2 compose. The next new line is added into /etc/kdump.conf file which causes this issue.
# cat /etc/kdump.conf
...
auto_reset_crashkernel yes
...



Version-Release number of selected component (if applicable):
augeas-1.13.0-1.el9.x86_64
kernel-5.14.0-44.el9.x86_64
kexec-tools-2.0.23-5.el9.x86_64

How reproducible:
100%


Steps:

1. On rhel9 host with RHEL-9.0.0-20220118.2 compose
# augtool print /files/etc/kdump.conf

There is no output.


2.
# augtool print /augeas//error | grep kdump.conf
/augeas/files/etc/kdump.conf/error = "parse_failed"
/augeas/files/etc/kdump.conf/error/pos = "8436"
/augeas/files/etc/kdump.conf/error/line = "179"
/augeas/files/etc/kdump.conf/error/char = "0"
/augeas/files/etc/kdump.conf/error/lens = "/usr/share/augeas/lenses/dist/kdump.aug:79.10-.39:"
/augeas/files/etc/kdump.conf/error/lens/last_matched = "/usr/share/augeas/lenses/dist/kdump.aug:38.23-.33:"
/augeas/files/etc/kdump.conf/error/message = "Iterated lens matched less than it should"


Actual results:
As above

Expected results:
augeas can parse /etc/kdump.conf file.

Additional info:

Comment 1 Laszlo Ersek 2022-01-20 13:21:10 UTC
This is not a regression, but a feature request for augeas.

The "auto_reset_crashkernel" keyword was introduced in the following kexec-tools patch set:

[PATCH v5 00/13] crashkernel=auto: support fadump and remove crashkernel.default
https://lists.fedoraproject.org/archives/list/kexec@lists.fedoraproject.org/thread/V5WPTRAPJR65QXSTNW6W6E7ZBAUCQNUH/#V5WPTRAPJR65QXSTNW6W6E7ZBAUCQNUH

Related upstream commit:
https://src.fedoraproject.org/rpms/kexec-tools/c/73ced7f451a72

Ported to RHEL9 in the following dist-git commit (on the rhel-9.0.0 branch):
7ac560ef9ba0 ("introduce the auto_reset_crashkernel option to kdump.conf", 2022-01-06)

Part of build kexec-tools-2.0.23-4.el9.

Related RHEL9 bug: BZ#1895258

Comment 2 Klaus Heinrich Kiwi 2022-01-21 12:42:57 UTC
(In reply to Laszlo Ersek from comment #1)
> This is not a regression, but a feature request for augeas.
> 

ack, but what is the actual impact to augeas users / dependent packages (v2v?). Would the effort to add this support to augeas justify it?

Comment 3 Laszlo Ersek 2022-01-21 15:19:42 UTC
(In reply to Klaus Heinrich Kiwi from comment #2)
> (In reply to Laszlo Ersek from comment #1)
> > This is not a regression, but a feature request for augeas.
> > 
> 
> ack, but what is the actual impact to augeas users / dependent packages
> (v2v?).

The *result* is certainly a regression.

The augeas "lens" in question stops parsing the kdump.conf file as soon as it finds an unknown entry. Therefore *any* newly introduced keyword in kdump.conf, without prior coordination with the augeas and virt-v2v developers, will result in a regression for end-users. In other words, the new feature in kexec-tools caused the regression.

> Would the effort to add this support to augeas justify it?

I don't understand this question. Either the kexec-tools change must be backed out, or the missing part of the end-to-end feature (the augeas lens update namely) must be developed. I didn't mean that this BZ was not urgent, I only meant that, for the augeas component, this is a new feature, not a regression. Thanks!

Comment 5 Laszlo Ersek 2022-03-20 05:58:50 UTC
Apparently "parse this example file in my home dir with this lens" is an insurmountable challenge for augtool.

I need to copy the example file (the attachment from comment#0) to

  tests/root/etc/kdump.conf

so that the "filter" in "lenses/kdump.aug" match, relative to the "tests/root" directory, and then run

  ./src/try cli print /files/etc/kdump.conf

Not over-engineered at all. /s

(I tried the trick described here: <http://blog.alexanderhopgood.com/augeas/augtool/linux/2017/03/12/the-augtool.html>; it didn't work.)

Comment 6 Laszlo Ersek 2022-03-20 06:17:10 UTC
https://github.com/hercules-team/augeas/pull/754

Comment 8 Laszlo Ersek 2022-03-20 06:32:50 UTC
(In reply to Laszlo Ersek from comment #6)
> https://github.com/hercules-team/augeas/pull/754

The CI run (at commit 31dfdc50f018, "Kdump: parse "auto_reset_crashkernel"", 2022-03-20) has succeeded; review pending.

Comment 10 Laszlo Ersek 2022-04-20 08:34:57 UTC
(In reply to Laszlo Ersek from comment #6)
> https://github.com/hercules-team/augeas/pull/754

Merged as upstream commit 288a028da531 ("Kdump: parse "auto_reset_crashkernel" (#754)", 2022-04-20).

Comment 13 YongkuiGuo 2022-04-21 08:11:57 UTC
Test with augeas-1.13.0-2.el9:

Steps:

1. On rhel9.1 host
# augtool print /files/etc/kdump.conf
/files/etc/kdump.conf
...
/files/etc/kdump.conf/auto_reset_crashkernel = "yes"
/files/etc/kdump.conf/path = "/var/crash"
/files/etc/kdump.conf/core_collector = "makedumpfile -l --message-level 7 -d 31"
/files/etc/kdump.conf/#comment[148] = "core_collector scp"
/files/etc/kdump.conf/#comment[149] = "kdump_post /var/crash/scripts/kdump-post.sh"
/files/etc/kdump.conf/#comment[150] = "kdump_pre /var/crash/scripts/kdump-pre.sh"
/files/etc/kdump.conf/#comment[151] = "extra_bins /usr/bin/lftp"
/files/etc/kdump.conf/#comment[152] = "extra_modules gfs2"
/files/etc/kdump.conf/#comment[153] = "failure_action shell"
/files/etc/kdump.conf/#comment[154] = "force_rebuild 1"
/files/etc/kdump.conf/#comment[155] = "force_no_rebuild 1"
/files/etc/kdump.conf/#comment[156] = "dracut_args --omit-drivers \"cfg80211 snd\" --add-drivers \"ext2 ext3\""
/files/etc/kdump.conf/#comment[157] = "fence_kdump_args -p 7410 -f auto -c 0 -i 10"
/files/etc/kdump.conf/#comment[158] = "fence_kdump_nodes node1 node2"

The kdump.conf can be parsed correctly.

Comment 16 YongkuiGuo 2022-07-08 02:56:18 UTC
Verified this bug since the test case for this bug has been automated and passed in the latest nightly compose test.

Comment 18 errata-xmlrpc 2022-11-15 10:11:04 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (augeas bug fix and enhancement update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2022:8017


Note You need to log in before you can comment on or make changes to this bug.