augeas-lenses-1.2.0 - NagiosCfg lens broken for /etc/nagios.cfg due to spaces
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
augeas (Ubuntu) |
Fix Released
|
Undecided
|
Ryan Harper | ||
Trusty |
Fix Released
|
Undecided
|
Ryan Harper |
Bug Description
[Impact]
* The nagios lens provided in augeas-lenses can generate configuration
values that are not parsable by nagios due to the lense creating
these values with a space character before and after the equal.
(foo = "bar" vs. foo="bar").
This affects the 1.2.0 release of augeas-lenses and has been
been fixed in newer releases available in Xenial and Yakkety.
* All patches applied are already accepted upstream and newer Ubuntu
releases are not affected.
[Test Case]
* On a Xenial 16.04 system
- lxc launch ubuntu-daily:trusty t1
- lxc exec t1 /bin/bash
# inside the container t1
- apt-get update && apt-get install --no-install-
# setup temp area to test augeas out per http://
- export AUGEAS_
- mkdir $AUGEAS_ROOT
- cp -pr /etc $AUGEAS_ROOT
- chown -R $(id -nu):$(id -ng) $AUGEAS_ROOT
- augtool -b
# in the augtool shell, make a change (remove and reset a value)
- print /files/
- rm /files/
- set /files/
- save
- control-d
# diff the files to see the change
- root@t2:~# diff -u $AUGEAS_
# confirm that we can still parse the new config file
- nagios3 --verify-config $AUGEAS_
[Regression Potential]
* Users of nagios lens should verify that the change in output doesn't
break their usage, but the change only affects nagioscfg lens users.
[Original Description]
# lsb_release -rd
Description: Ubuntu 14.04.3 LTS
Release: 14.04
# apt-cache policy augeas-lenses
augeas-lenses:
Installed: 1.2.0-0ubuntu1.1
Candidate: 1.2.0-0ubuntu1.1
Version table:
*** 1.2.0-0ubuntu1.1 0
500 http://
100 /var/lib/
1.2.0-0ubuntu1 0
500 http://
3. After applying configuration changes with augeas for Nagios3 there should be no spaces before and after "="
```nagios.cfg
var=value
```
4. Nagios3 fails to parse a configuration line with spaces before and after "="
```nagios.cfg
var = value
```
```.log
Error in configuration file '/etc/nagios/
Error processing main config file!
```
Upstream fix and discussion here:
https:/
tags: | added: bitesize |
Changed in augeas (Ubuntu): | |
assignee: | nobody → Ryan Harper (raharper) |
At https:/ /github. com/hercules- team/augeas/ issues/ 292#issuecommen t-138634149 it was suggested to use the Augeas PPA from https:/ /launchpad. net/~raphink/ +archive/ ubuntu/ augeas