Description of problem: The system.upgradeEntitlement does not return a fail status. (Sat5.7, Sat5.6) Version-Release number of selected component (if applicable): spacewalk-java-2.3.8-153.el6sat spacewalk-java-2.0.2-112.el6sat. How reproducible: 100% Steps to Reproduce: 1. We have got a satellite with registered systems 2. We choose one without base channel and try to setup "virtualization" entitlement by WebUI. We get something as "Could not automatically subscribe the system to the RHEL Virtualization Channel. This channel contains packages required for virtualization. This is most likely caused by a lack of channel entitlements." 3. Now we can try it again for the same profile by API > spacewalk-api --server=localhost --user=admin --password=xxx system.upgradeEntitlement "%session%" 1000077107 'virtualization_host' $result = '1'; > spacewalk-api --server=localhost --user=admin --password=xxx system.getEntitlements "%session%" 1000077107 $result = [ 'enterprise_entitled' ]; Actual results: system.upgradeEntitlement return 1 (success) Expected results: error Additional info:
spacewalk.git d4680f87655e139fe4d3cecb5319a8ed3ed65dbd
Please ignore comment 1, enclosed commit is not related to this BZ.
Verified on spacewalk-java-2.5.14-43. Attempt to upgrade entitlement in the WebUI using steps from the initial report fails with the followning message: 1 system(s) failed to add Virtualization(Platform). This was caused by errors attempting to automatically subscribe the system to the Red Hat Satellite Tools and RHEL Virtualization channels which are required for virtualization. Trying to add the entitlement using the API fails with an error as well: # spacewalk-api --server localhost --user=admin --password xxx system.upgradeEntitlement "%session%" 1000010000 'virtualization host' Fault returned from XML RPC Server, fault code -212: redstone.xmlrpc.XmlRpcFault: Invalid entitlement # spacewalk-api --server localhost --user=admin --password xxx system.getEntitlements "%session%" 1000010000 $result = [ 'enterprise_entitled', 'provisioning_entitled' ]; VERIFIED