Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
augeas error
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  16 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
windowsrefund  
View profile  
 More options Jan 15 2009, 3:53 pm
From: windowsrefund <windowsref...@gmail.com>
Date: Thu, 15 Jan 2009 12:53:58 -0800 (PST)
Local: Thurs, Jan 15 2009 3:53 pm
Subject: augeas error
 augeas { "$name":
                context => "/files",
                changes => "set /etc/exports/foo bar",
                require => File["/etc/exports"],
 }

As you can see, I've got a very simple resource defined for testing
purposes but am seeing this error on the client. Can someone point me
in the right direction?

err: //Node[e5puppetclient1]/Nfs::Export[/foo]/Augeas[/foo]/returns:
change from need_to_run to 0 failed: Save failed with return code false


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Bryan Kearney  
View profile  
 More options Jan 15 2009, 4:27 pm
From: Bryan Kearney <bkear...@redhat.com>
Date: Thu, 15 Jan 2009 16:27:20 -0500
Local: Thurs, Jan 15 2009 4:27 pm
Subject: Re: [Puppet Users] augeas error

windowsrefund wrote:
>  augeas { "$name":
>                 context => "/files",
>                 changes => "set /etc/exports/foo bar",
>                 require => File["/etc/exports"],
>  }

Augeas will validate the structure of what you are setting. Look in
/usr/share/augeas/lenses/exports.lns for a description of the regular
expression voodoo. My guess is that you are not setting a valid structure.

-- bk


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
windowsrefund  
View profile  
 More options Jan 15 2009, 5:10 pm
From: windowsrefund <windowsref...@gmail.com>
Date: Thu, 15 Jan 2009 14:10:57 -0800 (PST)
Local: Thurs, Jan 15 2009 5:10 pm
Subject: Re: augeas error
Bryan,

Thanks so much for the pointer. I think I'm on the right track now but
could use a hand understanding why I'm getting this error when
attempting to write out to disk

augtool> print /files/etc/exports/
/files/etc/exports
/files/etc/exports/dir = "/foo"
/files/etc/exports/dir/client = "foo.example.com"
/files/etc/exports/dir/option = "rw"
augtool> save
/usr/share/augeas/lenses/exports.aug:17.16-19.58:Short split for
concat
Saving failed

On Jan 15, 4:27 pm, Bryan Kearney <bkear...@redhat.com> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Discussion subject changed to "How to experiment with Augeas, because the docs suck (was Re: [Puppet Users] Re: augeas error)" by Robin Lee Powell
Robin Lee Powell  
View profile  
 More options Jan 15 2009, 5:21 pm
From: Robin Lee Powell <rlpow...@digitalkingdom.org>
Date: Thu, 15 Jan 2009 14:21:37 -0800
Local: Thurs, Jan 15 2009 5:21 pm
Subject: How to experiment with Augeas, because the docs suck (was Re: [Puppet Users] Re: augeas error)

On Thu, Jan 15, 2009 at 04:27:20PM -0500, Bryan Kearney wrote:

> windowsrefund wrote:
> >  augeas { "$name":
> >                 context => "/files",
> >                 changes => "set /etc/exports/foo bar",
> >                 require => File["/etc/exports"],
> >  }

> Augeas will validate the structure of what you are setting. Look
> in /usr/share/augeas/lenses/exports.lns for a description of the
> regular expression voodoo. My guess is that you are not setting a
> valid structure.

Yes, you have to actually set something that matches the structure
of the file in question, which varies by file.  Most of the lenses
have shit for documentation, unfortunately, and this one is no
exception.

So, the easiest thing to do is to set up the file with some
examples (I pulled examples from the bottom of "man 5 exports") and
see what they look like:

    $ augtool
    augtool> ls /files/etc/exports/
    comment[1] = /etc/exports: the access control list for filesystems which may be exported
    comment[2] = to NFS clients.  See exports(5).
    comment[3] = sample /etc/exports file
    dir[1]/ = /
    dir[2]/ = /projects
    dir[3]/ = /usr
    dir[4]/ = /home/joe

It took several tries to get this; it turns out the augeas lens for
this file is a bit pickier than it should be: it won't accept:

    /pub            (ro,insecure,all_squash)

Anyways, from here you can investigate the structure, like so:

    augtool> ls /files/etc/exports/dir[1]
    client[1]/ = master
    client[2]/ = trusty

The corresponding line in the file is:

    /               master(rw) trusty(rw,no_root_squash)

Digging further:

    augtool> ls /files/etc/exports/dir[1]/client[1]
    option = rw

