Bug 1138402

Summary: Augeas cannot parse default /etc/rsyslog.conf
Product: Red Hat Enterprise Linux 7 Reporter: Dominic Cleal <dcleal>
Component: augeasAssignee: Dominic Cleal <dcleal>
Status: CLOSED ERRATA QA Contact: Virtualization Bugs <virt-bugs>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 7.0CC: leiwang, lkong, npiace, virt-bugs, wshi, yuliu
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: augeas-1.1.0-14.el7 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 1083016 Environment:
Last Closed: 2015-03-05 09:25:44 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:
Bug Depends On: 1083016    
Bug Blocks:    

Description Dominic Cleal 2014-09-04 17:53:12 UTC
Same bug, but the default rsyslog.conf no longer contains the lines causing the problem.  Replace it with the attachment on bug #1083016, or add the following lines:

# A template to for higher precision timestamps + severity logging
$template SpiceTmpl,"%TIMESTAMP%.%TIMESTAMP:::date-subseconds% %syslogtag% %syslogseverity-text%:%msg:::sp-if-no-1st-sp%%msg:::drop-last-lf%\n"
:programname, startswith, "spice-vdagent"	/var/log/spice-vdagent.log;SpiceTmpl

+++ This bug was initially created as a clone of Bug #1083016 +++

Description of problem:
Augeas cannot parse default /etc/rsyslog.conf

Version-Release number of selected component (if applicable):
augeas-1.0.0-5.el6_5.1
kernel-2.6.32-431.el6


How reproducible: 
100%


Steps to Reproduce:
1. Install the following packages:
rsyslog-5.8.10-8.el6

2. Run command: echo 'print /augeas//error' | augtool
# echo 'print /augeas//error'|augtool

Actual results:
# echo 'print /augeas//error'|augtool
/augeas/files/etc/rsyslog.conf/error = "parse_failed"
/augeas/files/etc/rsyslog.conf/error/pos = "2943"
/augeas/files/etc/rsyslog.conf/error/line = "83"
/augeas/files/etc/rsyslog.conf/error/char = "0"
/augeas/files/etc/rsyslog.conf/error/lens = "/usr/share/augeas/lenses/dist/rsyslog.aug:30.10-.57:"
/augeas/files/etc/rsyslog.conf/error/message = "Get did not match entire input"


Expected results:
no errors


Additional info:

--- Additional comment from Dominic Cleal on 2014-06-02 12:53:09 BST ---

https://github.com/hercules-team/augeas/commit/74816cdcf599cf005b78d9a686dcedc84faf38b4

Comment 2 jiyu 2014-10-13 02:13:54 UTC
Verified with augeas-1.1.0-16.el7

Steps to verify:
1. Install the following packages:
rsyslog-7.4.7-6.el7

2. #echo 'print /augeas//error'|augtool
<no output>

parse successfully, so bug is fixed

Comment 3 jiyu 2014-10-13 02:51:24 UTC
For the comment2, after installing packages rsyslog-7.4.7-6.el7, add lines below to file /etc/rsyslog.conf 
# A template to for higher precision timestamps + severity logging
$template SpiceTmpl,"%TIMESTAMP%.%TIMESTAMP:::date-subseconds% %syslogtag% %syslogseverity-text%:%msg:::sp-if-no-1st-sp%%msg:::drop-last-lf%\n"
:programname, startswith, "spice-vdagent"	/var/log/spice-vdagent.log;SpiceTmpl

Then at step 2 :
#echo 'print /augeas//error'|augtool
<no output>

parse successfully, so bug is fixed

Comment 5 errata-xmlrpc 2015-03-05 09:25:44 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://rhn.redhat.com/errata/RHBA-2015-0399.html