I am pretty sure I am getting bitten by puppet bug #2141 (http://projects.reductivelabs.com/issues/2141), and I am wondering if there are any workarounds. I actually tried grabbing the versions of the provider and type that James mentions at the bottom of that bug, but they didn''t seem to make any difference. Here is what sets it off: augeas { "/etc/exports-$vmname": context => "/files/etc/exports", changes => [ "set dir[.=''/boots/$vmname''] /boots/$vmname", "set dir[.=''/boots/$vmname'']/client $vmname", "set dir[.=''/boots/$vmname'']/client/option[1] rw", "set dir[.=''/boots/$vmname'']/client/option[2] sync", "set dir[.=''/boots/$vmname'']/client/option[3] no_root_squash", ], } Those commands work find in augtool, and the problem withe resource type seems to be the single quotes around ''/boots/$vmname''. I tried removing the quotes, and that doesn''t work in augtool or puppet (augtool doesn''t error out, but the match doesn''t occur properly, and the puppet type fails with a pretty useless error). Thanks for any help. I am trying to get away from sed/grep, but using augeas is like pulling teeth! -- Chad M. Huneycutt --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en -~----------~----~----~----~------~----~------~--~---
On Mon, 2009-08-03 at 16:03 -0400, Chad Huneycutt wrote:> augeas { "/etc/exports-$vmname": > context => "/files/etc/exports", > changes => [ > "set dir[.=''/boots/$vmname''] /boots/$vmname", > "set dir[.=''/boots/$vmname'']/client $vmname", > "set dir[.=''/boots/$vmname'']/client/option[1] rw", > "set dir[.=''/boots/$vmname'']/client/option[2] sync", > "set dir[.=''/boots/$vmname'']/client/option[3] > no_root_squash", > ], > } > > Those commands work find in augtool, and the problem withe resource > type seems to be the single quotes around ''/boots/$vmname''. I tried > removing the quotes, and that doesn''t work in augtool or puppet > (augtool doesn''t error out, but the match doesn''t occur properly, and > the puppet type fails with a pretty useless error).What happens ? Anything ? David --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en -~----------~----~----~----~------~----~------~--~---
On Tue, Aug 4, 2009 at 7:12 PM, David Lutterkort<lutter@redhat.com> wrote:> > On Mon, 2009-08-03 at 16:03 -0400, Chad Huneycutt wrote: >> augeas { "/etc/exports-$vmname": >> context => "/files/etc/exports", >> changes => [ >> "set dir[.=''/boots/$vmname''] /boots/$vmname", >> "set dir[.=''/boots/$vmname'']/client $vmname", >> "set dir[.=''/boots/$vmname'']/client/option[1] rw", >> "set dir[.=''/boots/$vmname'']/client/option[2] sync", >> "set dir[.=''/boots/$vmname'']/client/option[3] >> no_root_squash", >> ], >> } >> >> Those commands work find in augtool, and the problem withe resource >> type seems to be the single quotes around ''/boots/$vmname''. I tried >> removing the quotes, and that doesn''t work in augtool or puppet >> (augtool doesn''t error out, but the match doesn''t occur properly, and >> the puppet type fails with a pretty useless error). > > What happens ? Anything ?In augtool without quotes, the sets all create new dir entries (kind of like if I had used set .../dir[0]). In puppet, the error I get if I remove the quotes is "...Augeas[...]/returns: change from need_to_run to 0 failed: Save failed with return code false". Here is the whole bit, if it helps: debug: Augeas[/etc/exports-factor004](provider=augeas): Augeas version 0.5.1 is installed debug: Augeas[/etc/exports-factor004](provider=augeas): sending command ''set'' with params ["/files/etc/exports/dir[.=/boots/factor004]", "/boots/factor004"] debug: Augeas[/etc/exports-factor004](provider=augeas): sending command ''set'' with params ["/files/etc/exports/dir[.=/boots/factor004]/client", "factor004"] debug: Augeas[/etc/exports-factor004](provider=augeas): sending command ''set'' with params ["/files/etc/exports/dir[.=/boots/factor004]/client/option[1]", "rw"] debug: Augeas[/etc/exports-factor004](provider=augeas): sending command ''set'' with params ["/files/etc/exports/dir[.=/boots/factor004]/client/option[2]", "sync"] debug: Augeas[/etc/exports-factor004](provider=augeas): sending command ''set'' with params ["/files/etc/exports/dir[.=/boots/factor004]/client/option[3]", "no_root_squash"] err: //Node[warp3]/Hackfarm::Vm[4]/Augeas[/etc/exports-factor004]/returns: change from need_to_run to 0 failed: Save failed with return code false With quotes (as above) is the error from bug 2141: debug: Augeas[/etc/exports-factor004](provider=augeas): Augeas version 0.5.1 is installed debug: Augeas[/etc/exports-factor004](provider=augeas): Will attempt to save and only run if files changed err: //Node[warp3]/Hackfarm::Vm[4]/Augeas[/etc/exports-factor004]: Failed to retrieve current state of resource: Error sending command ''set dir[.='' with params ["/boots/factor004", " ] /boots/factor004"]/Command ''set dir[.='' is not supported -- Chad M. Huneycutt --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en -~----------~----~----~----~------~----~------~--~---
On Tue, 2009-08-04 at 19:56 -0400, Chad Huneycutt wrote:> On Tue, Aug 4, 2009 at 7:12 PM, David Lutterkort<lutter@redhat.com> wrote: > > > > On Mon, 2009-08-03 at 16:03 -0400, Chad Huneycutt wrote: > >> augeas { "/etc/exports-$vmname": > >> context => "/files/etc/exports", > >> changes => [ > >> "set dir[.=''/boots/$vmname''] /boots/$vmname", > >> "set dir[.=''/boots/$vmname'']/client $vmname", > >> "set dir[.=''/boots/$vmname'']/client/option[1] rw", > >> "set dir[.=''/boots/$vmname'']/client/option[2] sync", > >> "set dir[.=''/boots/$vmname'']/client/option[3] > >> no_root_squash", > >> ], > >> } > >> > >> Those commands work find in augtool, and the problem withe resource > >> type seems to be the single quotes around ''/boots/$vmname''. I tried > >> removing the quotes, and that doesn''t work in augtool or puppet > >> (augtool doesn''t error out, but the match doesn''t occur properly, and > >> the puppet type fails with a pretty useless error). > > > > What happens ? Anything ? > > In augtool without quotes, the sets all create new dir entries (kind > of like if I had used set .../dir[0]). In puppet, the error I get if > I remove the quotes is "...Augeas[...]/returns: change from > need_to_run to 0 failed: Save failed with return code false". Here is > the whole bit, if it helps:Ok .. yes, that helped a lot. And you are in fact being bitten by #2141 - need to have the single quotes where you have them above. Your best bet might be to try the 0.25 release candidate. David --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en -~----------~----~----~----~------~----~------~--~---