Trouble with Puppet+Augeas in 0.25, but not in 0.24

52 views
Skip to first unread message

Patrick (kc7zzv)

unread,
Apr 3, 2010, 11:53:58 PM4/3/10
to Puppet Users
After upgrading to puppet 0.25.4, I have not been able to get Augeas
recipes to work if the path has a space. Here's an example:

class samba-server {

augeas{"samba-global2":
context => "/files/etc/samba/smb.conf/
target[.='global']",
changes => [
"set workgroup MSHOME",
"set 'os\ level' 31",
],
}
}

This works in 0.24.8 and fails in 0.25.4. Anyone know what change I
should make to get it working, or should I file a bug?

0.24.8 working:
http://pastie.org/902320

0.25.4 not working:
http://pastie.org/902322

Peter Meier

unread,
Apr 4, 2010, 6:14:30 AM4/4/10
to puppet...@googlegroups.com
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

> augeas{"samba-global2":
> context => "/files/etc/samba/smb.conf/
> target[.='global']",
> changes => [
> "set workgroup MSHOME",
> "set 'os\ level' 31",
> ],
> }
> }
>
> This works in 0.24.8 and fails in 0.25.4. Anyone know what change I
> should make to get it working, or should I file a bug?

can you try without escaping the whitespace:

> "set 'os\ level' 31",

vs.


> "set 'os level' 31",

As augeas got some improvements in 0.25 and might finally work as
expected, as in my opinion as you are setting single quotes the escaping
shouldn't be required.
And if it still fails, can you test it with 0.25.5rc1? This one got
further improvements. You can also try to apply that recipe manually
with the puppet-binary, so you don't have to upgrade your whole chain to
an rc.

cheers pete
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAku4ZoMACgkQbwltcAfKi3/cIwCfaQlB+BYmUR0iRSeunv6Ap/DV
n1oAoJ7BTQ4vMZZtDcfHZl4rI5Qpv6m9
=35D7
-----END PGP SIGNATURE-----

Patrick

unread,
Apr 4, 2010, 1:09:14 PM4/4/10
to puppet...@googlegroups.com

On Apr 4, 2010, at 3:14 AM, Peter Meier wrote:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
>> augeas{"samba-global2":
>> context => "/files/etc/samba/smb.conf/
>> target[.='global']",
>> changes => [
>> "set workgroup MSHOME",
>> "set 'os\ level' 31",
>> ],
>> }
>> }
>>
>> This works in 0.24.8 and fails in 0.25.4. Anyone know what change I
>> should make to get it working, or should I file a bug?
>
> can you try without escaping the whitespace:
>
>> "set 'os\ level' 31",
> vs.
>> "set 'os level' 31",
>
> As augeas got some improvements in 0.25 and might finally work as
> expected, as in my opinion as you are setting single quotes the escaping
> shouldn't be required.
> And if it still fails, can you test it with 0.25.5rc1? This one got
> further improvements. You can also try to apply that recipe manually
> with the puppet-binary, so you don't have to upgrade your whole chain to
> an rc.
>
> cheers pete


First, since it seems like exact version matters more than I thought, I'm using 0.25.4-2ubuntu4.

Here are the relevant lines from the client's log with the backslash removed. It's not working because puppet is trying to set "os"="level" instead of "os level"="31"

debug: Augeas[samba-global2](provider=augeas): sending command 'set' with params ["/files/etc/samba/smb.conf/target[.='global']/workgroup", "MSHOME"]
debug: Augeas[samba-global2](provider=augeas): sending command 'set' with params ["/files/etc/samba/smb.conf/target[.='global']/'os", "level'"]

debug: Augeas[samba-global2](provider=augeas): sending command 'set' with params ["/files/etc/samba/smb.conf/target[.='global']/workgroup", "MSHOME"]
debug: Augeas[samba-global2](provider=augeas): sending command 'set' with params ["/files/etc/samba/smb.conf/target[.='global']/'os", "level'"]


Full output at http://pastie.org/902773

I'll try 0.25.5 later today.

