Description of problem: In WebUI, if a registered system has a package that is not on the Satellite, it can still be scheduled for removal. In API, however, I have not found a way to do this. schedulePackageRemove requires package ID. schedulePackageRemoveByNevra does not require package ID but still does not find the package (as it probably searches the database which does not contain it) and fails with (for antlr package): Traceback (most recent call last): File "./z.py", line 9, in <module> res = client.system.schedulePackageRemoveByNevra(key,1000010001,[{'package_name': "antlr", 'package_epoch': "0", 'package_version': "2.7.7", 'package_release': "6.5.el6", 'package_arch': "x86_64"}], datetime.now()) 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 2300: 'redstone.xmlrpc.XmlRpcFault: Invalid package: antlr'> How reproducible: Deterministic Steps to Reproduce: For an existing system with antlr-2.7.7-6.5.el6:0 package installed and not synced to satellite, in python: client.system.schedulePackageRemoveByNevra(key,<SYSTEMID>,[{'package_name': "antlr", 'package_epoch': "0", 'package_version': "2.7.7", 'package_release': "6.5.el6", 'package_arch': "x86_64"}], datetime.now()) Actual results: Nothing scheduled, traceback Expected results: Package removal scheduled Additional info: This operation can be done using WebUI so I think it should also be possible using API
spacewalk.git(master): 641ee2ec292905c67dc93b6e40a6153fb989359c spacewalk.git(master): f9f50d4bfddf9562dc302995753db4938fb8cbc1
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHBA-2018:0274