Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 467049 - undefined value at /usr/lib/perl5/site_perl/5.8.5/NOCpulse/SatConfig/TranslateKey.pm
Summary: undefined value at /usr/lib/perl5/site_perl/5.8.5/NOCpulse/SatConfig/Translat...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Spacewalk
Classification: Community
Component: Server
Version: 0.2
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Michael Mráka
QA Contact: Shannon Hughes
URL:
Whiteboard:
Depends On:
Blocks: space04
TreeView+ depends on / blocked
 
Reported: 2008-10-15 13:46 UTC by Michael Mráka
Modified: 2009-01-22 16:30 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2009-01-22 16:30:02 UTC


Attachments (Terms of Use)

Description Michael Mráka 2008-10-15 13:46:41 UTC
+++ 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 13:56:10 UTC
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 18:33:10 UTC
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 12:50:17 UTC
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 12:58:39 UTC
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.