Bug 2160657

Summary: augeas fails to parse /etc/rsyslog.d/opal-prd.conf on ppc64le env
Product: Red Hat Enterprise Linux 9 Reporter: YongkuiGuo <yoguo>
Component: augeasAssignee: Virtualization Maintenance <virt-maint>
Status: CLOSED MIGRATED QA Contact: YongkuiGuo <yoguo>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 9.2CC: jmaloy, lersek, qzhang, rjones, ymao
Target Milestone: rcKeywords: MigratedToJIRA, Triaged
Target Release: ---   
Hardware: ppc64le   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2023-07-07 21:19:47 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 YongkuiGuo 2023-01-13 07:53:52 UTC
Description of problem:
augeas fails to parse /etc/rsyslog.d/opal-prd.conf on ppc64le env(the opal-prd package is installed by default).

$ augtool print /augeas//error | grep opal-prd
/augeas/files/etc/rsyslog.d/opal-prd.conf/error = "parse_failed"
/augeas/files/etc/rsyslog.d/opal-prd.conf/error/pos = "0"
/augeas/files/etc/rsyslog.d/opal-prd.conf/error/line = "1"
/augeas/files/etc/rsyslog.d/opal-prd.conf/error/char = "0"
/augeas/files/etc/rsyslog.d/opal-prd.conf/error/lens = "/usr/share/augeas/lenses/dist/rsyslog.aug:92.10-.43:"
/augeas/files/etc/rsyslog.d/opal-prd.conf/error/message = "Get did not match entire input"

$ cat /etc/rsyslog.d/opal-prd.conf
if $programname == 'opal-prd' then /var/log/opal-prd.log
if $programname == 'opal-prd' and $syslogseverity <= 4 then /var/log/messages
if $programname == 'opal-prd' then stop


Version-Release number of selected component (if applicable):
augeas-1.13.0-3.el9.ppc64le


How reproducible:
100%


Steps:

On RHEL9.2 ppc64le host (ibm-p9z-06-lp9.khw3.lab.eng.bos.redhat.com):
1. 
2.

Actual results:
As above

Expected results:
augeas can parse the /etc/rsyslog.d/opal-prd.conf file successfully.

Additional info:
1. This issue can also be seen on RHEL8.8 ppc64le env. 
2. No this issue on other arches.

Comment 1 Richard W.M. Jones 2023-01-18 11:10:39 UTC
Apparently this is a new thing in rsyslog called RainerScript:

https://www.rsyslog.com/doc/master/rainerscript/index.html

Looking at the current Augeas parser it seems to have no ability
to parse this at all, and adding it is going to be a very large
amount of work.

I added an upstream RFE:

https://github.com/hercules-team/augeas/issues/800

but the chance of this being fixed any time soon is vanishingly small.