Bug 1451771

Summary: confusing traceback when updated manifest is without subscriptions
Product: Red Hat Satellite 5 Reporter: Pavel Studeník <pstudeni>
Component: ServerAssignee: Jan Dobes <jdobes>
Status: CLOSED ERRATA QA Contact: Lukáš Hellebrandt <lhellebr>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 580CC: lhellebr, tlestach
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: spacewalk-backend-2.5.3-152-sat Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-10-19 11:57:19 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1450111    

Description Pavel Studeník 2017-05-17 13:32:08 UTC
Description of problem:
I have activate satellite with manifest that contained some subscriptions, but after some time the subscriptions were expirated and now manifest is empty. When I try to update manifest I receive following traceback:

>> rhn-satellite-activate --manifest-refresh
09:16:48 Downloading manifest...

ERROR: unhandled exception occurred:
Traceback (most recent call last):
  File "/usr/bin/rhn-satellite-activate", line 38, in <module>
    sys.exit(abs(mod.main() or 0))
  File "/usr/lib/python2.6/site-packages/spacewalk/satellite_tools/rhn_satellite_activate.py", line 475, in main
    cdn_activate = cdn_activation.Activation(options.manifest)
  File "/usr/lib/python2.6/site-packages/spacewalk/cdn_tools/activation.py", line 37, in __init__
    self.manifest = Manifest(manifest_path)
  File "/usr/lib/python2.6/site-packages/spacewalk/cdn_tools/manifest.py", line 75, in __init__
    self._load_entitlements(inner_zip)
  File "/usr/lib/python2.6/site-packages/spacewalk/cdn_tools/manifest.py", line 166, in _load_entitlements
    "ERROR: There has to be at least one entitlements file")
spacewalk.cdn_tools.manifest.IncorrectEntitlementsFileFormatError: ERROR: There has to be at least one entitlements file


I think that user should see better message that subscriptions were expired or removed.


Version-Release number of selected component (if applicable):
spacewalk-backend-tools-2.5.3-131.el6sat.noarch

How reproducible:
always

Steps to Reproduce:
1. Create manifest with subscriptions
2. Activate satellite with them
3. wait until subscription expirated or remove it from manifest on access.redhat.com

Actual results:
ERROR: There has to be at least one entitlements file

Expected results:
Better message with link to some article about redhat manifest or to URL with manifest profile https://access.redhat.com/management/distributors/<manifest UUID> to check your subscriptions

Comment 1 Jan Dobes 2017-07-27 13:57:01 UTC
fixed in spacewalk.git(master):

e9908a6f4a5dc657187bc21981f07e66e93b9d4b

the message can be further improved if needed

Comment 4 Lukáš Hellebrandt 2017-09-14 10:58:24 UTC
Verified with spacewalk-backend-2.5.3-152.

Used reproducer from OP and as step 4, ran:

# rhn-satellite-activate --manifest-refresh
06:56:48 Downloading manifest...

ERROR: No subscriptions were found in manifest.

Please refer to https://access.redhat.com/management/distributors/610e54d7-ebbd-408a-b38e-f501e3996558 for setting up subscriptions.

Comment 6 errata-xmlrpc 2017-10-19 11:57:19 UTC
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-2017:2915