sensu-plugins / community

Your place to contribute to Sensu plugins and their maintainers
http://sensu-plugins.io
MIT License
20 stars 9 forks source link

Test ruby install time with 2.4.1 on all repos #27

Open majormoses opened 7 years ago

majormoses commented 7 years ago

Basically sensu 0.29+ uses ruby 2.4 we need to start seeing what breaks horribly and prep for bumping sensu-plugin related to: #26,

I had started going through them ad-hoc for the last few weeks after merging requests but I think we need a bit more cadence on this so I pulled the list of remaining plugins and should circle back and update as we do this to bring some sanity to this madness.

remaining plugins:

eheydrick commented 7 years ago

There's some overlap between this list and the plugins that need to have the hard coded sensu-plugin 1.2.0 dep removed. Can you mark them off on https://github.com/sensu-plugins/sensu-plugins-feature-requests/projects/1 if any of those are updated.

majormoses commented 7 years ago

@eheydrick I have not seen them but we are gonna be bumping everything to 2.x shortly anyways so it seems like a moot point to update both and then update again. Just my 2 cents, if you feel there is value I am ok with doing it, it just slows down the process as its one more thing to check and update.

portertech commented 7 years ago

This is awesome.

@majormoses @eheydrick I am keen to begin tackling this, concurrently πŸ‘ I am going to select a chunk of the list and run the plugins through the process of install and --help or a similar argument that is available.

I am going to start with etcd through graylog. I will update this issue with my findings, I will leave it to @majormoses to update the checklist accordingly.

portertech commented 7 years ago

Using Docker ubuntu:16.06 and Sensu 0.29.0-11 to test the plugins via sensu-install.

root@86f6a33456b3:/# dpkg -l | grep sensu
ii  sensu                      0.29.0-11                          amd64        A monitoring framework that aims to be simple, malleable, and scalable.
root@86f6a33456b3:/# /opt/sensu/embedded/bin/ruby -v
ruby 2.4.1p111 (2017-03-22 revision 58053) [x86_64-linux]
majormoses commented 7 years ago

@portertech thanks for the help, please do them as PRs with your travis changes so that we can keep track of them all here and avoid committing to master directly. It also gives me an easy way to know which ones need to be checked off (some may require breaking changes and therefore a release before AND/OR after it is merged)

portertech commented 7 years ago

Some test results.

GOOD: etcd, execute, filesystem-checks, flowdock

BAD:

etcd

root@86f6a33456b3:/# sensu-install -p etcd
[SENSU-INSTALL] installing Sensu plugins ...
[SENSU-INSTALL] determining if Sensu gem 'sensu-plugins-etcd' is already installed ...
false
[SENSU-INSTALL] Sensu plugin gems to be installed: ["sensu-plugins-etcd"]
[SENSU-INSTALL] installing Sensu gem 'sensu-plugins-etcd'
Building native extensions.  This could take a while...
Successfully installed unf_ext-0.0.7.4
Fetching: unf-0.1.4.gem (100%)
Successfully installed unf-0.1.4
Fetching: domain_name-0.5.20170404.gem (100%)
Successfully installed domain_name-0.5.20170404
Fetching: http-cookie-1.0.3.gem (100%)
Successfully installed http-cookie-1.0.3
Fetching: mime-types-2.99.3.gem (100%)
Successfully installed mime-types-2.99.3
Fetching: netrc-0.11.0.gem (100%)
Successfully installed netrc-0.11.0
Fetching: rest-client-1.8.0.gem (100%)
Successfully installed rest-client-1.8.0
Fetching: mixlib-log-1.7.1.gem (100%)
Successfully installed mixlib-log-1.7.1
Fetching: etcd-0.3.0.gem (100%)
Successfully installed etcd-0.3.0
Fetching: sensu-plugins-etcd-1.0.0.gem (100%)
You can use the embedded Ruby by setting EMBEDDED_RUBY=true in /etc/default/sensu
Successfully installed sensu-plugins-etcd-1.0.0
10 gems installed
[SENSU-INSTALL] successfully installed Sensu plugins: ["sensu-plugins-etcd"]

root@86f6a33456b3:/# /opt/sensu/embedded/bin/check-etcd.rb --help
Usage: /opt/sensu/embedded/bin/check-etcd.rb (options)
    -a, --all                        check health of all etcd members
        --ca CA                      SSL CA file
        --cert CERT                  client SSL cert
        --insecure                   change SSL verify mode to false
        --key KEY                    client SSL key
        --passphrase PASSPHRASE      passphrase of the SSL key
    -p, --port PORT                  Etcd port, defaults to 2379
    -h, --host HOST                  Etcd host, defaults to localhost
        --ssl                        use HTTPS (default false)
