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 1769314 - "+" character on kernel line in grub.conf causes augeas to fail to parse the file
Summary: "+" character on kernel line in grub.conf causes augeas to fail to parse the ...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: augeas
Version: 8.1
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: rc
: 8.2
Assignee: Pino Toscano
QA Contact: YongkuiGuo
URL:
Whiteboard: V2V
Depends On: 1758357
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-11-06 11:18 UTC by Pino Toscano
Modified: 2020-04-28 16:49 UTC (History)
8 users (show)

Fixed In Version: augeas-1.12.0-3.el8
Doc Type: If docs needed, set a value
Doc Text:
Clone Of: 1758357
Environment:
Last Closed: 2020-04-28 16:49:27 UTC
Type: Bug
Target Upstream Version:
Embargoed:
pm-rhel: mirror+


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github hercules-team augeas pull 647 0 'None' closed Grub: support '+' in kernel command line option names 2020-04-08 06:00:27 UTC
Red Hat Product Errata RHBA-2020:1824 0 None None None 2020-04-28 16:49:37 UTC

Description Pino Toscano 2019-11-06 11:18:43 UTC
+++ This bug was initially created as a clone of Bug #1758357 +++

Description of problem:

Customer is unable to import a VMware VM. 
The error in the import log says :

virt-v2v: error: no kernels were found in the bootloader configuration.



libguestfs: trace: v2v: aug_get = "Get did not match entire input"
augeas failed to parse /boot/grub/grub.conf:
 error "Get did not match entire input" at line 15 char 0 in lens /usr/share/augeas/lenses/dist/grub.aug:286.14-287.43:
augeas failed to parse /boot/grub/menu.lst:
 error "Get did not match entire input" at line 15 char 0 in lens /usr/share/augeas/lenses/dist/grub.aug:286.14-287.43:
augeas failed to parse /etc/grub.conf:
 error "Get did not match entire input" at line 1 char 0 in lens /usr/share/augeas/lenses/dist/grub.aug:286.14-287.43:
augeas failed to parse /etc/host.conf:
 error "Iterated lens matched less than it should" at line 11 char 11 in lens /usr/share/augeas/lenses/dist/host_conf.aug:66.10-.48:
augeas failed to parse /etc/inputrc:
 error "Syntax error" at line 114 char 0 in lens /usr/share/augeas/lenses/dist/inputrc.aug:52.10-.69:
augeas failed to parse /etc/modprobe.conf:
 error "Iterated lens matched less than it should" at line 308 char 0 in lens /usr/share/augeas/lenses/dist/modprobe.aug:103.10-.32:
augeas failed to parse /etc/modprobe.d/unsupported-modules:
 error "Iterated lens matched less than it should" at line 10 char 0 in lens /usr/share/augeas/lenses/dist/modprobe.aug:103.10-.32:
augeas failed to parse /etc/ntp.conf:
 error "Iterated lens matched less than it should" at line 4 char 7 in lens /usr/share/augeas/lenses/dist/ntp.aug:126.14-129.45:
augeas failed to parse /etc/samba/smbusers:
 error "Iterated lens matched less than it should" at line 11 char 0 in lens /usr/share/augeas/lenses/dist/smbusers.aug:28.10-.46:
augeas failed to parse /etc/sysconfig/network/if-down.d/ndp-proxy:
 error "Syntax error" at line 58 char 27 in lens /usr/share/augeas/lenses/dist/shellvars.aug:194.12-.60:
augeas failed to parse /etc/sysconfig/network/if-up.d/SuSEfirewall2:
 error "Syntax error" at line 22 char 3 in lens /usr/share/augeas/lenses/dist/shellvars.aug:194.12-.60:
augeas failed to parse /etc/sysconfig/network/if-up.d/ndp-proxy:
 error "Syntax error" at line 58 char 27 in lens /usr/share/augeas/lenses/dist/shellvars.aug:194.12-.60:
augeas failed to parse /etc/sysconfig/network/ifroute-lo:
 error "Syntax error" at line 4 char 3 in lens /usr/share/augeas/lenses/dist/shellvars.aug:194.12-.60:
libguestfs: trace: v2v: glob_expand "/var/lib/rpm/__db.00?"

Version-Release number of selected component (if applicable):

augeas-1.4.0-6.el7_6.1.x86_64


Attached the import.log and grub.conf for reference

--- Additional comment from Richard W.M. Jones on 2019-10-04 00:15:15 CEST ---

Reproducer:

$ mkdir -p /var/tmp/root/etc                                                
$ cp grub.conf /var/tmp/root/etc                                            
$ augtool -r /var/tmp/root                                                  
augtool> get /augeas/files/etc/grub.conf/error/message                      
/augeas/files/etc/grub.conf/error/message = Get did not match entire input
augtool> get /augeas/files/etc/grub.conf/error/line                         
/augeas/files/etc/grub.conf/error/line = 15