So, if you want to add a new entry, you'd do something like this:

    augtool> set /files/etc/exports/dir[10000] /foo
    augtool> set /files/etc/exports/dir[last()]/client[1] weeble
    augtool> set /files/etc/exports/dir[last()]/client[1]/option[1] ro
    augtool> set /files/etc/exports/dir[last()]/client[1]/option[2] all_squash
    augtool> save
    Saved 1 file(s)

Which creates the line:

    /foo weeble(ro,all_squash)

Doing this in Puppet is left as an exercise for the reader.  I'll
go see about getting better docs in Augeas for this thing.

-Robin

--
They say:  "The first AIs will be built by the military as weapons."
And I'm thinking:  "Does it even occur to you to try for something
other than the default outcome?" -- http://shorl.com/tydruhedufogre
http://www.digitalkingdom.org/~rlpowell/ *** http://www.lojban.org/


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Discussion subject changed to "augeas error" by Robin Lee Powell
Robin Lee Powell  
View profile  
 More options Jan 15 2009, 5:22 pm
From: Robin Lee Powell <rlpow...@digitalkingdom.org>
Date: Thu, 15 Jan 2009 14:22:37 -0800
Local: Thurs, Jan 15 2009 5:22 pm
Subject: Re: [Puppet Users] Re: augeas error

Because this:

> /files/etc/exports/dir/option = "rw"

is wrong.  You want:

/files/etc/exports/dir/client/option = "rw"

But also, see my other mail for how to not destroy your old lines
when you add new ones.

-Robin

--
They say:  "The first AIs will be built by the military as weapons."
And I'm thinking:  "Does it even occur to you to try for something
other than the default outcome?" -- http://shorl.com/tydruhedufogre
http://www.digitalkingdom.org/~rlpowell/ *** http://www.lojban.org/


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
windowsrefund  
View profile  
 More options Jan 15 2009, 5:33 pm
From: windowsrefund <windowsref...@gmail.com>
Date: Thu, 15 Jan 2009 14:33:06 -0800 (PST)
Local: Thurs, Jan 15 2009 5:33 pm
Subject: Re: augeas error
Thanks so much :)

On Jan 15, 5:22 pm, Robin Lee Powell <rlpow...@digitalkingdom.org>
wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
windowsrefund  
View profile  
 More options Jan 15 2009, 5:43 pm
From: windowsrefund <windowsref...@gmail.com>
Date: Thu, 15 Jan 2009 14:43:02 -0800 (PST)
Local: Thurs, Jan 15 2009 5:43 pm
Subject: Re: augeas error
Now that I'm more comfortable working with the schemas of each
supported file, I'm seeing a potential issue when it comes to
appending. Is there a way to determine the length of each object so I
can avoid doing things like /files/etc/exports/dir[100] ?

Best,
Adam

On Jan 15, 5:22 pm, Robin Lee Powell <rlpow...@digitalkingdom.org>
wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Discussion subject changed to "How to experiment with Augeas, because the docs suck (was Re: [Puppet Users] Re: augeas error)" by Peter Meier
Peter Meier  
View profile  
 More options Jan 15 2009, 5:43 pm
From: Peter Meier <peter.me...@immerda.ch>
Date: Thu, 15 Jan 2009 23:43:50 +0100
Local: Thurs, Jan 15 2009 5:43 pm
Subject: Re: How to experiment with Augeas, because the docs suck (was Re: [Puppet Users] Re: augeas error)
Hi

> Doing this in Puppet is left as an exercise for the reader.  I'll
> go see about getting better docs in Augeas for this thing.

would be nice if somebody could document her/his experiences with puppet
and augeas on the wiki.

cheers pete


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Discussion subject changed to "augeas error" by Robin Lee Powell
Robin Lee Powell  
View profile  
 More options Jan 15 2009, 5:45 pm
From: Robin Lee Powell <rlpow...@digitalkingdom.org>
Date: Thu, 15 Jan 2009 14:45:44 -0800
Local: Thurs, Jan 15 2009 5:45 pm
Subject: Re: [Puppet Users] Re: augeas error
Not that I'm aware of.  You can use last() instead of a number (and,
in fact, you have to in this case; see my long mail), but for
appending the current standard is to use a very large number (like
10000).  A bit weak, I know.  Feel free to complain to the Augeas
mailing list.

-Robin

