Skip to content
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
merged 1 commit into from
Mar 28, 2014

Conversation

Administratoor
Copy link
Contributor

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;

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;
scrat14 pushed a commit that referenced this pull request Mar 28, 2014
Initialization of variable in check_rhev3.pl
@scrat14 scrat14 merged commit ff524fd into ovido:master Mar 28, 2014
@scrat14 scrat14 added this to the check_rhev3 - 1.4 milestone Apr 16, 2014
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants