Bug 2155147
| Summary: | augeas fails to parse /etc/rsyslog.d/21-cloudinit.conf file | ||
|---|---|---|---|
| Product: | Red Hat Enterprise Linux 9 | Reporter: | YongkuiGuo <yoguo> |
| Component: | augeas | Assignee: | Virtualization Maintenance <virt-maint> |
| Status: | CLOSED MIGRATED | QA Contact: | YongkuiGuo <yoguo> |
| Severity: | medium | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | 9.2 | CC: | jmaloy, lersek, qzhang, rjones, ymao |
| Target Milestone: | rc | Keywords: | MigratedToJIRA, Triaged |
| Target Release: | --- | Flags: | pm-rhel:
mirror+
|
| Hardware: | x86_64 | ||
| 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:20:32 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
2022-12-20 07:44:05 UTC
Line 6 is: & stop There aren't too many things on this line that augeas could fail to understand. The ampersand (= legacy action continuation syntax) is not the problem. Refer to RH bug 1660884. The "stop" action is the problem, instead. What I don't understand is why we see this problem *only now*. Namely, the discard action used to be called "~" in legacy rsyslog; refer to <https://www.rsyslog.com/doc/master/configuration/actions.html#discard-stop>. In cloud-init, the "& ~" action was replaced with "& stop" in the following commit: commit b613de733fa7cfbf94666410f252b640019be205 Author: Joshua Powers <josh.powers> Date: Mon Apr 10 16:30:33 2017 -0700 rsyslog: replace ~ with stop The discard action (tilde character) has been replaced by the “stop” RainerScript directive. It is considered more intuitive and offers slightly better performance. The tilde operator was deprecated in rsyslog 7. Distributions using rsyslog older than that will need to patch. LP: #1367899 Launchpad link: https://bugs.launchpad.net/cloud-init/+bug/1367899 I've now checked augeas @ 4f3bbeb3f782 ("Fix date in %changelog in augeas.spec.in (#790)", 2022-12-07), which is the current HEAD of the master branch. At that stage, the rsyslog lens ("lenses/rsyslog.aug") relies, in part, on the syslog lens ("lenses/syslog.aug") for recognizing actions: > let action = Syslog.action | omusrmsg | file_tmpl | dynamic | namedpipe and the syslog lens defines the following actions: > let action = (file | loghost | users | logprogram | discard) where discard is only: > let discard = [ label "discard" . Util.del_str "~" ] Neither lens recognizes "stop". Reported upstream issue: https://github.com/hercules-team/augeas/issues/794 (In reply to Laszlo Ersek from comment #1) > Line 6 is: > > & stop > > There aren't too many things on this line that augeas could fail to > understand. > > The ampersand (= legacy action continuation syntax) is not the problem. > Refer to RH bug 1660884. > > The "stop" action is the problem, instead. What I don't understand is why we > see this problem *only now*. That's because QE usually uses bare metal (reserved from beaker) to run augeas testing, and the cloud-init is not installed by default on bare metal. We can consider running augeas test in the VM on the Cloud platform. Unfortunately the situation is much worse than I had expected. "stop" cannot easily be recognized as an alternative for the discard action, *plus* the multiple actions parsing from bug 1660884 is buggy: it cannot deal with empty lines and comments. See more details at <https://github.com/hercules-team/augeas/issues/794#issuecomment-1362627179>. |