--
They say:  "The first AIs will be built by the military as weapons."
And I'm thinking:  "Does it even occur to you to try for something
other than the default outcome?" -- http://shorl.com/tydruhedufogre
http://www.digitalkingdom.org/~rlpowell/ *** http://www.lojban.org/

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Discussion subject changed to "How to experiment with Augeas, because the docs suck (was Re: [Puppet Users] Re: augeas error)" by Robin Lee Powell
Robin Lee Powell  
View profile  
 More options Jan 15 2009, 5:48 pm
From: Robin Lee Powell <rlpow...@digitalkingdom.org>
Date: Thu, 15 Jan 2009 14:48:04 -0800
Local: Thurs, Jan 15 2009 5:48 pm
Subject: Re: How to experiment with Augeas, because the docs suck (was Re: [Puppet Users] Re: augeas error)

On Thu, Jan 15, 2009 at 11:43:50PM +0100, Peter Meier wrote:

> > Doing this in Puppet is left as an exercise for the reader.
> > I'll go see about getting better docs in Augeas for this thing.

> would be nice if somebody could document her/his experiences with
> puppet and augeas on the wiki.

If you can find a good place to put it, I'll see about writing
something up.

-Robin

--
They say:  "The first AIs will be built by the military as weapons."
And I'm thinking:  "Does it even occur to you to try for something
other than the default outcome?" -- http://shorl.com/tydruhedufogre
http://www.digitalkingdom.org/~rlpowell/ *** http://www.lojban.org/


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
James Turnbull  
View profile  
 More options Jan 15 2009, 5:55 pm
From: James Turnbull <ja...@lovedthanlost.net>
Date: Fri, 16 Jan 2009 09:55:42 +1100
Local: Thurs, Jan 15 2009 5:55 pm
Subject: Re: How to experiment with Augeas, because the docs suck (was Re: [Puppet Users] Re: augeas error)

Robin Lee Powell wrote:
> On Thu, Jan 15, 2009 at 11:43:50PM +0100, Peter Meier wrote:
>>> Doing this in Puppet is left as an exercise for the reader.
>>> I'll go see about getting better docs in Augeas for this thing.
>> would be nice if somebody could document her/his experiences with
>> puppet and augeas on the wiki.

> If you can find a good place to put it, I'll see about writing
> something up.

http://reductivelabs.com/trac/puppet/wiki/PuppetAugeas

Regards

James Turnbull

