Skip to content

Commit

Permalink
Merge pull request #40 from sensu-plugins/pre-release/3.0.0
Browse files Browse the repository at this point in the history
prepping for 3.0.0 release
  • Loading branch information
Jef Spaleta authored Apr 14, 2020
2 parents 8e14253 + 72bbf13 commit 3047435
Show file tree
Hide file tree
Showing 9 changed files with 36 additions and 25 deletions.
5 changes: 0 additions & 5 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@ cache:
install:
- bundle install
rvm:
- 2.1
- 2.2
- 2.3.0
- 2.4.1
notifications:
Expand All @@ -26,8 +24,5 @@ deploy:
on:
tags: true
all_branches: true
rvm: 2.1
rvm: 2.2
rvm: 2.3.0
rvm: 2.4.1
repo: sensu-plugins/sensu-plugins-raid-checks
13 changes: 12 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,16 @@ Which is based on [Keep A Changelog](http://keepachangelog.com/)

## [Unreleased]

## [3.0.0] - 2020-04-14
### Breaking Changes
- `english` 0.6.3 has been yanked - https://rubygems.org/gems/english/versions/0.6.3.
- Bump minimum required ruby to 2.3
- Update bundler development dep to `2.1` to match travis environment
- Update sensu-plugin dep to `~> 4.0`. you can read the changelog entries for [4.0](https://github.com/sensu-plugins/sensu-plugin/blob/master/CHANGELOG.md#400---2018-02-17)
- Update rake dep
- Update robocup dep
- Update yard dep

## [2.0.3] - 2019-02-17
### Fixed
- `check-megaraid-sas-status.rb`: Fixed logic error in which it was assumed that all virtual drives were in sequential order. Also fixed pattern matching when parsing individual drive status. (@SeanSith)
Expand Down Expand Up @@ -70,7 +80,8 @@ Which is based on [Keep A Changelog](http://keepachangelog.com/)
### Added
- initial release

[Unreleased]: https://github.com/sensu-plugins/sensu-plugins-raid-checks/compare/2.0.3...HEAD
[Unreleased]: https://github.com/sensu-plugins/sensu-plugins-raid-checks/compare/3.0.0...HEAD
[3.0.0]: https://github.com/sensu-plugins/sensu-plugins-raid-checks/compare/2.0.3...3.0.0
[2.0.3]: https://github.com/sensu-plugins/sensu-plugins-raid-checks/compare/2.0.2...2.0.3
[2.0.2]: https://github.com/sensu-plugins/sensu-plugins-raid-checks/compare/2.0.1...2.0.2
[2.0.1]: https://github.com/sensu-plugins/sensu-plugins-raid-checks/compare/2.0.0...2.0.1
Expand Down
2 changes: 1 addition & 1 deletion Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ desc 'Test for binstubs'
task :check_binstubs do
bin_list = Gem::Specification.load('sensu-plugins-raid-checks.gemspec').executables
bin_list.each do |b|
`which #{ b }`
`which #{b}`
unless $CHILD_STATUS.success?
puts "#{b} was not a binstub"
exit
Expand Down
2 changes: 1 addition & 1 deletion bin/check-3ware-status.rb
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ def parse_disks!(data, controller)
unit = splitted[2]
if unit != '-' && unit != 'NOT-PRESENT'
# #YELLOW
if status == 'OK' # rubocop:disable BlockNesting
if status == 'OK' # rubocop:disable Metrics/BlockNesting
@good_disks << controller + unit + name + ': ' + status
else
@bad_disks << controller + unit + name + ': ' + status
Expand Down
2 changes: 1 addition & 1 deletion bin/check-megaraid-sas-status.rb
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ def run
# this reduces memory consumption as we don't care about the output in this conditional just whether or not it matches.
# The `.match?()` function was introduced in 2.4
unless Regexp.new(/State\s+:\s+Optimal/).match(stdout)
error = sprintf '%svirtual drive %d: %s ', error, i, stdout[/State\s*:\s*.*/].split(':')[1] # rubocop:disable Style/FormatString
error = sprintf '%svirtual drive %d: %s ', error, i, stdout[/State\s*:\s*.*/].split(':')[1] # rubocop:disable Style/FormatString, Style/FormatStringToken
have_error = true
end
end
Expand Down
2 changes: 1 addition & 1 deletion bin/check-mpt2sas-status.rb
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ def run
parts = line.match(volume_state)
unless parts.nil?
unless parts['VolState'] == 'Optimal'
error = format('%s%s ', error, parts['VolState'])
error = format('%s%s ', error, parts['VolState']) # rubocop:disable Style/FormatStringToken
have_error = true
end
end
Expand Down
5 changes: 5 additions & 0 deletions bin/check-raid.rb
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,11 @@ class CheckRaid < Sensu::Plugin::Check::CLI
#
def check_software_raid
return unless File.exist?('/proc/mdstat')

contents = File.read('/proc/mdstat')
mg = contents.lines.grep(/active|blocks/)
return if mg.empty?

sg = mg.to_s.lines.grep(/\]\(F\)|[\[U]_/)
if sg.empty?
ok 'Software RAID OK'
Expand All @@ -57,6 +59,7 @@ def check_software_raid
#
def check_hp
return unless File.exist?('/usr/bin/cciss_vol_status')

contents = `/usr/bin/cciss_vol_status /dev/sg0`
c = contents.lines.grep(/status\: OK\./)
# #YELLOW
Expand All @@ -71,6 +74,7 @@ def check_hp
#
def check_adaptec
return unless File.exist?('/usr/StorMan/arcconf')

contents = `/usr/StorMan/arcconf GETCONFIG 1 AL`

mg = contents.lines.grep(/Controller Status/)
Expand Down Expand Up @@ -107,6 +111,7 @@ def check_adaptec
#
def check_mega_raid
return unless File.exist?('/usr/sbin/megacli')

contents = if config[:log]
`/usr/sbin/megacli -AdpAllInfo -aALL`
else
Expand Down
4 changes: 2 additions & 2 deletions lib/sensu-plugins-raid-checks/version.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

module SensuPluginsRaidChecks
module Version
MAJOR = 2
MAJOR = 3
MINOR = 0
PATCH = 3
PATCH = 0

VER_STRING = [MAJOR, MINOR, PATCH].compact.join('.')
end
Expand Down
26 changes: 13 additions & 13 deletions sensu-plugins-raid-checks.gemspec
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
# frozen_string_literal: true

lib = File.expand_path('../lib', __FILE__)
lib = File.expand_path('lib', __dir__)
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)

require 'date'
require_relative 'lib/sensu-plugins-raid-checks'

Gem::Specification.new do |s| # rubocop:disable Metrics/BlockLength
Gem::Specification.new do |s|
s.authors = ['Sensu-Plugins and contributors']

s.date = Date.today.to_s
Expand All @@ -18,31 +18,31 @@ Gem::Specification.new do |s| # rubocop:disable Metrics/BlockLength
s.files = Dir.glob('{bin,lib}/**/*') + %w[LICENSE README.md CHANGELOG.md]
s.homepage = 'https://github.com/sensu-plugins/sensu-plugins-raid-checks'
s.license = 'MIT'
s.metadata = { 'maintainer' => 'sensu-plugin',
s.metadata = { 'maintainer' => 'sensu-plugin',
'development_status' => 'active',
'production_status' => 'unstable - testing recommended',
'release_draft' => 'false',
'production_status' => 'unstable - testing recommended',
'release_draft' => 'false',
'release_prerelease' => 'false' }
s.name = 'sensu-plugins-raid-checks'
s.platform = Gem::Platform::RUBY
s.post_install_message = 'You can use the embedded Ruby by setting EMBEDDED_RUBY=true in /etc/default/sensu'
s.require_paths = ['lib']
s.required_ruby_version = '>= 2.1.0'
s.required_ruby_version = '>= 2.3.0'

s.summary = 'Sensu plugins for working with raid evices'
s.test_files = s.files.grep(%r{^(test|spec|features)/})
s.version = SensuPluginsRaidChecks::Version::VER_STRING

s.add_runtime_dependency 'english', '0.6.3'
s.add_runtime_dependency 'sensu-plugin', '~> 1.2'
s.add_runtime_dependency 'english', '0.7.0'
s.add_runtime_dependency 'sensu-plugin', '~> 4.0'

s.add_development_dependency 'bundler', '~> 1.7'
s.add_development_dependency 'bundler', '~> 2.1'
s.add_development_dependency 'codeclimate-test-reporter', '~> 1.0'
s.add_development_dependency 'github-markup', '~> 3.0'
s.add_development_dependency 'pry', '~> 0.10'
s.add_development_dependency 'rake', '~> 12.3'
s.add_development_dependency 'rake', '~> 13.0'
s.add_development_dependency 'redcarpet', '~> 3.2'
s.add_development_dependency 'rspec', '~> 3.1'
s.add_development_dependency 'rubocop', '~> 0.51.0'
s.add_development_dependency 'yard', '~> 0.8'
s.add_development_dependency 'rspec', '~> 3.7'
s.add_development_dependency 'rubocop', '~> 0.80.1'
s.add_development_dependency 'yard', '~> 0.9.20'
end

0 comments on commit 3047435

Please sign in to comment.