Bug 467049 - undefined value at /usr/lib/perl5/site_perl/5.8.5/NOCpulse/SatConfig/TranslateKey.pm
undefined value at /usr/lib/perl5/site_perl/5.8.5/NOCpulse/SatConfig/Translat...
Status: CLOSED CURRENTRELEASE
Product: Spacewalk
Classification: Community
Component: Server (Show other bugs)
0.2
All Linux
medium Severity medium
: ---
: ---
Assigned To: Michael Mráka
Shannon Hughes
:
Depends On:
Blocks: space04
  Show dependency treegraph
 
Reported: 2008-10-15 09:46 EDT by Michael Mráka
Modified: 2009-01-22 11:30 EST (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2009-01-22 11:30:02 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Michael Mráka 2008-10-15 09:46:41 EDT
+++ This bug was initially created as a clone of Bug #222630 +++

Public summary:
Enabling debugging on the satellite caused /var to fill up, and the satellite to fail. I can see the following errors in /var/log/httpd/error_log:

[Tue Nov 21 15:59:49 2006] [error] Can't call method "get_SAT_CLUSTER_ID" on an undefined value at /usr/lib/perl5/site_perl/5.8.5/NOCpulse/SatConfig/TranslateKey.pm line 53.!
[Tue Nov 21 16:00:49 2006] [error] Can't call method "get_SAT_CLUSTER_ID" on an undefined value at /usr/lib/perl5/site_perl/5.8.5/NOCpulse/SatConfig/TranslateKey.pm line 53.!
[Tue Nov 21 16:00:49 2006] [error] Can't call method "get_SAT_CLUSTER_ID" on an undefined value at /usr/lib/perl5/site_perl/5.8.5/NOCpulse/SatConfig/TranslateKey.pm line 53.!

Code from /usr/lib/perl5/site_perl/5.8.5/NOCpulse/SatConfig/TranslateKey.pm
where error occurs

 my $key    = $q->param('scout_shared_key');

    my $sat_record = SatNodeRecord->LoadOneFromSql("select sat_cluster_id
from rhn_sat_node where scout_shared_key = '$key'");
    my $sat_cluster_id = $sat_record->get_SAT_CLUSTER_ID;
    CFDBRecord->ReleaseAllInstances;


Steps to Reproduce:
1. wget -O - 'http://<satellite>/cgi-bin/translate_key.cgi?scout_shared_key=THISKEYDOESNOTEXIST'
  
Actual results:
==> /var/log/httpd/error_log <==
[Tue Oct 14 16:02:35 2008] [error] [client 127.0.0.1] Can't call method "get_SAT_CLUSTER_ID" on an undefined value at /usr/lib/perl5/site_perl/5.8.5/NOCpulse/SatConfig/TranslateKey.pm line 58.\n

==> /var/log/httpd/access_log <==
127.0.0.1 - - [14/Oct/2008:16:02:35 +0200] "GET /cgi-bin/translate_key.cgi?scout_shared_key=THISKEYDOESNOTEXIST HTTP/1.0" 500 3858 "-" "Wget/1.10.2 (Red Hat modified)"


Expected results:
no entry in error-log

==> /var/log/httpd/access_log <==
127.0.0.1 - - [14/Oct/2008:16:02:35 +0200] "GET /cgi-bin/translate_key.cgi?scout_shared_key=THISKEYDOESNOTEXIST HTTP/1.0" 500 3858 "-" "Wget/1.10.2 (Red Hat modified)"

Wget returns '503 Service Temporarily Unavailable'. That isn't an error.
Comment 1 Michael Mráka 2008-10-15 09:56:10 EDT
Fixed in git repo.

Created commit de062bc: 467049 - Reject if scout_shared_key is not in database
 1 files changed, 4 insertions(+), 0 deletions(-)
Comment 2 Shannon Hughes 2008-11-05 13:33:10 EST
used both wget and firefox according to the reproduction steps above and getting the following in the error_log, 

[Wed Nov 05 13:30:23 2008] [error] [client 10.11.228.31] failed to resolve handler `NOCpulse::MonitoringAccessHandler': Can't call method "get" on an undefined value at /usr/lib/perl5/site_perl/5.8.8/NOCpulse/OracleDB.pm line 81.\nCompilation failed in require at (eval 8394) line 3.\n
Comment 3 Michael Mráka 2008-11-06 07:50:17 EST
The bug you see has nothing in common with orginal bug. New one is in different file/package and is probably caused by missing configuration.
Comment 4 Miroslav Suchý 2009-01-15 07:58:39 EST
wget 'http://dhcp77-206.rhndev.redhat.com/cgi-bin/translate_key.cgi?scout_shared_key=THISKEYDOESNOTEXIST'

and no error in /var/log/httpd/error_log
VERIFIED

Note You need to log in before you can comment on or make changes to this bug.