Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 1584527 - RFE: Easier debugging of invalid entitlement certificates
RFE: Easier debugging of invalid entitlement certificates
Status: CLOSED ERRATA
Product: Red Hat Update Infrastructure for Cloud Providers
Classification: Red Hat
Component: Tools (Show other bugs)
3.0.3
Unspecified Unspecified
unspecified Severity unspecified
: 3.0.4
: 3.0.x
Assigned To: RHUI Bug List
Vratislav Hutsky
: FutureFeature
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2018-05-31 03:10 EDT by Radek Bíba
Modified: 2018-07-10 12:00 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Rebase: Bug Fixes and Enhancements
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2018-07-10 12:00:36 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2018:2153 None None None 2018-07-10 12:00 EDT

  None (edit)
Description Radek Bíba 2018-05-31 03:10:54 EDT
Description of problem:
When you try to upload an invalid certificate, rhui-manager only provides the following error message:

The given certificate contains one or more entitlements that are
not compatible with the RHUI. For questions, please visit:
https://access.redhat.com/support/contact/customerService.html

User experience would be much better, and troubleshooting could start more efficiently, if the error message included the entitlement that wasn't compatible.

While trying to understand the recent issue brought up by Tapomoy, I (also) made the following change to /usr/lib/python2.7/site-packages/rhui/tools/cert_manager.py to force the responsible method to tell me which URL failed to validate against the predefined pattern, instead of just returning True/False:

def _is_valid_download_url(download_url):
<snip>
#    return fnmatch.fnmatch(download_url, VALID_URL_PATTERN)
    if fnmatch.fnmatch(download_url, VALID_URL_PATTERN):
        return True
    else:
        print download_url
        return False

The next attempt to upload the questionable pem file then produced:

# rhui-manager cert upload --cert /tmp/4361937509242360488.pem 
/content/eus/rhel/server/7/$releasever/$basearch/sap/os
The given certificate contains one or more entitlements that are
not compatible with the RHUI. For questions, please visit:
https://access.redhat.com/support/contact/customerService.html

Sure enough, it's not neat at all, but it helps. Please modify the code as appropriate to make rhui-manager explain -- print/log -- nicely which (first) entitlement is incompatible.

Version-Release number of selected component (if applicable):
rh-rhui-tools-3.0.3-3.el7ui.noarch
Comment 7 errata-xmlrpc 2018-07-10 12:00:36 EDT
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:2153

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