Bug 1378873 - the problematic behavior of the system.upgradeEntitlement
Summary: the problematic behavior of the system.upgradeEntitlement
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Satellite 5
Classification: Red Hat
Component: API
Version: 570
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Jiří Dostál
QA Contact: Radovan Drazny
URL:
Whiteboard:
Depends On:
Blocks: 1340444
TreeView+ depends on / blocked
 
Reported: 2016-09-23 12:28 UTC by Martin Korbel
Modified: 2017-06-21 12:14 UTC (History)
3 users (show)

Fixed In Version: spacewalk-java-2.5.14-38-sat
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-06-21 12:14:33 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Martin Korbel 2016-09-23 12:28:59 UTC
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:

Comment 1 Jiří Dostál 2016-09-30 12:59:59 UTC
spacewalk.git d4680f87655e139fe4d3cecb5319a8ed3ed65dbd

Comment 3 Jiří Dostál 2016-10-31 17:47:47 UTC
Please ignore comment 1, enclosed commit is not related to this BZ.

Comment 6 Radovan Drazny 2017-01-30 14:17:02 UTC
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


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