Description of problem: XMLRPC call client.system.getVariables() fails with "xmlrpclib.Fault: <Fault -214: 'redstone.xmlrpc.XmlRpcFault: No such cobbler system record'>" Version-Release number of selected component (if applicable): Satellite-5.4.0-RHEL5-re20100903.1 How reproducible: always Steps to Reproduce: 1. Use client.system.getVariables() XMLRPC call $ ./aaa.py admin admin https://<fqdn>/rpc/api 1000010000 Actual results: Traceback like this: Traceback (most recent call last): File "./aaa.py", line 28, in <module> print 'client.system.getVariables(): ', client.system.getVariables(key, SYSID) File "/usr/lib64/python2.6/xmlrpclib.py", line 1199, in __call__ return self.__send(self.__name, args) File "/usr/lib64/python2.6/xmlrpclib.py", line 1489, in __request verbose=self.__verbose File "/usr/lib64/python2.6/xmlrpclib.py", line 1253, in request return self._parse_response(h.getfile(), sock) File "/usr/lib64/python2.6/xmlrpclib.py", line 1392, in _parse_response return u.close() File "/usr/lib64/python2.6/xmlrpclib.py", line 838, in close raise Fault(**self._stack[0]) xmlrpclib.Fault: <Fault -214: 'redstone.xmlrpc.XmlRpcFault: No such cobbler system record'> Expected results: Should return sane result. Additional info: I have used this script to get various info about system: #!/usr/bin/python # -*- coding: UTF-8 -*- import sys, xmlrpclib # load options USER=sys.argv[1] PASS=sys.argv[2] SERVER=sys.argv[3] SYSID=int(sys.argv[4]) # log-in client = xmlrpclib.Server(SERVER, verbose=0) key = client.auth.login(USER, PASS) print 'client.system.getCpu(): ', client.system.getCpu(key, SYSID) print 'client.system.getCustomValues(): ', client.system.getCustomValues(key, SYSID) print 'client.system.getDetails(): ', client.system.getDetails(key, SYSID) print 'client.system.getDevices(): ', client.system.getDevices(key, SYSID) print 'client.system.getDmi(): ', client.system.getDmi(key, SYSID) print 'client.system.getEntitlements(): ', client.system.getEntitlements(key, SYSID) print 'client.system.getMemory(): ', client.system.getMemory(key, SYSID) print 'client.system.getName(): ', client.system.getName(key, SYSID) print 'client.system.getNetwork(): ', client.system.getNetwork(key, SYSID) print 'client.system.getNetworkDevices(): ', client.system.getNetworkDevices(key, SYSID) print 'client.system.getRunningKernel(): ', client.system.getRunningKernel(key, SYSID) print 'client.system.getVariables(): ', client.system.getVariables(key, SYSID) # log-out client.auth.logout(key)
No, that system in question was not provisioned. My problem here is that this call produces traceback instead of some reasonable return value (like empty list or something).
It is coded to raise an xmlrpc fault, for it expects the system to have a system record in cobbler as a bare minimum. Returning an empty list will imply that no variables were set, while raising the xmlrpc fault will imply that no system records exist. This is consistent with some of the other calls.
We could improve the documentation and state that the fault will be raised if there is no available system record. I 'll work on that..
The documentation should be fixed as of http://git.fedorahosted.org/git/?p=spacewalk.git;a=commit;h=4e2cc722fecfea52b9d2a510539a4c0b0ca05e7d You need spacewalk-java-1.2.31-1 or greater to test this.
there is new note: == To create a system record over xmlrpc use system.create_system_record == instead of system.createSystemRecord this is tiny difference but then I cannot find it in API help ...
Actually they are both equivalent(as in one gets translated to the other). Anyway I changed the text to what you specified.
docs is updated: Method: getVariables Description: Lists kickstart variables set in the system record for the specified server. Note: This call assumes that a system record exists in cobbler for the given system and will raise an XMLRPC fault if that is not the case. To create a system record over xmlrpc use system.createSystemRecord To create a system record in the Web UI please go to System -> -> Provisioning -> Select a Kickstart profile -> Create Cobbler System Record. -- verified with Satellite-5.4.0-RHEL5-re20101001.1
Verified in stage.
The 5.4.0 RHN Satellite and RHN Proxy release has occurred. This issue has been resolved with this release. RHEA-2010:0801 - RHN Satellite Server 5.4.0 Upgrade https://rhn.redhat.com/rhn/errata/details/Details.do?eid=10332 RHEA-2010:0803 - RHN Tools enhancement update https://rhn.redhat.com/rhn/errata/details/Details.do?eid=10333 RHEA-2010:0802 - RHN Proxy Server 5.4.0 bug fix update https://rhn.redhat.com/rhn/errata/details/Details.do?eid=10334 RHEA-2010:0800 - RHN Satellite Server 5.4.0 https://rhn.redhat.com/rhn/errata/details/Details.do?eid=10335 Docs are available: http://docs.redhat.com/docs/en-US/Red_Hat_Network_Satellite/index.html Regards, Clifford