The problem is caused by the "+" character on line 15.

--- Additional comment from Pino Toscano on 2019-10-07 13:46:49 CEST ---

(In reply to Richard W.M. Jones from comment #4)
> Reproducer:
> 
> $ mkdir -p /var/tmp/root/etc                                                
> $ cp grub.conf /var/tmp/root/etc                                            
> $ augtool -r /var/tmp/root                                                  
> augtool> get /augeas/files/etc/grub.conf/error/message                      
> /augeas/files/etc/grub.conf/error/message = Get did not match entire input
> augtool> get /augeas/files/etc/grub.conf/error/line                         
> /augeas/files/etc/grub.conf/error/line = 15
> 
> The problem is caused by the "+" character on line 15.

Indeed, that is the issue, and it can be reproduced also with upstream git.
Easy fix, just sent upstream:
https://github.com/hercules-team/augeas/pull/647

--- Additional comment from Richard W.M. Jones on 2019-10-23 12:10:56 CEST ---

Upstream in Augeas:
https://github.com/hercules-team/augeas/commit/2ba77589baee1bf2d43d3a49f8e6f3eb522e5bba

Comment 2 YongkuiGuo 2019-11-08 08:21:55 UTC
Verified with the package:
augeas-1.12.0-3.el8.x86_64

Steps:

1.
$ mkdir -p /var/tmp/root/etc                                                
$ cp grub.conf /var/tmp/root/etc

2.                                            
$ augtool -r /var/tmp/root
augtool> print /files/etc/grub.conf
/files/etc/grub.conf
/files/etc/grub.conf/#comment[1] = "Modified by YaST2. Last modification on Thu Jul  4 12:45:58 ART 2019"
/files/etc/grub.conf/timeout = "0"
/files/etc/grub.conf/gfxmenu = "(hd0,0)/boot/message"
/files/etc/grub.conf/default = "0"
/files/etc/grub.conf/#comment[2] = "##Don't change this comment - YaST2 identifier: Original name: linux###"
/files/etc/grub.conf/title[1] = "Filr 3.0 - 3.0.101-108.68"
/files/etc/grub.conf/title[1]/root = "(hd0,0)"
/files/etc/grub.conf/title[1]/kernel = "/boot/vmlinuz-3.0.101-108.68-default"
/files/etc/grub.conf/title[1]/kernel/root = "/dev/sda1"
/files/etc/grub.conf/title[1]/kernel/disk = "/dev/disk/by-id/scsi-360022480000000000000000000000000"
/files/etc/grub.conf/title[1]/kernel/splash = "silent"
/files/etc/grub.conf/title[1]/kernel/USE_BY_UUID_DEVICE_NAMES = "1"
/files/etc/grub.conf/title[1]/kernel/quiet
/files/etc/grub.conf/title[1]/kernel/showopts
/files/etc/grub.conf/title[1]/kernel/vga = "normal"
/files/etc/grub.conf/title[1]/kernel/net.ifnames = "0"
/files/etc/grub.conf/title[1]/kernel/biosdevname = "0"
/files/etc/grub.conf/title[1]/initrd = "/boot/initrd-3.0.101-108.68-default"
/files/etc/grub.conf/#comment[3] = "##Don't change this comment - YaST2 identifier: Original name: failsafe###"
/files/etc/grub.conf/title[2] = "Failsafe -- Filr 3.0 - 3.0.101-108.68"
/files/etc/grub.conf/title[2]/root = "(hd0,0)"
/files/etc/grub.conf/title[2]/kernel = "/boot/vmlinuz-3.0.101-108.68-default"
/files/etc/grub.conf/title[2]/kernel/root = "/dev/sda1"
/files/etc/grub.conf/title[2]/kernel/disk = "/dev/disk/by-id/scsi-360022480000000000000000000000000"
/files/etc/grub.conf/title[2]/kernel/splash = "silent"
/files/etc/grub.conf/title[2]/kernel/USE_BY_UUID_DEVICE_NAMES = "1"
/files/etc/grub.conf/title[2]/kernel/ide = "nodma"
/files/etc/grub.conf/title[2]/kernel/apm = "off"
/files/etc/grub.conf/title[2]/kernel/noresume
/files/etc/grub.conf/title[2]/kernel/edd = "off"
/files/etc/grub.conf/title[2]/kernel/powersaved = "off"
/files/etc/grub.conf/title[2]/kernel/nohz = "off"
/files/etc/grub.conf/title[2]/kernel/highres = "off"
/files/etc/grub.conf/title[2]/kernel/processsor.max+cstate = "1"
...


The '+' character can be parsed correctly.

Comment 4 errata-xmlrpc 2020-04-28 16:49:27 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, 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-2020:1824


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