ohai 14.0.28 → 14.0.29
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/ohai/plugins/zpools.rb +20 -15
- data/lib/ohai/version.rb +1 -1
- metadata +3 -3
    
        checksums.yaml
    CHANGED
    
    | @@ -1,7 +1,7 @@ | |
| 1 1 | 
             
            ---
         | 
| 2 2 | 
             
            SHA256:
         | 
| 3 | 
            -
              metadata.gz:  | 
| 4 | 
            -
              data.tar.gz:  | 
| 3 | 
            +
              metadata.gz: 7df4dd6c34ba7a1c5bb097c52ae9e0ffb6a7ce4048d9b1a86c6aaaafa254f121
         | 
| 4 | 
            +
              data.tar.gz: e00d3d6086d05d0cbb5148fca5a50feb4173a6fbea67308de815e922ba01b19a
         | 
| 5 5 | 
             
            SHA512:
         | 
| 6 | 
            -
              metadata.gz:  | 
| 7 | 
            -
              data.tar.gz:  | 
| 6 | 
            +
              metadata.gz: 1cebf6a450da08fc94f2b2ef08b7935acbc4a0e0006d574324ad15282a503454ff5afaa4babd0cb6a959f81a046d06c151bfa0b1f7fdf58fe4b87439ea205090
         | 
| 7 | 
            +
              data.tar.gz: 29b5fed44d109190a2f1cfcdd52965f8aef6a9d15c74fac2c6412773142041b8433fbbb491072d0a2b54cabeeaad040a60c757196df1655ca1c81fb7ddc3a69d
         | 
    
        data/lib/ohai/plugins/zpools.rb
    CHANGED
    
    | @@ -28,21 +28,26 @@ Ohai.plugin(:Zpools) do | |
| 28 28 |  | 
| 29 29 | 
             
              def gather_pool_info
         | 
| 30 30 | 
             
                pools = Mash.new
         | 
| 31 | 
            -
                 | 
| 32 | 
            -
             | 
| 33 | 
            -
             | 
| 34 | 
            -
                   | 
| 35 | 
            -
             | 
| 36 | 
            -
                     | 
| 37 | 
            -
             | 
| 38 | 
            -
             | 
| 39 | 
            -
             | 
| 40 | 
            -
             | 
| 41 | 
            -
             | 
| 42 | 
            -
             | 
| 43 | 
            -
             | 
| 44 | 
            -
             | 
| 31 | 
            +
                begin
         | 
| 32 | 
            +
                  # Grab ZFS zpools overall health and attributes
         | 
| 33 | 
            +
                  so = shell_out("zpool list -H -o name,size,alloc,free,cap,dedup,health,version")
         | 
| 34 | 
            +
                  so.stdout.lines do |line|
         | 
| 35 | 
            +
                    case line
         | 
| 36 | 
            +
                    when /^([-_0-9A-Za-z]*)\s+([.0-9]+[MGTPE])\s+([.0-9]+[MGTPE])\s+([.0-9]+[MGTPE])\s+(\d+%)\s+([.0-9]+x)\s+([-_0-9A-Za-z]+)\s+(\d+|-)$/
         | 
| 37 | 
            +
                      Ohai::Log.debug("Plugin Zpools: Parsing zpool list line: #{line.chomp}")
         | 
| 38 | 
            +
                      pools[$1] = Mash.new
         | 
| 39 | 
            +
                      pools[$1][:pool_size] = sanitize_value($2)
         | 
| 40 | 
            +
                      pools[$1][:pool_allocated] = sanitize_value($3)
         | 
| 41 | 
            +
                      pools[$1][:pool_free] = sanitize_value($4)
         | 
| 42 | 
            +
                      pools[$1][:capacity_used] = sanitize_value($5)
         | 
| 43 | 
            +
                      pools[$1][:dedup_factor] = sanitize_value($6)
         | 
| 44 | 
            +
                      pools[$1][:health] = sanitize_value($7)
         | 
| 45 | 
            +
                      pools[$1][:zpool_version] = sanitize_value($8)
         | 
| 46 | 
            +
                    end
         | 
| 45 47 | 
             
                  end
         | 
| 48 | 
            +
             | 
| 49 | 
            +
                rescue Ohai::Exceptions::Exec
         | 
| 50 | 
            +
                  Ohai::Log.debug('Plugin Zpools: Could not shell_out "zpool list -H -o name,size,alloc,free,cap,dedup,health,version". Skipping plugin.')
         | 
| 46 51 | 
             
                end
         | 
| 47 52 | 
             
                pools
         | 
| 48 53 | 
             
              end
         | 
| @@ -82,6 +87,6 @@ Ohai.plugin(:Zpools) do | |
| 82 87 | 
             
                end
         | 
| 83 88 |  | 
| 84 89 | 
             
                # Set the zpools data
         | 
| 85 | 
            -
                zpools pools
         | 
| 90 | 
            +
                zpools pools unless pools.empty?
         | 
| 86 91 | 
             
              end
         | 
| 87 92 | 
             
            end
         | 
    
        data/lib/ohai/version.rb
    CHANGED
    
    
    
        metadata
    CHANGED
    
    | @@ -1,14 +1,14 @@ | |
| 1 1 | 
             
            --- !ruby/object:Gem::Specification
         | 
| 2 2 | 
             
            name: ohai
         | 
| 3 3 | 
             
            version: !ruby/object:Gem::Version
         | 
| 4 | 
            -
              version: 14.0. | 
| 4 | 
            +
              version: 14.0.29
         | 
| 5 5 | 
             
            platform: ruby
         | 
| 6 6 | 
             
            authors:
         | 
| 7 7 | 
             
            - Adam Jacob
         | 
| 8 8 | 
             
            autorequire: 
         | 
| 9 9 | 
             
            bindir: bin
         | 
| 10 10 | 
             
            cert_chain: []
         | 
| 11 | 
            -
            date: 2018-03- | 
| 11 | 
            +
            date: 2018-03-26 00:00:00.000000000 Z
         | 
| 12 12 | 
             
            dependencies:
         | 
| 13 13 | 
             
            - !ruby/object:Gem::Dependency
         | 
| 14 14 | 
             
              name: systemu
         | 
| @@ -542,7 +542,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement | |
| 542 542 | 
             
                  version: '0'
         | 
| 543 543 | 
             
            requirements: []
         | 
| 544 544 | 
             
            rubyforge_project: 
         | 
| 545 | 
            -
            rubygems_version: 2.7. | 
| 545 | 
            +
            rubygems_version: 2.7.5
         | 
| 546 546 | 
             
            signing_key: 
         | 
| 547 547 | 
             
            specification_version: 4
         | 
| 548 548 | 
             
            summary: Ohai profiles your system and emits JSON
         |