This repository has been archived by the owner on Sep 26, 2019. It is now read-only.
Initialization of variable in check_rhev3.pl #22
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Bugfix of Syntaxerror for the attached call.
If only 1 Datacenter exists and the datacenter is not up there is no initialization of the variable 'up'
/githubcheck_rhev3/plugin-dir/check_rhev3.pl -H "MY-IP" -a "MY-LOGIN" -D "MY-DATACENTER" -s status
Use of uninitialized value $comp_state{"up"} in concatenation (.) or string at /github/check_rhev3/plugin-dir/check_rhev3.pl line 1548.
Use of uninitialized value in numeric eq (==) at /github/check_rhev3/plugin-dir/check_rhev3.pl line 1572.
Use of uninitialized value in numeric gt (>) at /github/check_rhev3/plugin-dir/check_rhev3.pl line 1572.
Use of uninitialized value in numeric gt (>) at /github/check_rhev3/plugin-dir/check_rhev3.pl line 1574.
Use of uninitialized value $comp_state{"up"} in concatenation (.) or string at /github/check_rhev3/plugin-dir/check_rhev3.pl line 1577.
RHEV CRITICAL: Datacenters critical - /1 Datacenters with state UP |up=;1;1;0; problematic=1;;;0; uninitialized=0;;;0; not_operational=0;;;0; maintenance=0;;;0; contend=0;;;0;
Same call after the fix:
RHEV CRITICAL: Datacenters critical - 0/1 Datacenters with state UP |up=0;1;1;0; problematic=1;;;0; uninitialized=0;;;0; not_operational=0;;;0; maintenance=0;;;0; contend=0;;;0;