Bug 700608 - barfs on spaces in file names
Summary: barfs on spaces in file names
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: augeas
Version: 15
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: David Lutterkort
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-04-28 19:12 UTC by Bill Nottingham
Modified: 2014-03-17 03:27 UTC (History)
6 users (show)

Fixed In Version: augeas-0.8.1-2.el5
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-05-09 03:59:11 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Bill Nottingham 2011-04-28 19:12:02 UTC
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 19:53:43 UTC
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 19:55:35 UTC
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 23:31:09 UTC
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-29 02:30:05 UTC
(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 15:30:09 UTC
(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 21:46:29 UTC
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 23:32:55 UTC
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 23:33:10 UTC
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 23:33:32 UTC
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 23:33:46 UTC
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 23:33:59 UTC
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 04:42:51 UTC
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-09 03:59:07 UTC
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 23:04:45 UTC
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 23:14:28 UTC
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 16:04:43 UTC
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 16:08:37 UTC
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.