spacewalk-scripts
spacewalk-scripts copied to clipboard
Error while using errata-import.py in Uyuni 2020.07
While trying to import the Ubuntu erratas in Uyuni 2020-07, I have lots of errors:
[+] Creating errata USN-4453-1:
[-] Error creating errata: <Fault -1: 'redstone.xmlrpc.XmlRpcFault: Could not find method: create in class: com.redhat.rhn.frontend.xmlrpc.errata.ErrataHandler with params: [com.redhat.rhn.domain.user.legacy.UserImpl, redstone.xmlrpc.XmlRpcStruct, redstone.xmlrpc.XmlRpcArray, redstone.xmlrpc.XmlRpcArray, redstone.xmlrpc.XmlRpcArray, java.lang.Boolean, redstone.xmlrpc.XmlRpcArray]'>
This is because of this merge introduced in Uyuni #2296 where the publish functionality has been dropped.
I have removed all the references to the "publish" parameter, and the script is working again:
# diff errata-import.py_ORI errata-import.py
36d35
< publish = True
101c100
< createErratum(key, erratum, issue_date, erratainfo, keywords, packageids, cves, publish, channels)
---
> createErratum(key, erratum, issue_date, erratainfo, keywords, packageids, cves, channels)
104c103
< def createErratum(key, erratum, issue_date, erratainfo, keywords, packageids, cves, publish, channels):
---
> def createErratum(key, erratum, issue_date, erratainfo, keywords, packageids, cves, channels):
107c106
< print client.errata.create(key, erratainfo, bug, keywords, [], publish, list(set(channels)))
---
> print client.errata.create(key, erratainfo, bug, keywords, [], list(set(channels)))
121c120
< createErratum(key, erratum, issue_date, erratainfo, keywords, packageids, cves, publish, channels)
---
> createErratum(key, erratum, issue_date, erratainfo, keywords, packageids, cves, channels)