Bug 670754 - entitlement-check.py fails with 'TypeError: iteration over non-sequence' if there's a discrepancy in channel families
entitlement-check.py fails with 'TypeError: iteration over non-sequence' if t...
Status: CLOSED ERRATA
Product: Red Hat Satellite 5
Classification: Red Hat
Component: Upgrades (Show other bugs)
530
Unspecified Unspecified
medium Severity high
: ---
: ---
Assigned To: Justin Sherrill
Jan Hutař
:
Depends On:
Blocks: sat54-errata
  Show dependency treegraph
 
Reported: 2011-01-19 04:18 EST by Vishal Gaikwad
Modified: 2011-02-10 04:00 EST (History)
5 users (show)

See Also:
Fixed In Version: rhn-upgrade-5.4.0.22-1
Doc Type: Bug Fix
Doc Text:
Cause: What actions or circumstances cause this bug to present? Consequence: the entitlement-check.py script as a part of Satellite upgrade procedure might have failed in situations where a new channel family, which did not exist??? current Satellite certificate, was discovered in the new certificate. Fix: What was done to fix the bug? Result:Now, the entitlement-check.py script no longer returns an error in these circumstances.
Story Points: ---
Clone Of:
Environment:
Last Closed: 2011-02-10 04:00:10 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Vishal Gaikwad 2011-01-19 04:18:31 EST
Description of problem:
After applying the errata: http://rhn.redhat.com/errata/RHBA-2011-0155.html
and following the 'Preparations' section, the script entitlement-check.py fails with a traceback:

# ./entitlement-check.py --rhn-cert=/root/sat5.4.cert --verbose
Connecting to rhnsat/rhnsat@rhnsat
Checking rhel-server-6-lb: 1,0
Traceback (most recent call last):
  File "./entitlement-check.py", line 312, in ?
    main()
  File "./entitlement-check.py", line 88, in main
    results = check_channel_family(family, quantity, flex) and  results
  File "./entitlement-check.py", line 97, in check_channel_family
    return global_test(label, quantity, flex) and org_test(label, quantity, flex)
  File "./entitlement-check.py", line 136, in org_test
    for org in orgs:
TypeError: iteration over non-sequence 

Version-Release number of selected component (if applicable):
Red Hat Network Satellite 5.3

How reproducible:
Always

Steps to Reproduce:
1. Install/Update the rhn-upgrade package from http://rhn.redhat.com/errata/RHBA-2011-0155.html
2. Get a new certificate for RHNS 5.4
3. Follow the upgrade documentation which suggest to execute the entitlement-check.py
  
Actual results:
Script fails with the traceback error.

Expected results:
The script should not fail with the error.

Additional info:
The script only fails if the certificate has new channel families which didn't exist in the old certificate.
Comment 7 Florian Nadge 2011-02-07 09:18:33 EST
Please be so kind and add a few key words to the field Technical Notes (Cause, Consequence, Fix, Result) in this Bugzilla entry. In Future, you do not need to write long explanations for the erratum if you answer these questions.

Many thanks,

Florian
Comment 8 Florian Nadge 2011-02-07 09:18:34 EST
    Technical note added. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    New Contents:
Cause: What actions or circumstances cause this bug to present?

Consequence: What happens when the bug presents?

Fix: What was done to fix the bug?

Result: What now happens when the actions or circumstances above occur? (this is not the same as the bug doesn’t present anymore)
Comment 9 Milan Zazrivec 2011-02-07 09:57:57 EST
Text that I added directly into the errata:

Previously, running entitlement-check.py script as a part of Satellite upgrade procedure might have failed with an error in situations where a new channel family, which did not exist current Satellite certificate, was discovered in the new certificate. Running the entitlement-check.py script now no longer returns error in these circumstances.
Comment 10 Florian Nadge 2011-02-09 13:18:10 EST
    Technical note updated. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    Diffed Contents:
@@ -1,7 +1,7 @@
 Cause: What actions or circumstances cause this bug to present?
 
-Consequence: What happens when the bug presents?
+Consequence: the entitlement-check.py script as a part of Satellite upgrade procedure might have failed  in situations where a new channel family, which did not exist??? current Satellite certificate, was discovered in the new certificate.
 
 Fix: What was done to fix the bug?
 
-Result: What now happens when the actions or circumstances above occur? (this is not the same as the bug doesn’t present anymore)+Result:Now, the entitlement-check.py script no longer returns an error in these circumstances.
Comment 11 errata-xmlrpc 2011-02-10 04:00:10 EST
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHBA-2011-0208.html

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