Bug 729227 - Function "Remote Command" does not work with multiple servers
Summary: Function "Remote Command" does not work with multiple servers
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Spacewalk
Classification: Community
Component: Server
Version: 1.5
Hardware: x86_64
OS: Linux
unspecified
high
Target Milestone: ---
Assignee: Michael Mráka
QA Contact: Red Hat Satellite QA List
URL:
Whiteboard:
Depends On:
Blocks: space16
TreeView+ depends on / blocked
 
Reported: 2011-08-09 06:25 UTC by val.khmyrov
Modified: 2011-12-22 16:46 UTC (History)
0 users

Fixed In Version: spacewalk-web-1.6.4-1 b
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-12-22 16:46:37 UTC


Attachments (Terms of Use)
/var/log/httpd/error_log (37.77 KB, application/octet-stream)
2011-08-10 09:59 UTC, val.khmyrov
no flags Details
/var/log/tomcat5/catalina.out (202.08 KB, application/octet-stream)
2011-08-10 10:01 UTC, val.khmyrov
no flags Details

Description val.khmyrov 2011-08-09 06:25:33 UTC
Description of problem:
Scheduling the "Remote Command" on multiple clients causes "500 Error - Internal Server Error". However scheduling the "Remote Command" on single client works good.

Version-Release number of selected component (if applicable):
1.5


How to reproduce:
Select some servers from the list of systems.  Click "Manage", click "Provisioning", click "Remote Command" and schedule any command.


Steps to Reproduce:
1. Select several servers from the list of systems
2. Click "Manage"
3. click "Provisioning"
4. click "Remote Command"
5. schedule some command
  
Actual results:
Internal server error

Expected results:
Perform remote commands on clients

Additional info:

