Bug 783223

Summary: Push Scout configs not working / function rhn_install_satellite(numeric, numeric) does not exist
Product: [Community] Spacewalk Reporter: schuler.philipp
Component: ServerAssignee: Jan Pazdziora <jpazdziora>
Status: CLOSED CURRENTRELEASE QA Contact: Red Hat Satellite QA List <satqe-list>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 1.6CC: jpazdziora
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: spacewalk-schema-1.7.17-1 spacewalk-web-1.7.7-1 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-03-07 09:54:43 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Bug Depends On:    
Bug Blocks: 765736    

Description schuler.philipp 2012-01-19 17:49:06 UTC
Description of problem:
When trying to push scout configs, it loads forever, throws exception 

Error message:
 RHN::Exception: DBD::Pg::st execute failed: ERROR:  function rhn_install_satellite(numeric, numeric) does not exist
LINE 1: SELECT  rhn_install_satellite( $1 ,  $2 )
               ^
HINT:  No function matches the given name and argument types. You might need to add explicit type casts.
QUERY:  SELECT  rhn_install_satellite( $1 ,  $2 )
CONTEXT:  PL/pgSQL function "rhn_install_org_satellites" line 22 at PERFORM
 RHN::DB /usr/share/perl5/vendor_perl/RHN/DB.pm 228 RHN::Exception::DB::throw
 RHN::DB::db /usr/share/perl5/vendor_perl/RHN/DB.pm 467 RHN::DB::handle_error
 RHN::DB::db /usr/share/perl5/vendor_perl/RHN/DB.pm 431 RHN::DB::db::call_function
 RHN::DB::SatCluster /usr/share/perl5/vendor_perl/RHN/DB/SatCluster.pm 329 RHN::DB::db::call_procedure
 Sniglets::ListView::ScoutList /usr/share/perl5/vendor_perl/Sniglets/ListView/ScoutList.pm 129 RHN::DB::SatCluster::push_config
 Sniglets::ListView::List /usr/share/perl5/vendor_perl/Sniglets/ListView/List.pm 374 Sniglets::ListView::ScoutList::push_config_cb
 Sniglets::Lists /usr/share/perl5/vendor_perl/Sniglets/Lists.pm 135 Sniglets::ListView::List::callback
 PXT::ApacheHandler /usr/share/perl5/vendor_perl/PXT/ApacheHandler.pm 489 Sniglets::Lists::listview_cb
 PXT::ApacheHandler /usr/share/perl5/vendor_perl/PXT/ApacheHandler.pm 103 PXT::ApacheHandler::pxt_parse_data
 PXT::ApacheHandler /usr/share/perl5/vendor_perl/PXT/ApacheHandler.pm 103 (eval)
 main -e 0 PXT::ApacheHandler::handler
 main -e 0 (eval)


Version-Release number of selected component (if applicable):
Spacewalk 1.6 / Postgresql backend

How reproducible:

Go to Monitoring->Scout Config Push -> select and click push

  
Actual results:
see above

Expected results:
it should push the configs

Additional info:
/usr/share/spacewalk/setup/upgrade/rhn-enable-monitoring.pl  results in

RHN::Exception: DBD::Pg::st execute failed: ERROR:  column "sysdate" does not exist
ZEILE 4:            last_update_date = sysdate
                                       ^
  RHN::DB /usr/share/perl5/vendor_perl/RHN/DB.pm 228 RHN::Exception::DB::throw
  RHN::DB::st /usr/share/perl5/vendor_perl/RHN/DB.pm 564 RHN::DB::handle_error
  RHN::DB::SatInstall /usr/share/perl5/vendor_perl/RHN/DB/SatInstall.pm 67 RHN::DB::st::execute_h
  main /usr/share/spacewalk/setup/upgrade/rhn-enable-monitoring.pl 115 RHN::DB::SatInstall::update_monitoring_config

however monitoring services are running. So i dont know if this is really related

Comment 1 Jan Pazdziora 2012-01-20 09:53:32 UTC
Possibly related:

https://www.redhat.com/archives/spacewalk-list/2012-January/msg00091.html

Comment 2 Jan Pazdziora 2012-01-20 10:02:36 UTC
(In reply to comment #0)
> Description of problem:
> When trying to push scout configs, it loads forever, throws exception 
> 
> Error message:
>  RHN::Exception: DBD::Pg::st execute failed: ERROR:  function
> rhn_install_satellite(numeric, numeric) does not exist
> LINE 1: SELECT  rhn_install_satellite( $1 ,  $2 )
>                ^
> HINT:  No function matches the given name and argument types. You might need to
> add explicit type casts.
> QUERY:  SELECT  rhn_install_satellite( $1 ,  $2 )
> CONTEXT:  PL/pgSQL function "rhn_install_org_satellites" line 22 at PERFORM

When you connect to your PostgreSQL with psql, what does

\df rhn_install_satellite

show?

Comment 3 schuler.philipp 2012-01-20 13:03:43 UTC
\df rhn_install_satellite gives
--------+-----------------------+------------------+----------------------------------------------------+--------
 public | rhn_install_satellite | void             | command_instance_id smallint, satellite_id numeric | normal

So I assume parameter 1 is given in wrong format

Comment 4 Jan Pazdziora 2012-01-20 13:22:19 UTC
Thanks. Was this a fresh 1.6 installation or upgrade from older version?

What OS version and architecture is this?

Comment 5 schuler.philipp 2012-01-20 13:48:09 UTC
I upgraded a 1.5 install to 1.6 (followed instructions here https://fedorahosted.org/spacewalk/wiki/HowToUpgrade)

[root@spacewalk ~]# uname -a
Linux HOSTNAME_HERE 2.6.32-131.17.1.el6.x86_64 #1 SMP Thu Oct 6 19:24:09 BST 2011 x86_64 x86_64 x86_64 GNU/Linux

[root@spacewalk ~]# cat /etc/issue
CentOS release 6.2 (Final)
Kernel \r on an \m

basically all I did for updating was:
yum clean all;yum upgrade
rpmconf -a 
/usr/bin/spacewalk-schema-upgrade (succeeded)
spacewalk-setup --disconnected --upgrade (succeeded)
rm -f /var/lib/jabberd/db/*
service rhn-search cleanindex
/usr/sbin/spacewalk-service start

Comment 6 Jan Pazdziora 2012-01-23 13:29:09 UTC
Fixed in Spacewalk master, 5f8531c716d771de4cbf90db450f7582fab4a26d.

Comment 7 schuler.philipp 2012-01-23 13:50:38 UTC
thanks(In reply to comment #6)
> Fixed in Spacewalk master, 5f8531c716d771de4cbf90db450f7582fab4a26d.

thanks for the quick fix! 

Could you give me a short howto-fix a 1.6 installation ?

Comment 8 Jan Pazdziora 2012-01-23 13:58:06 UTC
Two more commits in Spacewalk master, c000aeee3f6a60b2db669b87626c309c5e85933d and 9d16068e1c3251b2247d01c6a2c28becf8762dfb.

Comment 10 schuler.philipp 2012-01-23 16:13:49 UTC
applied patches/sql... "push scout config" doesnt throw an exception anymore but it still loads the page forever. However if I restart the spacewalk service, it says "push initiated" and the probe configs are then indeed updated.

Comment 11 Jan Pazdziora 2012-03-07 09:54:43 UTC
Spacewalk 1.7 has been released:

https://fedorahosted.org/spacewalk/wiki/ReleaseNotes17