ncftool list fails

Bug #1054306 reported by Serge Hallyn
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
augeas (Debian)
New
Unknown
augeas (Ubuntu)
Fix Released
High
Unassigned

Bug Description

'ncftool list' fails with an error loading augeas config files.

Tags: patch
Revision history for this message
Serge Hallyn (serge-hallyn) wrote :

(Tested on several quantal server images)

Changed in netcf (Ubuntu):
importance: Undecided → High
status: New → Triaged
Revision history for this message
Serge Hallyn (serge-hallyn) wrote :

Looking at /augeas/error shows:

serge@ubuntu:~/packages/q$ ncftool list
get_augeas: r was 1
warning: augeas initialization had errors
please file a bug with the following lines in the bug report:
/augeas/files/etc/modprobe.d/iwlwifi.conf/error = "parse_failed"
/augeas/files/etc/modprobe.d/iwlwifi.conf/error/pos = "220"
/augeas/files/etc/modprobe.d/iwlwifi.conf/error/line = "5"
/augeas/files/etc/modprobe.d/iwlwifi.conf/error/char = "0"
/augeas/files/etc/modprobe.d/iwlwifi.conf/error/lens = "/usr/share/augeas/lenses/dist/modprobe.
aug:90.10-.32:"
/augeas/files/etc/modprobe.d/iwlwifi.conf/error/message = "Iterated lens matched less than it s
hould"
error: unspecified error
error: errors in loading some config files

Changed in netcf (Ubuntu):
assignee: nobody → Serge Hallyn (serge-hallyn)
Revision history for this message
Serge Hallyn (serge-hallyn) wrote :

Ah, the problem appears to be in the parsing of this file, /etc/modprobe.d/iwlwifi.conf:

# /etc/modprobe.d/iwlwifi.conf
# iwlwifi will dyamically load either iwldvm or iwlmvm depending on the
# microcode file installed on the system. When removing iwlwifi, first
# remove the iwl?vm module and then iwlwifi.
remove iwlwifi \
(/sbin/lsmod | grep -o -e ^iwlmvm -e ^iwldvm -e ^iwlwifi | xargs /sbin/rmmod) \
&& /sbin/modprobe -r mac80211

Revision history for this message
Serge Hallyn (serge-hallyn) wrote :

And, if I remove the '\'s and join the lines, it passes.

This appears to be a simple bug in the augeas modprobe lense for being unable to handle split lines.

Changed in netcf (Ubuntu):
status: Triaged → Invalid
Changed in augeas (Ubuntu):
status: New → Triaged
importance: Undecided → High
Changed in netcf (Ubuntu):
assignee: Serge Hallyn (serge-hallyn) → nobody
Revision history for this message
Dominic Cleal (domcleal) wrote :

Could you share the contents of /etc/modprobe.d/iwlwifi.conf ?

Revision history for this message
Serge Hallyn (serge-hallyn) wrote :

@Dominic

they are pasted into comment #3.

I was able to reproduce this in debian sid with that same file, so have filed a debian bug (waiting for a reply with the bug#)

Revision history for this message
Dominic Cleal (domcleal) wrote : Re: [Bug 1054306] Re: ncftool list fails

On 21/09/12 21:51, Serge Hallyn wrote:
> @Dominic
>
> they are pasted into comment #3.

Apologies, I hadn't refreshed.

> I was able to reproduce this in debian sid with that same file, so have
> filed a debian bug (waiting for a reply with the bug#)

I've fixed this upstream in commit e599fed9, patch attached if you want
to apply it.

http://git.fedorahosted.org/cgit/augeas.git/commit/?id=e599fed9

Regards,

--
Dominic Cleal
<email address hidden>

Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

The attachment "1054306-modprobe-wrap.patch" of this bug report has been identified as being a patch. The ubuntu-reviewers team has been subscribed to the bug report so that they can review the patch. In the event that this is in fact not a patch you can resolve this situation by removing the tag 'patch' from the bug report and editing the attachment so that it is not flagged as a patch. Additionally, if you are member of the ubuntu-reviewers team please also unsubscribe the team from this bug report.

[This is an automated message performed by a Launchpad user owned by Brian Murray. Please contact him regarding any issues with the action taken in this bug report.]

tags: added: patch
Revision history for this message
Serge Hallyn (serge-hallyn) wrote : Re: [Bug 1054306] Re: ncftool list fails

Quoting Dominic Cleal (<email address hidden>):
> On 21/09/12 21:51, Serge Hallyn wrote:
> > @Dominic
> >
> > they are pasted into comment #3.
>
> Apologies, I hadn't refreshed.
>
> > I was able to reproduce this in debian sid with that same file, so have
> > filed a debian bug (waiting for a reply with the bug#)
>
> I've fixed this upstream in commit e599fed9, patch attached if you want
> to apply it.
>
> http://git.fedorahosted.org/cgit/augeas.git/commit/?id=e599fed9

Awesome - thanks Dominic. I'll apply today.

Revision history for this message
Serge Hallyn (serge-hallyn) wrote :

with the patch from git applied to debian's pkg, make check fails.

Revision history for this message
Serge Hallyn (serge-hallyn) wrote :

result of 'grep -i fail' over the output:

FAIL: lens-modules.sh
FAIL: lens-modules_conf.sh
FAIL: test-get.sh
FAIL: test-put-symlink.sh
FAIL: test-save-empty.sh
FAIL: test-idempotent.sh
FAIL: test-preserve.sh
FAIL: test-events-saved.sh
FAIL: test-save-mode.sh
FAIL: test-xpath
FAIL: test-load
FAIL: test-save
FAIL: test-api
13 of 128 tests failed

Revision history for this message
Dominic Cleal (domcleal) wrote :

On 24/09/12 18:14, Serge Hallyn wrote:
> result of 'grep -i fail' over the output:
>
> FAIL: lens-modules.sh
> FAIL: lens-modules_conf.sh

Thanks for finding this, I really should have run a full test after
making the change. Sorry for that.

There were these two other module lenses that were using bits of the
modprobe lens, so my name change broke it. Attached is a followup patch
committed as c0ff479 which repairs the damage caused.

--
Dominic Cleal
<email address hidden>

Revision history for this message
Serge Hallyn (serge-hallyn) wrote :

Thanks Dominic!

This debdiff (which applies both your pathces) solves the bug for me, and passes the self-tests.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package augeas - 0.10.0-1fakesync1ubuntu1

---------------
augeas (0.10.0-1fakesync1ubuntu1) quantal-proposed; urgency=low

  * augeas-split-lines.patch: consolidate 2 commits from upstream to fix
    handling of split lines in modprobe.conf (LP: #1054306) (Closes: #688347)
 -- Serge Hallyn <email address hidden> Mon, 24 Sep 2012 22:56:01 -0500

Changed in augeas (Ubuntu):
status: Triaged → Fix Released
Changed in augeas (Debian):
status: Unknown → New
no longer affects: netcf (Ubuntu)
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.