Hans van der Made
2009-Sep-02 18:21 UTC
[Puppet Users] ZFS provider does not delete - user or puppet error?
Dear Puppet users and developers,
We''re Solaris 10/X86 users, enjoying ZFS and Solaris
containers. In my first effort to configure a host without ever
logging in after launching Puppet, I''ve tried to remove a ZFS
filesystem:
zfs { "rpool/export/home":
ensure => absent;
}
Resulting in:
debug: //Node[nodename]/v20z-base-zfs/Zfs[rpool/export/home]:
Changing ensure
debug: //Node[nodename]/v20z-base-zfs/Zfs[rpool/export/home]:
1 change(s)
err: //Node[nodename]/v20z-base-zfs/Zfs[rpool/export/home]/ensure:
change from present to absent failed: Could not set absent on ensure:
undefined method `destroy'' for #<Puppet::Type::Zfs:0x8e0db54> at
/path/v20z-base-zfs/manifests/init.pp:31
The online type reference says "ensure" supports "absent"
and "present"
for the ZFS type, and "provider/zfs/solaris.rb" suggests that deletion
should work as well:
def create
zfs *([:create] + add_properties + [@resource[:name]])
end
def delete
zfs(:destroy, @resource[:name])
end
As I refuse to admit defeat and use "zfs destroy rpool/export/home",
I''m
looking for ideas. I''m afraid my Ruby skills are severely limited :(
Using Puppet 0.24.8 from Blastwave-packages. Thanks!
--
Regards,
Hans van der Made
NL
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---
martin
2009-Sep-03 09:27 UTC
[Puppet Users] Re: ZFS provider does not delete - user or puppet error?
Hans, On Sep 2, 7:21 pm, Hans van der Made <chitchat...@gmail.com> wrote:> err: //Node[nodename]/v20z-base-zfs/Zfs[rpool/export/home]/ensure: > change from present to absent failed: Could not set absent on ensure: > undefined method `destroy'' for #<Puppet::Type::Zfs:0x8e0db54> at > /path/v20z-base-zfs/manifests/init.pp:31 >This looks like a bug :)> The online type reference says "ensure" supports "absent" and "present" > for the ZFS type, and "provider/zfs/solaris.rb" suggests that deletion > should work as well: > > def create > zfs *([:create] + add_properties + [@resource[:name]]) > end > > def delete > zfs(:destroy, @resource[:name]) > end >It is calling destroy(), but it isn''t defined. Rename "def delete" to "def destroy" and it should work - I''ll file a bug... cheers, /Martin --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Hans van der Made
2009-Sep-03 20:15 UTC
[Puppet Users] Re: ZFS provider does not delete - user or puppet error?
Hi Martin,>> err: //Node[nodename]/v20z-base-zfs/Zfs[rpool/export/home]/ensure: >> change from present to absent failed: Could not set absent on ensure: >> undefined method `destroy'' for #<Puppet::Type::Zfs:0x8e0db54> at >> /path/v20z-base-zfs/manifests/init.pp:31 >> > This looks like a bug :)> It is calling destroy(), but it isn''t defined. Rename "def delete" to > "def destroy" and it should work - I''ll file a bug...That was easy :-) Thanks! Best, Hans NL --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Hans van der Made
2009-Sep-04 09:19 UTC
[Puppet Users] Re: ZFS provider does not delete - user or puppet error?
>> err: //Node[nodename]/v20z-base-zfs/Zfs[rpool/export/home]/ensure: >> change from present to absent failed: Could not set absent on ensure: >> undefined method `destroy'' for #<Puppet::Type::Zfs:0x8e0db54> at >> /path/v20z-base-zfs/manifests/init.pp:31 >> > This looks like a bug :)> It is calling destroy(), but it isn''t defined. Rename "def delete" to > "def destroy" and it should work - I''ll file a bug...After editing provider/zfs/solaris.rb: debug: //Node[nodename]/v20z-base-zfs/Zfs[rpool/export/home]: 1 change(s) debug: Puppet::Type::Zfs::ProviderSolaris: Executing ''/usr/sbin/zfs destroy rpool/export/home'' notice: //Node[nodename]/v20z-base-zfs/Zfs[rpool/export/home]/ensure: removed Seems like you''re right, great. Thanks again, best, Hans NL --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
James Turnbull
2009-Sep-04 09:37 UTC
[Puppet Users] Re: ZFS provider does not delete - user or puppet error?
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hans van der Made wrote:> > Seems like you''re right, great. >This will get fixed in 0.25.0. I''ve just pushed a patch for it. Regards James Turnbull - -- Author of: * Pro Linux Systems Administration (http://tinyurl.com/linuxadmin) * Pulling Strings with Puppet (http://tinyurl.com/pupbook) * Pro Nagios 2.0 (http://tinyurl.com/pronagios) * Hardening Linux (http://tinyurl.com/hardeninglinux) -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.7 (Darwin) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iQEVAwUBSqDf4CFa/lDkFHAyAQJlXAf/eDpxlrqs+f7TTXKVQIYyGkVnujEK+ahw FAujVRRyiV7/xdJJRBnCHvM7uVRPfmig47tY5VlLf0M18FTdoAqXWV02rKsXnG7/ 6HmTH9L7mejeTJyKjMV78YXm3gvclXqSuT9olA0xsWcip0gd/gJMHZHXpB5gQL1o //F8Okp4tqVwOgwlV34d+03487IIzWoZizl7gf971lCoGyenCFYueVp/LuqmXFUR wrfqpE8o+KMzeANJ3lqeK+UbLwZjPq3TvYR1HZtYaKQGw27x7OHtJMfKsq69Q759 GqD/BmwYwXpcz+8LW/cKWNy8a3G5/1oC748yFzpapwBxp5w9eYLklg==+0Du -----END PGP SIGNATURE----- --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---