root@86f6a33456b3:/# /opt/sensu/embedded/bin/check-flannel-subnet-count.rb --help
Usage: /opt/sensu/embedded/bin/check-flannel-subnet-count.rb (options)
        --ca CA                      SSL CA file
        --cert CERT                  client SSL cert
        --insecure                   change SSL verify mode to false
        --key KEY                    client SSL key
        --passphrase PASSPHRASE      passphrase of the SSL key
    -p, --port PORT                  Etcd port, defaults to 2379
    -h, --host HOST                  Etcd host, defaults to localhost
        --ssl                        use HTTPS (default false)
    -w, --warn COUNT                 Warn when number of subnets exceeds the max minus this threshold
root@86f6a33456b3:/# /opt/sensu/embedded/bin/check-etcd-peer-count.rb --help
Usage: /opt/sensu/embedded/bin/check-etcd-peer-count.rb (options)
        --ca CA                      SSL CA file
        --cert CERT                  client SSL cert
        --insecure                   change SSL verify mode to false
        --key KEY                    client SSL key
        --passphrase PASSPHRASE      passphrase of the SSL key
    -c, --count NUMBER               Number of expected etcd peers (required)
    -p, --port PORT                  Etcd port, defaults to 2379
    -h, --host HOST                  Etcd host, defaults to localhost
        --ssl                        use HTTPS (default false)

execute

root@86f6a33456b3:/# sensu-install -p execute
[SENSU-INSTALL] installing Sensu plugins ...
[SENSU-INSTALL] determining if Sensu gem 'sensu-plugins-execute' is already installed ...
false
[SENSU-INSTALL] Sensu plugin gems to be installed: ["sensu-plugins-execute"]
[SENSU-INSTALL] installing Sensu gem 'sensu-plugins-execute'
Fetching: sensu-plugin-1.2.0.gem (100%)
Successfully installed sensu-plugin-1.2.0
Fetching: systemu-2.6.5.gem (100%)
Successfully installed systemu-2.6.5
Fetching: sensu-plugins-execute-0.0.2.gem (100%)
You can use the embedded Ruby by setting EMBEDDED_RUBY=true in /etc/default/sensu
Successfully installed sensu-plugins-execute-0.0.2
3 gems installed
[SENSU-INSTALL] successfully installed Sensu plugins: ["sensu-plugins-execute"]

root@86f6a33456b3:/# /opt/sensu/embedded/bin/execute.rb --help
Usage: /opt/sensu/embedded/bin/execute.rb (options)

filesystem-checks

root@86f6a33456b3:/# sensu-install -p filesystem-checks
[SENSU-INSTALL] installing Sensu plugins ...
[SENSU-INSTALL] determining if Sensu gem 'sensu-plugins-filesystem-checks' is already installed ...
false
[SENSU-INSTALL] Sensu plugin gems to be installed: ["sensu-plugins-filesystem-checks"]
[SENSU-INSTALL] installing Sensu gem 'sensu-plugins-filesystem-checks'
Fetching: sensu-plugins-filesystem-checks-1.0.0.gem (100%)
You can use the embedded Ruby by setting EMBEDDED_RUBY=true in /etc/default/sensu
Successfully installed sensu-plugins-filesystem-checks-1.0.0
1 gem installed
[SENSU-INSTALL] successfully installed Sensu plugins: ["sensu-plugins-filesystem-checks"]

root@86f6a33456b3:/# /opt/sensu/embedded/bin/check-checksums.rb --help
Usage: /opt/sensu/embedded/bin/check-checksums.rb (options)
    -f, --files FILES                Comma separated list of files to check. (required)
    -h, --hash SHA2HASH              The hash these files must hash as. If unspecified the files will be compared to the first file.
    -H, --hashfile SHA2HASHFILE      The file containing the hash these files must hash as.
    -w, --warn-only                  Warn instead of critical if they don't match
root@86f6a33456b3:/# /opt/sensu/embedded/bin/check-dir-count.rb --help
Usage: /opt/sensu/embedded/bin/check-dir-count.rb (options)
    -c, --critical NUM               Critical if count of files is greater than provided number (required)
    -d, --dir DIR                    Directory to count files in (required)
    -w, --warning NUM                Warn if count of files is greater than provided number (required)
root@86f6a33456b3:/# /opt/sensu/embedded/bin/check-dir-size.rb --help
Usage: /opt/sensu/embedded/bin/check-dir-size.rb (options)
    -c, --critical SIZE_IN_BYTES     The size (in bytes) of the directory where CRITICAL is raised
    -d /path/to/directory,           Directory to stat (full path not including trailing slash) (required)
        --directory
    -p, --du-path /path/to/du        The path to the `du` command
        --ignore-missing             Do not throw CRITICAL if the directory is missing
    -w, --warn SIZE_IN_BYTES         The size (in bytes) of the directory where WARNING is raised