Patrick

unread,
Apr 4, 2010, 1:26:15 PM4/4/10
to puppet...@googlegroups.com

On Apr 4, 2010, at 3:14 AM, Peter Meier wrote:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
>> augeas{"samba-global2":
>> context => "/files/etc/samba/smb.conf/
>> target[.='global']",
>> changes => [
>> "set workgroup MSHOME",
>> "set 'os\ level' 31",
>> ],
>> }
>> }
>>
>> This works in 0.24.8 and fails in 0.25.4. Anyone know what change I
>> should make to get it working, or should I file a bug?
>
> can you try without escaping the whitespace:
>
>> "set 'os\ level' 31",
> vs.
>> "set 'os level' 31",
>
> As augeas got some improvements in 0.25 and might finally work as
> expected, as in my opinion as you are setting single quotes the escaping
> shouldn't be required.
> And if it still fails, can you test it with 0.25.5rc1? This one got
> further improvements. You can also try to apply that recipe manually
> with the puppet-binary, so you don't have to upgrade your whole chain to
> an rc.
>
> cheers pete

I tried 0.25.5rc1 from http://puppetlabs.com/downloads/puppet/puppet-0.25.5rc1.tar.gz and here's the output. It's still got the same error as 0.25.4:

root@Simba:~/puppet_testing/puppet-0.25.5rc1/bin# ./puppet /root/init.pp --verbose --debug
debug: Creating default schedules
debug: Failed to load library 'selinux' for feature 'selinux'
debug: Puppet::Type::User::ProviderLdap: true value when expecting false
debug: Puppet::Type::User::ProviderPw: file pw does not exist
debug: Puppet::Type::User::ProviderUser_role_add: file roleadd does not exist
debug: Puppet::Type::User::ProviderDirectoryservice: file /usr/bin/dscl does not exist
debug: Failed to load library 'ldap' for feature 'ldap'
debug: /File[/var/lib/puppet/state/state.yaml]: Autorequiring File[/var/lib/puppet/state]
debug: /File[/var/lib/puppet/ssl/private_keys/simba.outer.pem]: Autorequiring File[/var/lib/puppet/ssl/private_keys]
debug: /File[/var/lib/puppet/facts]: Autorequiring File[/var/lib/puppet]
debug: /File[/var/lib/puppet/ssl/crl.pem]: Autorequiring File[/var/lib/puppet/ssl]
debug: /File[/var/lib/puppet/ssl/certificate_requests]: Autorequiring File[/var/lib/puppet/ssl]
debug: /File[/var/lib/puppet/ssl/certs/ca.pem]: Autorequiring File[/var/lib/puppet/ssl/certs]
debug: /File[/var/lib/puppet/ssl/public_keys]: Autorequiring File[/var/lib/puppet/ssl]
debug: /File[/var/lib/puppet/ssl]: Autorequiring File[/var/lib/puppet]
debug: /File[/var/lib/puppet/ssl/public_keys/simba.outer.pem]: Autorequiring File[/var/lib/puppet/ssl/public_keys]
debug: /File[/var/lib/puppet/ssl/certs]: Autorequiring File[/var/lib/puppet/ssl]
debug: /File[/var/lib/puppet/state]: Autorequiring File[/var/lib/puppet]
debug: /File[/var/lib/puppet/ssl/csr_simba.outer.pem]: Autorequiring File[/var/lib/puppet/ssl]
debug: /File[/var/lib/puppet/ssl/private_keys]: Autorequiring File[/var/lib/puppet/ssl]
debug: /File[/var/lib/puppet/state/graphs]: Autorequiring File[/var/lib/puppet/state]
debug: /File[/var/lib/puppet/lib]: Autorequiring File[/var/lib/puppet]
debug: /File[/var/lib/puppet/ssl/private]: Autorequiring File[/var/lib/puppet/ssl]
debug: /File[/var/lib/puppet/state/classes.txt]: Autorequiring File[/var/lib/puppet/state]
debug: /File[/var/lib/puppet/ssl/certs/simba.outer.pem]: Autorequiring File[/var/lib/puppet/ssl/certs]
debug: /File[/var/lib/puppet/client_yaml]: Autorequiring File[/var/lib/puppet]
debug: /File[/var/lib/puppet/clientbucket]: Autorequiring File[/var/lib/puppet]
debug: Finishing transaction -618469398 with 0 changes
info: Applying configuration version '1270401710'
debug: Augeas[samba-global2](provider=augeas): Opening augeas with root /, lens path , flags 0
debug: Augeas[samba-global2](provider=augeas): Augeas version 0.5.1 is installed
debug: Augeas[samba-global2](provider=augeas): Will attempt to save and only run if files changed


