[Pkg-puppet-devel] [SCM] Puppet packaging for Debian branch, experimental, updated. debian/2.6.8-1-844-g7ec39d5
Nick Lewis
nick at puppetlabs.com
Tue May 10 08:05:29 UTC 2011
The following commit has been merged in the experimental branch:
commit b1d97284d0fea1cbcc52bc55117a4b1ad3cf385b
Author: Devon Peters <devon.peters at e-hps.com>
Date: Tue Dec 14 14:05:55 2010 -0800
(#5496) zpool provider supports new 'zpool status' format
The "Solaris 10 9/10 release (Update 9)" update changed the output from
the "zpool status" command, which breaks the zpool provider. The format
basically changed from "vdev" to "vdev-n" (ex: "mirror" to "mirror-0"),
which the current provider doesn't recognize.
This fix changes the way vdev's are checked by the zpool provider, to
support either format.
Reviewed-By: Nick Lewis
diff --git a/lib/puppet/provider/zpool/solaris.rb b/lib/puppet/provider/zpool/solaris.rb
index e597c2a..758ea61 100644
--- a/lib/puppet/provider/zpool/solaris.rb
+++ b/lib/puppet/provider/zpool/solaris.rb
@@ -19,11 +19,13 @@ Puppet::Type.type(:zpool).provide(:solaris) do
pool_array.reverse.each do |value|
sym = nil
case value
- when "spares"; sym = :spare
- when "logs"; sym = :log
- when "mirror", "raidz1", "raidz2"
- sym = value == "mirror" ? :mirror : :raidz
- pool[:raid_parity] = "raidz2" if value == "raidz2"
+ when "spares";
+ sym = :spare
+ when "logs";
+ sym = :log
+ when /^mirror|^raidz1|^raidz2/;
+ sym = value =~ /^mirror/ ? :mirror : :raidz
+ pool[:raid_parity] = "raidz2" if value =~ /^raidz2/
else
tmp << value
sym = :disk if value == pool_array.first
--
Puppet packaging for Debian
More information about the Pkg-puppet-devel
mailing list