root@86f6a33456b3:/# /opt/sensu/embedded/bin/check-fs-writable.rb --help
Usage: /opt/sensu/embedded/bin/check-fs-writable.rb (options)
    -a, --auto-discover              Auto discover mount points via fstab
        --debug                      Print debug statements
    -d, --directory DIRECTORY        Directory to check for writability
root@86f6a33456b3:/# /opt/sensu/embedded/bin/check-mtime.rb --help
Usage: /opt/sensu/embedded/bin/check-mtime.rb (options)
    -c, --critical SECONDS           Critical if mtime greater than provided age in seconds
    -f, --file FILE                  File to check last modified time
    -o, --ok-no-exist                OK if file does not exist
    -z, --ok-zero-size               OK if file has zero size
    -w, --warning SECONDS            Warn if mtime greater than provided age in seconds
root@86f6a33456b3:/# /opt/sensu/embedded/bin/check-tail.rb --help
Usage: /opt/sensu/embedded/bin/check-tail.rb (options)
    -a, --absent                     Fail if pattern is absent
    -f, --file FILE                  Path to file
    -l, --lines LINES                Number of lines to tail
    -P, --pattern PAT                Pattern to search for
    -w, --warn-only                  Warn instead of critical on match

flowdock (handler)

root@86f6a33456b3:/# sensu-install -p flowdock
[SENSU-INSTALL] installing Sensu plugins ...
[SENSU-INSTALL] determining if Sensu gem 'sensu-plugins-flowdock' is already installed ...
false
[SENSU-INSTALL] Sensu plugin gems to be installed: ["sensu-plugins-flowdock"]
[SENSU-INSTALL] installing Sensu gem 'sensu-plugins-flowdock'
Fetching: multi_xml-0.6.0.gem (100%)
Successfully installed multi_xml-0.6.0
Fetching: httparty-0.15.5.gem (100%)
When you HTTParty, you must party hard!
Successfully installed httparty-0.15.5
Fetching: multi_json-1.12.1.gem (100%)
Successfully installed multi_json-1.12.1
Fetching: flowdock-0.7.0.gem (100%)
Successfully installed flowdock-0.7.0
Fetching: sensu-plugins-flowdock-0.1.1.gem (100%)
You can use the embedded Ruby by setting EMBEDDED_RUBY=true in /etc/default/sensu
Successfully installed sensu-plugins-flowdock-0.1.1
5 gems installed
[SENSU-INSTALL] successfully installed Sensu plugins: ["sensu-plugins-flowdock"]

root@86f6a33456b3:/# /opt/sensu/embedded/bin/handler-flowdock.rb --help
Usage: /opt/sensu/embedded/bin/handler-flowdock.rb (options)
    -j, --json_config JsonConfig     Config Name
portertech commented 7 years ago

@majormoses I will create PRs with the travis.yml updates for the plugins above, associating them with this issue πŸ‘

portertech commented 7 years ago

@majormoses @eheydrick I only had enough time today to smash on those 4, please let me know if the PRs are sufficient.

1082

majormoses commented 7 years ago

@portertech for sure I will review them shortly I will probably merge and release the ones that have breaking changes tonight as I don't believe in functional changes not being released as this incurs unneeded risk.

Evesy commented 7 years ago

@majormoses sensu-plugins-skyline can be removed from the list as it is no longer maintained :)

majormoses commented 7 years ago

@Evesy @thomasriley you guys are awesome! We are over 1/2 way done with install testing. There is no way I would have gotten around to all this on my own this quickly. Sounds like we are getting close to needing some decisions on runtime testing requirements so I can scope out that work before we get done here. I will start that discussion internally and update that issue.

thomasriley commented 7 years ago

@majormoses sensu-plugins-varnish can be checked off the list because it's already been done by yourself :) However as I already forked it I took the opportunity to remove some redundant code from the Rakefile.

thomasriley commented 7 years ago

@majormoses the plugins below have already been done so can be checked off:

sensu-plugins-chatwork sensu-plugins-docker sensu-plugins-flowdock sensu-plugins-riak sensu-plugins-twemproxy

majormoses commented 7 years ago

rethinkdb has had changes but is blocked on release because of this: https://github.com/sensu-plugins/sensu-plugins-rethinkdb/issues/2

majormoses commented 7 years ago

I think there might be some caching issues with the list items, I see ones unchecked I know I previously checked off...

mbbroberg commented 7 years ago

Are we really down to just 1 more plugin out of this list?! It looks like sensu-plugins-percona is the last (accepting the blocked rethinkdb one)?!

majormoses commented 7 years ago

yes, we are gonna move to runtime testing but we need to figure out what that means. I think we should move on and worry about percona separately since it's blocked by upstream issues.