debug: Augeas[samba-global2](provider=augeas): sending command 'set' with params ["/files/etc/samba/smb.conf/target[.='global']/workgroup", "MSHOME"]
debug: Augeas[samba-global2](provider=augeas): sending command 'set' with params ["/files/etc/samba/smb.conf/target[.='global']/'os", "level'"]

debug: Augeas[samba-global2](provider=augeas): Files changed, should execute
debug: Augeas[samba-global2](provider=augeas): Closed the augeas connection
debug: //Augeas[samba-global2]: Changing returns
debug: //Augeas[samba-global2]: 1 change(s)
debug: Augeas[samba-global2](provider=augeas): Opening augeas with root /, lens path , flags 0
debug: Augeas[samba-global2](provider=augeas): Augeas version 0.5.1 is installed


debug: Augeas[samba-global2](provider=augeas): sending command 'set' with params ["/files/etc/samba/smb.conf/target[.='global']/workgroup", "MSHOME"]
debug: Augeas[samba-global2](provider=augeas): sending command 'set' with params ["/files/etc/samba/smb.conf/target[.='global']/'os", "level'"]

debug: Augeas[samba-global2](provider=augeas): Closed the augeas connection
err: //Augeas[samba-global2]/returns: change from need_to_run to 0 failed: Save failed with return code false
debug: Finishing transaction -618683528 with 1 changes

Patrick

unread,
Apr 7, 2010, 3:36:41 PM4/7/10
to puppet...@googlegroups.com

On Apr 4, 2010, at 3:14 AM, Peter Meier wrote:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
>> augeas{"samba-global2":
>> context => "/files/etc/samba/smb.conf/
>> target[.='global']",
>> changes => [
>> "set workgroup MSHOME",
>> "set 'os\ level' 31",
>> ],
>> }
>> }
>>
>> This works in 0.24.8 and fails in 0.25.4. Anyone know what change I
>> should make to get it working, or should I file a bug?
>
> can you try without escaping the whitespace:
>
>> "set 'os\ level' 31",
> vs.
>> "set 'os level' 31",
>
> As augeas got some improvements in 0.25 and might finally work as
> expected, as in my opinion as you are setting single quotes the escaping
> shouldn't be required.
> And if it still fails, can you test it with 0.25.5rc1? This one got
> further improvements. You can also try to apply that recipe manually
> with the puppet-binary, so you don't have to upgrade your whole chain to
> an rc.
>
> cheers pete

I seem to have found the exact same bug at http://projects.puppetlabs.com/issues/3387

Is there any way to easy way to check to see if that fix is in 0.25.5rc1?

Peter Meier

unread,
Apr 7, 2010, 3:43:24 PM4/7/10
to puppet...@googlegroups.com
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

> I seem to have found the exact same bug at http://projects.puppetlabs.com/issues/3387


>
> Is there any way to easy way to check to see if that fix is in 0.25.5rc1?
>

it looks like it is:
http://github.com/reductivelabs/puppet/commits/0.25.5rc1?&page=2

cheers pete
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAku84FsACgkQbwltcAfKi38hPQCfWJdvXE1Em7yBsyyVCwkplkAU
PVkAoKeslAKRSvb9qKr/90t2EIBQAqJt
=R2mE
-----END PGP SIGNATURE-----

Reply all
Reply to author
Forward
0 new messages