[Spacewalk-list] scheduleScriptRun errors out

Tomas Lestach tlestach at redhat.com
Mon Dec 12 10:08:50 UTC 2011


On Friday 09 of December 2011 09:23:03 Mark wrote:
> Hey all - I'm trying to use the dell-satellite-sync tool, but Spacewalk is
> balking at the scheduleScriptRun calls. I made a smaller, POC script and it
> dies in the same way: "Fault returned from XML RPC Server, fault code 2401:
> redstone.xmlrpc.XmlRpcFault: Missing capability".  Anyone know what could
> be causing this and how to remedy it? We're on Spacewalk 1.5.

I'd say, your client isn't Remote Command execution capable.
Check, if you can schedule remote commands via WebUI: 
/network/systems/details/remote_commands.pxt?sid=<sid>

Regards,
Tomas
-- 
Tomas Lestach
RHN Satellite Engineering, Red Hat

> 
> Script:
> 
> #!/usr/bin/perl -w
> 
> use strict;
> use Frontier::Client;
> use POSIX qw(strftime);
> 
> 
> my $HOST = 'hostname';
> my $client = new Frontier::Client(url => "http://$HOST/rpc/api", debug=>1);
> my $session = $client->call('auth.login', 'username', 'password');
> 
> my $system = "1000012345";
> my $user = "root";
> my $group = "root";
> my $script = "#!/bin/sh
> echo FOO";
> my $date = $client->date_time(strftime("%Y%m%dT%H:%M:%S",
> localtime(time()+60)));
> 
> $client->call("system.scheduleScriptRun", $session, $system, $user, $group,
> 10, $script, $date);
> 
> Result:
> 
> ---- request ----
> <?xml version="1.0"?>
> <methodCall>
> <methodName>auth.login</methodName>
> <params>
> <param><value><string>username</string></value></param>
> <param><value><string>password</string></value></param>
> </params>
> </methodCall>
> ---- response ----
> <?xml version="1.0"
> encoding="UTF-8"?><methodResponse><params><param><value><string>102695xd5bc0
> 9aa765f23f1c952e66dcd2814cf</string></value></param></params></methodRespons
> e>---- request ----
> <?xml version="1.0"?>
> <methodCall>
> <methodName>system.scheduleScriptRun</methodName>
> <params>
> <param><value><string>102695xd5bc09aa765f23f1c952e66dcd2814cf</string></valu
> e></param> <param><value><i4>1000012345</i4></value></param>
> <param><value><string>root</string></value></param>
> <param><value><string>root</string></value></param>
> <param><value><i4>10</i4></value></param>
> <param><value><string>#!/bin/sh
> echo FOO</string></value></param>
> <param><value><dateTime.iso8601>20111209T09:22:45</dateTime.iso8601></value>
> </param>
> </params>
> </methodCall>
> ---- response ----
> Fault returned from XML RPC Server, fault code 2401:
> redstone.xmlrpc.XmlRpcFault: Missing capability
> <?xml version="1.0"
> encoding="UTF-8"?><methodResponse><fault><value><struct><member><name>faultC
> ode</name><value><int>2401</int></value></member><member><name>faultString</
> name><value><string>redstone.xmlrpc.XmlRpcFault: Missing
> capability</string></value></member></struct></value></fault></methodRespons
> e>




More information about the Spacewalk-list mailing list