Comment 1 Michael Mráka 2011-08-10 09:25:58 UTC
Please attach error messages from /var/log/tomcat*/catalina.out and /var/log/httpd/*error_log.

Comment 2 val.khmyrov 2011-08-10 09:59:56 UTC
Created attachment 517559 [details]
/var/log/httpd/error_log

Comment 3 val.khmyrov 2011-08-10 10:01:03 UTC
Created attachment 517560 [details]
/var/log/tomcat5/catalina.out

Comment 4 val.khmyrov 2011-08-10 11:55:20 UTC
I reproduce problem at Wed Aug 10 13:28:19 2011. Log files in attachment. Thanks

Comment 5 Michael Mráka 2011-08-12 11:47:14 UTC
I believe this issue has been fixed in spacewalk-base-1.6.4-1 by
commit c6d8dda49e05d687116685c1642ea03069b6605d.

You might also apply this patch manually to your Spacewalk 1.5 instance.
https://fedorahosted.org/spacewalk/changeset/c6d8dda49e05d687116685c1642ea03069b6605d

Comment 6 val.khmyrov 2011-08-15 05:16:51 UTC
I applied the patch but the problem is not resolved. Catalina.out log is clean. Error message from /var/log/httpd/error_log.

[Mon Aug 15 08:59:11 2011] [error] Execution of /var/www/html/network/systems/ssm/provisioning/remote_command_conf.pxt failed at Mon Aug 15 08:59:11 2011: RHN::Exception: DBD::Oracle::db prepare_cached failed: ORA-00911: invalid character (DBD ERROR: error possibly near <*> indicator at char 590 in '\nselect * from (\nSELECT DISTINCT S.id,\n       S.name AS SERVER_NAME\n  FROM rhnServer S,\n       rhnClientCapabilityName CCN,\n       rhnClientCapability CC,\n       rhnSet ST,\n       rhnUserServerPerms USP\n WHERE USP.user_id = :user_id\n   AND ST.user_id = :user_id\n   AND ST.label = 'system_list'\n   AND USP.server_id = ST.element\n   AND EXISTS(SELECT 1 FROM rhnServerFeaturesView SFV WHERE SFV.server_id = ST.element AND SFV.label = 'ftr_remote_command')\n   AND USP.server_id = CC.server_id\n   AND CC.capability_name_id = CCN.id\n   AND CCN.name = 'script.run'\n   AND USP.server_id = S.id\n) X\n<*>#ORDER BY UPPER(COALESCE(X.name, '(none)')), X.id\nORDER BY UPPER(COALESCE(X.server_name, '(none)')), X.id\n\n  ') [for Statement "\nselect * from (\nSELECT DISTINCT S.id,\n       S.name AS SERVER_NAME\n  FROM rhnServer S,\n       rhnClientCapabilityName CCN,\n       rhnClientCapability CC,\n       rhnSet ST,\n       rhnUserServerPerms USP\n WHERE USP.user_id = :user_id\n   AND ST.user_id = :user_id\n   AND ST.label = 'system_list'\n   AND USP.server_id = ST.element\n   AND EXISTS(SELECT 1 FROM rhnServerFeaturesView SFV WHERE SFV.server_id = ST.element AND SFV.label = 'ftr_remote_command')\n   AND USP.server_id = CC.server_id\n   AND CC.capability_name_id = CCN.id\n   AND CCN.name = 'script.run'\n   AND USP.server_id = S.id\n) X\n#ORDER BY UPPER(COALESCE(X.name, '(none)')), X.id\nORDER BY UPPER(COALESCE(X.server_name, '(none)')), X.id\n\n  "]\n  RHN::DB /usr/lib/perl5/vendor_perl/5.8.8/RHN/DB.pm 228 RHN::Exception::DB::throw\n  RHN::DB::DataSource /usr/lib/perl5/vendor_perl/5.8.8/RHN/DB/DataSource.pm 73 RHN::DB::handle_error\n  RHN::DataSource /usr/lib/perl5/vendor_perl/5.8.8/RHN/DataSource.pm 108 RHN::DB::DataSource::run_query\n  Sniglets::ListView::List /usr/lib/perl5/vendor_perl/5.8.8/Sniglets/ListView/List.pm 1211 RHN::DataSource::execute_query\n  Sniglets::ListView::List /usr/lib/perl5/vendor_perl/5.8.8/Sniglets/ListView/List.pm 908 Sniglets::ListView::List::default_provider\n  Sniglets::Lists /usr/lib/perl5/vendor_perl/5.8.8/Sniglets/Lists.pm 119 Sniglets::ListView::List::render\n  PXT::Parser /usr/lib/perl5/vendor_perl/5.8.8/PXT/Parser.pm 160 Sniglets::Lists::listview\n  PXT::Parser /usr/lib/perl5/vendor_perl/5.8.8/PXT/Parser.pm 72 PXT::Parser::expand_tag\n  PXT::ApacheHandler /usr/lib/perl5/vendor_perl/5.8.8/PXT/ApacheHandler.pm 510 PXT::Parser::expand_tags\n  PXT::ApacheHandler /usr/lib/perl5/vendor_perl/5.8.8/PXT/ApacheHandler.pm 113 PXT::ApacheHandler::pxt_parse_data\n  PXT::ApacheHandler /usr/lib/perl5/vendor_perl/5.8.8/PXT/ApacheHandler.pm 113 (eval)\n  main -e 0 PXT::ApacheHandler::handler\n  main -e 0 (eval)
[Mon Aug 15 08:59:11 2011] [error] Traceback sent to valenin.khmyrov@barclays.ru at /usr/lib/perl5/vendor_perl/5.8.8/PXT/ApacheHandler.pm line 584.

Comment 7 val.khmyrov 2011-08-15 05:25:42 UTC
Sorry the patch is work. I commited old line (ORDER BY UPPER(COALESCE(X.name, '(none)')), X.id ) and add new (ORDER BY UPPER(COALESCE(X.server_name, '(none)')), X.id). After remove old line it work.

Thanks

Comment 8 Milan Zázrivec 2011-12-22 16:46:37 UTC
Spacewalk 1.6 has been released.


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