Issue #20617 has been updated by Marc Fournier. File zpool-upgrade-v-on-omnios added
I disagree this is a "new feature", and request this should also be part of the next 1.7.x release. Testing this on a recent omnios (a rebranded opensolaris, see attached file), I noticed that the format of `zpool upgrade -v` is similar to zfsonlinux, and isn't parsed by zpool_verion.rb either. My bet is that this fact is going to start failing on more an more platforms, as zpool gets upgraded to whatever version changes the format of `zpool upgrade -v`. ---------------------------------------- Bug #20617: zpool_version fails using zfsonlinux https://projects.puppetlabs.com/issues/20617#change-90869 * Author: Trey Dockendorf * Status: Merged - Pending Release * Priority: Normal * Assignee: * Category: library * Target version: 2.0.0 * Keywords: * Branch: https://github.com/puppetlabs/facter/pull/439 * Affected Facter version: 1.7.0 ---------------------------------------- The zpool_version fact fails when using zfsonlinux v0.6.1 Failure <pre> Could not retrieve zpool_version: undefined method `captures' for nil:NilClass </pre> Output from zpool upgrade -v <pre> # zpool upgrade -v This system supports ZFS pool feature flags. The following features are supported: FEAT DESCRIPTION ------------------------------------------------------------- async_destroy (read-only compatible) Destroy filesystems asynchronously. empty_bpobj (read-only compatible) Snapshots use less space. lz4_compress LZ4 compression algorithm support. The following legacy versions are also supported: VER DESCRIPTION --- -------------------------------------------------------- 1 Initial ZFS version 2 Ditto blocks (replicated metadata) 3 Hot spares and double parity RAID-Z 4 zpool history 5 Compression using the gzip algorithm 6 bootfs pool property 7 Separate intent log devices 8 Delegated administration 9 refquota and refreservation properties 10 Cache devices 11 Improved scrub performance 12 Snapshot properties 13 snapused property 14 passthrough-x aclinherit 15 user/group space accounting 16 stmf property support 17 Triple-parity RAID-Z 18 Snapshot user holds 19 Log device removal 20 Compression using zle (zero-length encoding) 21 Deduplication 22 Received properties 23 Slim ZIL 24 System attributes 25 Improved scrub stats 26 Improved snapshot deletion performance 27 Improved snapshot creation performance 28 Multiple vdev replacements For more information on a particular version, including supported releases, see the ZFS Administration Guide. </pre> Some initial testing shows the same method used to get 'zfs_version' works with zfsonlinux <pre> Facter.add('zpool_version') do confine :kernel => "Linux" setcode do if Facter::Util::Resolution.which('zpool') zpool_v = Facter::Util::Resolution.exec('zpool upgrade -v') zpool_version = zpool_v.scan(/^\s+(\d+)\s+/m).flatten.last unless zpool_v.nil? end end end </pre> This was done using puppet-3.1.1, facter-1.7.0 on SL6.4 -- You have received this notification because you have either subscribed to it, or are involved in it. To change your notification preferences, please click here: http://projects.puppetlabs.com/my/account -- You received this message because you are subscribed to the Google Groups "Puppet Bugs" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/puppet-bugs?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
