monitoring/PerlModules/NP/OracleDB/NPRecords.pm | 4 ++--
monitoring/PerlModules/NP/Probe/Config/ProbeRecord.pm | 4 ++--
monitoring/PerlModules/NP/ProcessPool/Process.pm | 2 --
monitoring/SatConfig/cluster/ConfigObject.pm | 2 +-
4 files changed, 5 insertions(+), 7 deletions(-)
New commits:
commit 32073ab4de72201e79ba587ee268ca0888247587
Author: Jan Pazdziora <jpazdziora(a)redhat.com>
Date: Thu Aug 11 10:01:55 2011 +0200
Localization of STDOUT and STDERR was overoptimistic.
Fixing a54bc8d1ef83a951e8e945f11ca2d203b52311bf.
This caused us to be hit by
https://rt.perl.org/rt3/Public/Bug/Display.html?id=66224
diff --git a/monitoring/PerlModules/NP/ProcessPool/Process.pm
b/monitoring/PerlModules/NP/ProcessPool/Process.pm
index ba18a9d..bd5a0df 100644
--- a/monitoring/PerlModules/NP/ProcessPool/Process.pm
+++ b/monitoring/PerlModules/NP/ProcessPool/Process.pm
@@ -108,11 +108,9 @@ sub spawn {
my $f;
$f = sprintf($stdout, $$);
- local * STDOUT;
open(STDOUT, '>', $f) or die "Couldn't create $f: $!";
$f = sprintf($stderr, $$);
- local * STDERR;
open(STDERR, '>>', $f) or die "Couldn't create $f: $!";
commit 3e5e0e8bed10f4457cc58ef1624646196809fc47
Author: Jan Pazdziora <jpazdziora(a)redhat.com>
Date: Wed Aug 10 13:20:13 2011 +0200
The column names are always uppercase, due to the FetchHashKeyName setting.
Addressing
$ rhn-runprobe --probe=1 --log=all=4
Can't locate object method "hostaddress" via package
"NOCpulse::Probe::Config::ProbeRecord" at blib/lib/Class/MethodMaker/Engine.pm
(autosplit into blib/lib/auto/Class/MethodMaker/Engine/new.al) line 941.
and/or
Can't locate object method "hostname" via package
"NOCpulse::Probe::Config::ProbeRecord" at blib/lib/Class/MethodMaker/Engine.pm
(autosplit into blib/lib/auto/Class/MethodMaker/Engine/new.al) line 941.
diff --git a/monitoring/PerlModules/NP/Probe/Config/ProbeRecord.pm
b/monitoring/PerlModules/NP/Probe/Config/ProbeRecord.pm
index 35a322e..bf6c09a 100644
--- a/monitoring/PerlModules/NP/Probe/Config/ProbeRecord.pm
+++ b/monitoring/PerlModules/NP/Probe/Config/ProbeRecord.pm
@@ -53,8 +53,8 @@ my %FIELD_MAP =
ADDRESS => undef,
contactGroupCustomers => 'contact_group_customers',
contactGroupNames => 'contact_group_names',
- hostAddress => 'host_ip',
- hostName => 'host_name',
+ HOSTADDRESS => 'host_ip',
+ HOSTNAME => 'host_name',
hostRecid => 'host_id',
parsedCommandLine => 'parameters',
);
commit 7b2cd4d3e601e176066d537c5608452622296490
Author: Jan Pazdziora <jpazdziora(a)redhat.com>
Date: Wed Aug 10 13:20:13 2011 +0200
The column names are always uppercase, due to the FetchHashKeyName setting.
Addressing
Wed Aug 10 06:21:47 2011: ERROR: Spacewalk 1: Cannot generate configuration: Cannot
load satellite information
Message ProbeRecord::get_hostAddress() not understood
TRACEBACK:
at /usr/lib/perl5/vendor_perl/5.8.8/NOCpulse/Object.pm line 443
NOCpulse::Object::doesNotUnderstand('ProbeRecord=HASH(0x9c95f78)',
'ProbeRecord', 'get_hostAddress') called at
/usr/lib/perl5/vendor_perl/5.8.8/NOCpulse/Object.pm line 463
NOCpulse::Object::AUTOLOAD('ProbeRecord=HASH(0x9c95f78)') called at
/usr/lib/perl5/vendor_perl/5.8.8/NOCpulse/NPRecords.pm line 337
ProbeRecord::__ANON__('ProbeRecord=HASH(0x9c95f78)') called at
/usr/lib/perl5/vendor_perl/5.8.8/NOCpulse/DBRecord.pm line 211
NOCpulse::DBRecord::Map('ProbeRecord', 'CODE(0x9c79a64)') called at
/usr/lib/perl5/vendor_perl/5.8.8/NOCpulse/NPRecords.pm line 342
ProbeRecord::LoadForSatellite('ProbeRecord', 1) called at
/usr/lib/perl5/vendor_perl/5.8.8/NOCpulse/SatConfig/GenerateConfig.pm line 60
eval {...} called at
/usr/lib/perl5/vendor_perl/5.8.8/NOCpulse/SatConfig/GenerateConfig.pm line 59
eval {...} called at
/usr/lib/perl5/vendor_perl/5.8.8/NOCpulse/SatConfig/GenerateConfig.pm line 19
NOCpulse::SatConfig::GenerateConfig::handler('Apache2::RequestRec=SCALAR(0x9b6d430)')
called at -e line 0
eval {...} called at -e line 0
diff --git a/monitoring/PerlModules/NP/OracleDB/NPRecords.pm
b/monitoring/PerlModules/NP/OracleDB/NPRecords.pm
index 7fa22bd..ab0058c 100644
--- a/monitoring/PerlModules/NP/OracleDB/NPRecords.pm
+++ b/monitoring/PerlModules/NP/OracleDB/NPRecords.pm
@@ -109,7 +109,7 @@ sub LoadForSatellite
my $probe_col_str = join(",\n" . ' ' x 17, @probe_cols);
my $host_col_str = q{
- host.ip as "hostAddress",
+ host.ip as hostaddress,
host.name as "hostName",
host.os_id};
@@ -335,7 +335,7 @@ sub LoadForSatellite
$class->Map(sub {
my $self = shift();
$self->addInstVar('parsedCommandLine',
-
$self->commandLine($self->get_hostAddress,
+
$self->commandLine($self->get_HOSTADDRESS,
$self->get_CUSTOMER_ID,
$self->get_NETSAINT_ID));
}
commit eae151e4777ed27c668efcc6eaa389e0505d7173
Author: Jan Pazdziora <jpazdziora(a)redhat.com>
Date: Wed Aug 10 12:10:18 2011 +0200
Report the error to STDERR, not STDOUT.
diff --git a/monitoring/SatConfig/cluster/ConfigObject.pm
b/monitoring/SatConfig/cluster/ConfigObject.pm
index 3bc6d99..67ea0cd 100644
--- a/monitoring/SatConfig/cluster/ConfigObject.pm
+++ b/monitoring/SatConfig/cluster/ConfigObject.pm
@@ -145,7 +145,7 @@ sub readFromFile
$filename = $self->configValue('configFile');
}
if (! -f $filename ) {
- print "!!! ******* ERROR ******* !!!: NO CONFIG FILE FOR ".ref($self)."
($filename)!!!!\n";
+ print STDERR "!!! ******* ERROR ******* !!!: NO CONFIG FILE FOR
".ref($self)." ($filename)!!!!\n";
} else {
local * FILE;
open(FILE, '<', $filename);