--
Author of:
* Pulling Strings with Puppet
(http://www.amazon.com/gp/product/1590599780/)
* Pro Nagios 2.0
(http://www.amazon.com/gp/product/1590596099/)
* Hardening Linux
(http://www.amazon.com/gp/product/1590594444/)

  signature.asc
< 1K Download

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Discussion subject changed to "augeas error" by David Lutterkort
David Lutterkort  
View profile  
 More options Jan 15 2009, 6:29 pm
From: David Lutterkort <lut...@redhat.com>
Date: Thu, 15 Jan 2009 23:29:00 +0000
Subject: Re: [Puppet Users] Re: augeas error

What version of Augeas are you using ? Or did you edit the output ?
augtool shouldn't print the error on the console, but stick it
into /augeas/files/etc/exports/error; with augeas-0.3.5 and the example
above, I get

        augtool> rm /files/etc/exports/*
        rm : /files/etc/exports/* 18
        augtool> set /files/etc/exports/dir /foo
        augtool> set /files/etc/exports/dir/client foo.example.com
        augtool> set /files/etc/exports/dir/option rw
        augtool> save
        Saving failed
        augtool> print /augeas/files/etc/exports/error
        /augeas/files/etc/exports/error = "put_failed"
        /augeas/files/etc/exports/error/path = "/files/etc/exports/dir"
        /augeas/files/etc/exports/error/message = "Failed to match /(())(())(())(client/)(((())(client/))*)(())/ with client/option/"

which (minus all the redundant () in the regexp) is almost readable ;)

David


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Discussion subject changed to "How to experiment with Augeas, because the docs suck (was Re: [Puppet Users] Re: augeas error)" by David Lutterkort
David Lutterkort  
View profile  
 More options Jan 15 2009, 6:38 pm
From: David Lutterkort <lut...@redhat.com>
Date: Thu, 15 Jan 2009 23:38:39 +0000
Local: Thurs, Jan 15 2009 6:38 pm
Subject: Re: How to experiment with Augeas, because the docs suck (was Re: [Puppet Users] Re: augeas error)

On Thu, 2009-01-15 at 14:21 -0800, Robin Lee Powell wrote:
> Yes, you have to actually set something that matches the structure
> of the file in question, which varies by file.  Most of the lenses
> have shit for documentation, unfortunately, and this one is no
> exception.

I'd argue there's even less docs than that ;)

> It took several tries to get this; it turns out the augeas lens for
> this file is a bit pickier than it should be: it won't accept:

>     /pub            (ro,insecure,all_squash)

I followed the man page when writing the exports lens, which doesn't
mention anything about omitting the client all together - is that really
legal ? On what systems ?

> Doing this in Puppet is left as an exercise for the reader.  I'll
> go see about getting better docs in Augeas for this thing.

Yes, better docs are sorely needed; if you send patches (or even just
text that you want to see in there), I'll add it to the autogenerated
lens docs[1]

Another way to document at least the expected tree structure would be to
generate that from the lens definition, and spit out something like
Relax-NG .. but would anybody read that ?

David

[1] http://augeas.net/docs/references/lenses/


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Discussion subject changed to "augeas error" by David Lutterkort
David Lutterkort  
View profile  
 More options Jan 15 2009, 6:49 pm
From: David Lutterkort <lut...@redhat.com>
Date: Thu, 15 Jan 2009 23:49:49 +0000
Local: Thurs, Jan 15 2009 6:49 pm
Subject: Re: [Puppet Users] Re: augeas error

On Thu, 2009-01-15 at 14:43 -0800, windowsrefund wrote:
> Now that I'm more comfortable working with the schemas of each
> supported file, I'm seeing a potential issue when it comes to
> appending. Is there a way to determine the length of each object so I
> can avoid doing things like /files/etc/exports/dir[100] ?

The cleanest way to append is

        augtool> ins dir after /files/etc/exports/dir[last()]
        augtool> set /files/etc/exports/dir[last()]/client foo

It seems though that insert for the Augeas type won't work (there's no
way to specify the new label or whether to insert before or after an
existing node)

David


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Discussion subject changed to "How to experiment with Augeas, because the docs suck (was Re: [Puppet Users] Re: augeas error)" by Robin Lee Powell
Robin Lee Powell  
View profile  
 More options Jan 17 2009, 3:18 am
From: Robin Lee Powell <rlpow...@digitalkingdom.org>
Date: Sat, 17 Jan 2009 00:18:27 -0800
Local: Sat, Jan 17 2009 3:18 am
Subject: Re: How to experiment with Augeas, because the docs suck (was Re: [Puppet Users] Re: augeas error)

On Thu, Jan 15, 2009 at 11:38:39PM +0000, David Lutterkort wrote:

> On Thu, 2009-01-15 at 14:21 -0800, Robin Lee Powell wrote:
> > It took several tries to get this; it turns out the augeas lens for
> > this file is a bit pickier than it should be: it won't accept:

> >     /pub            (ro,insecure,all_squash)

> I followed the man page when writing the exports lens, which
> doesn't mention anything about omitting the client all together -
> is that really legal ? On what systems ?

http://linux.die.net/man/5/exports -- last example.

AFAICT, all Linux.

-Robin

--
They say:  "The first AIs will be built by the military as weapons."
And I'm thinking:  "Does it even occur to you to try for something
other than the default outcome?" -- http://shorl.com/tydruhedufogre
http://www.digitalkingdom.org/~rlpowell/ *** http://www.lojban.org/


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Robin Lee Powell  
View profile  
 More options Jan 18 2009, 1:05 am
From: Robin Lee Powell <rlpow...@digitalkingdom.org>
Date: Sat, 17 Jan 2009 22:05:37 -0800
Local: Sun, Jan 18 2009 1:05 am
Subject: Re: How to experiment with Augeas, because the docs suck (was Re: [Puppet Users] Re: augeas error)

On Fri, Jan 16, 2009 at 09:55:42AM +1100, James Turnbull wrote:
> Robin Lee Powell wrote:
> > On Thu, Jan 15, 2009 at 11:43:50PM +0100, Peter Meier wrote:
> >>> Doing this in Puppet is left as an exercise for the reader.
> >>> I'll go see about getting better docs in Augeas for this
> >>> thing.
> >> would be nice if somebody could document her/his experiences
> >> with puppet and augeas on the wiki.

> > If you can find a good place to put it, I'll see about writing
> > something up.

> http://reductivelabs.com/trac/puppet/wiki/PuppetAugeas

Done.  It's not great, but it's a start.

-Robin

--
They say:  "The first AIs will be built by the military as weapons."
And I'm thinking:  "Does it even occur to you to try for something
other than the default outcome?" -- http://shorl.com/tydruhedufogre
http://www.digitalkingdom.org/~rlpowell/ *** http://www.lojban.org/


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »