Bug 601524 - setAdvancedOptions problem
Summary: setAdvancedOptions problem
Alias: None
Product: Red Hat Satellite 5
Classification: Red Hat
Component: API
Version: 530
Hardware: All
OS: Linux
Target Milestone: ---
Assignee: Tomas Lestach
QA Contact: Jan Hutař
Depends On:
Blocks: sat54-blockers
TreeView+ depends on / blocked
Reported: 2010-06-08 06:45 UTC by Stanislav Polasek
Modified: 2018-11-14 14:40 UTC (History)
4 users (show)

kickstart.profile.setAdvancedCall API call doesn't except "services" and "driverdisk" options accoridig to the documentation
fixed typo (service -> services) and adding driverdisk option to be accepted by the call
Clone Of:
Last Closed: 2011-08-16 13:58:47 UTC

Attachments (Terms of Use)

External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2011:1162 normal SHIPPED_LIVE Red Hat Network Satellite Server spacewalk-java bug fix update 2011-08-16 13:56:28 UTC

Description Stanislav Polasek 2010-06-08 06:45:49 UTC
Description of problem:

According to the documentation, the kickstart.profile.setAdvancedCall should accept struct with names and values of advanced options. Documented list of names includes the option name "service". However, when using such name in the struct, the values for that option are not added to the kickstart. 

The related API call, kicsktart.profile.getAdvancedOptions on the other hand returns struct which includes option name "services" (plural). But when I tried to use setAdvancedCall with option name "services", it fails with the error bellow.

Version-Release number of selected component (if applicable):
Latest as of Jun 08

How reproducible:

Steps to Reproduce:
1. create script with setAdvancedOptions call and struct for advanced options including name service
2. run
3. no service parameters are created in the kickstart

Actual results:

Expected results:

Additional info:

Using simple script I can print advanced opts struct and then try to make a change:


import xmlrpclib

SATELLITE_URL = "https://localhost/rpc/api"

client = xmlrpclib.Server(SATELLITE_URL, verbose=0)

print client.kickstart.profile.getAdvancedOptions(key, "xxxxxx")
ao = [{'name': 'services', 'arguments': '--disable portmap'}]
ret = client.kickstart.profile.setAdvancedOptions(key, "xxxxxx", ao)

I get:

[root@rhnt1 ~]# ./test_ks.py 
[{'name': 'skipx'}, {'name': 'rootpw', 'arguments': '$1$IWRajh2F$BYdFL3Ilpr1UkWycY1Cr9/'}, {'name': 'network', 'arguments': '--bootproto dhcp'}, {'name': 'reboot'}, {'name': 'services', 'arguments': '--disable portmap'}, {'name': 'lang', 'arguments': 'en_US'}, {'name': 'auth', 'arguments': '--enablemd5 --enableshadow'}, {'name': 'text'}, {'name': 'bootloader', 'arguments': '--location mbr'}, {'name': 'install'}, {'name': 'zerombr'}, {'name': 'firewall', 'arguments': '--disabled'}, {'name': 'timezone', 'arguments': 'Europe/Prague'}, {'name': 'key', 'arguments': '--skip'}, {'name': 'clearpart', 'arguments': '--all'}, {'name': 'selinux', 'arguments': '--disabled'}, {'name': 'keyboard', 'arguments': 'us'}, {'name': 'url', 'arguments': '--url /ks/dist/ks-rhel-x86_64-server-5-u4'}]
Traceback (most recent call last):
  File "./test_ks.py", line 14, in ?
    ret = client.kickstart.profile.setAdvancedOptions(key, "xxxxxx", ao)
  File "/usr/lib64/python2.3/xmlrpclib.py", line 1029, in __call__
    return self.__send(self.__name, args)
  File "/usr/lib64/python2.3/xmlrpclib.py", line 1316, in __request
  File "/usr/lib64/python2.3/xmlrpclib.py", line 1080, in request
    return self._parse_response(h.getfile(), sock)
  File "/usr/lib64/python2.3/xmlrpclib.py", line 1219, in _parse_response
    return u.close()
  File "/usr/lib64/python2.3/xmlrpclib.py", line 742, in close
    raise Fault(**self._stack[0])
xmlrpclib.Fault: <Fault -5: 'redstone.xmlrpc.XmlRpcFault: Invalid kickstart option present. List of valid options is: [autostep, interactive, install, upgrade, text, network, cdrom, harddrive, nfs, url, lang, langsupport, keyboard, mouse, device, deviceprobe, zerombr, clearpart, bootloader, timezone, auth, rootpw, selinux, reboot, firewall, xconfig, skipx, key, ignoredisk, autopart, cmdline, firstboot, graphical, iscsi, iscsiname, logging, monitor, multipath, poweroff, halt, service, shutdown, user, vnc, zfcp]'>

Comment 1 Paresh Mutha 2011-02-15 09:26:13 UTC
setAdvancedOptions API fails for driverdisk option as well.

Comment 5 Tomas Lestach 2011-02-17 12:18:43 UTC
Hello Paresh,

thank you for your patch, I've applied it as:
spacewalk.git: c996955d0ea39fe06b97ec7e085808c7d04e5a2b

I just needed to update the apidoc accordingly:
spacewalk.git: 99b890b20d843c687cbbabe7fa9acca6f9949134

Comment 7 Tomas Lestach 2011-07-27 13:25:56 UTC
one more apidoc fix ...

spacewalk.git: 4a425624316e235145ab5ddf4a7850218cf77b03

Comment 8 Tomas Lestach 2011-07-27 13:25:56 UTC
    Technical note added. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    New Contents:
kickstart.profile.setAdvancedCall API call doesn't except "services" and "driverdisk" options accoridig to the documentation
fixed typo (service -> services) and adding driverdisk option to be accepted by the call

Comment 13 errata-xmlrpc 2011-08-16 13:58:47 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.


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