Bug 700608 - barfs on spaces in file names
barfs on spaces in file names
Status: CLOSED ERRATA
Product: Fedora
Classification: Fedora
Component: augeas (Show other bugs)
15
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: David Lutterkort
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2011-04-28 15:12 EDT by Bill Nottingham
Modified: 2014-03-16 23:27 EDT (History)
6 users (show)

See Also:
Fixed In Version: augeas-0.8.1-2.el5
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2011-05-08 23:59:11 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)

  None (edit)
Description Bill Nottingham 2011-04-28 15:12:02 EDT
Description of problem:

# ncftool -d list
warning: augeas initialization had errors
please file a bug with the following lines in the bug report:
/augeas/load/Modprobe/error = "/augeas/files/etc/sysconfig/network-scripts/ifcfg-Auto_xenomorph |=|1"
/augeas/load/Sysfs/error = "/augeas/files/etc/sysconfig/network-scripts/ifcfg-Auto_xenomorph |=|1"
/augeas/pathx/error = "garbage at end of path expression"
/augeas/pathx/error/pos = "/augeas/files/etc/sysconfig/network-scripts/ifcfg-Auto_xenomorph |=|1"
error: unspecified error
error: errors in loading some config files

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

netcf-0.1.7-2.fc15.x86_64
augeas-libs-0.8.1-1.fc15.x86_64

How reproducible:

100%

Steps to Reproduce:
1. have "/etc/sysconfig/network-scripts/ifcfg-foo bar"
  
Actual results:

virt stack becomes unhappy.
Comment 1 Laine Stump 2011-04-28 15:53:43 EDT
When you do "lsof | grep libvirtd" do you see a lot of .aug files? (more than 1 is enough to verify my suspicion). What is the version of augeas? Is it maybe earlier than 0.8.1-1.fc15?

I'm betting that this is the same as Bug 690286 in RHEL, which was fixed in augeas-0.8.1-1.fc15. If you're not running that version, please update and retest.

I'm moving the component to augeas, anticipating that's the problem.
Comment 2 Laine Stump 2011-04-28 15:55:35 EDT
ugh. I really should pay attention to the details - you've already told me you're using the latest augeas. Nevermind. I'll look into it.
Comment 3 David Lutterkort 2011-04-28 19:31:09 EDT
The issue is that spaces in the paths need to be escaped (by netcf) with a backslash, i.e. instead of talking about "/files/etc/sysconfig/network-scripts/ifcfg-foo bar" it needs to "/files/etc/sysconfig/network-scripts/ifcfg-foo\ bar"

IOW, netcf needs to do the equivalent of 's@ @\ @g' on all paths - I am wondering if I should try and catch this at the augeas level, with some sort of flag to aug_init.

Bill: where do these ifcfg files with spaces in them come from ?
Comment 4 Laine Stump 2011-04-28 22:30:05 EDT
(In reply to comment #3)

> IOW, netcf needs to do the equivalent of 's@ @\ @g' on all paths - I am
> wondering if I should try and catch this at the augeas level, with some sort of
> flag to aug_init.

My opinion is that, since the string being passed into augeas is just a path, and space has no special meaning, the caller shouldn't be required to escape it - the space is unambiguously just a space embedded in the path, not a separator between arguments, etc. (but of course I'll deal with whatever you decide to do :-)

Why would you need a flag to aug_init? Is there any reasonable circumstance when the application would *not* want a space embedded in a path to be escaped as needed within augeas?
Comment 5 Bill Nottingham 2011-04-29 11:30:09 EDT
(In reply to comment #3)
> Bill: where do these ifcfg files with spaces in them come from ?

NetworkManager migrating connections from GConf to system connections. It appears if it has multiple configured connections for a given SSID (in this case), it will write the second one with " 1" appended to the file name.

There's nothing specifically in initscripts or NM that forbids spaces in the file name, to my knowledge (although obviously it's not common, and there might be a lingering bug or two somewhere with it.)
Comment 6 David Lutterkort 2011-04-29 17:46:29 EDT
Committed a fix for this upstream as commit ea010d85. Path expressions can now contain whitespace _inside_ each file name - file names that start or end with whitespace still require that the space is escaped with '\'; but nobody does this anyway, right ?
Comment 7 Fedora Update System 2011-05-03 19:32:55 EDT
augeas-0.8.1-2.el5 has been submitted as an update for Fedora EPEL 5.
https://admin.fedoraproject.org/updates/augeas-0.8.1-2.el5
Comment 8 Fedora Update System 2011-05-03 19:33:10 EDT
augeas-0.8.1-2.el4 has been submitted as an update for Fedora EPEL 4.
https://admin.fedoraproject.org/updates/augeas-0.8.1-2.el4
Comment 9 Fedora Update System 2011-05-03 19:33:32 EDT
augeas-0.8.1-2.fc15 has been submitted as an update for Fedora 15.
https://admin.fedoraproject.org/updates/augeas-0.8.1-2.fc15
Comment 10 Fedora Update System 2011-05-03 19:33:46 EDT
augeas-0.8.1-2.fc14 has been submitted as an update for Fedora 14.
https://admin.fedoraproject.org/updates/augeas-0.8.1-2.fc14
Comment 11 Fedora Update System 2011-05-03 19:33:59 EDT
augeas-0.8.1-2.fc13 has been submitted as an update for Fedora 13.
https://admin.fedoraproject.org/updates/augeas-0.8.1-2.fc13
Comment 12 Fedora Update System 2011-05-05 00:42:51 EDT
Package augeas-0.8.1-2.fc15:
* should fix your issue,
* was pushed to the Fedora 15 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing augeas-0.8.1-2.fc15'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/augeas-0.8.1-2.fc15
then log in and leave karma (feedback).
Comment 13 Fedora Update System 2011-05-08 23:59:07 EDT
augeas-0.8.1-2.fc15 has been pushed to the Fedora 15 stable repository.  If problems still persist, please make note of it in this bug report.
Comment 14 Fedora Update System 2011-05-13 19:04:45 EDT
augeas-0.8.1-2.fc14 has been pushed to the Fedora 14 stable repository.  If problems still persist, please make note of it in this bug report.
Comment 15 Fedora Update System 2011-05-13 19:14:28 EDT
augeas-0.8.1-2.fc13 has been pushed to the Fedora 13 stable repository.  If problems still persist, please make note of it in this bug report.
Comment 16 Fedora Update System 2011-05-25 12:04:43 EDT
augeas-0.8.1-2.el4 has been pushed to the Fedora EPEL 4 stable repository.  If problems still persist, please make note of it in this bug report.
Comment 17 Fedora Update System 2011-05-25 12:08:37 EDT
augeas-0.8.1-2.el5 has been pushed to the Fedora EPEL 5 stable repository.  If problems still persist, please make note of it in this bug report.

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