Bug 670754 - entitlement-check.py fails with 'TypeError: iteration over non-sequence' if there's a discrepancy in channel families
Summary: entitlement-check.py fails with 'TypeError: iteration over non-sequence' if t...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite 5
Classification: Red Hat
Component: Upgrades
Version: 530
Hardware: Unspecified
OS: Unspecified
medium
high
Target Milestone: ---
Assignee: Justin Sherrill
QA Contact: Jan Hutař
URL:
Whiteboard:
Depends On:
Blocks: sat54-errata
TreeView+ depends on / blocked
 
Reported: 2011-01-19 09:18 UTC by Vishal Gaikwad
Modified: 2018-11-14 16:09 UTC (History)
5 users (show)

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.
Clone Of:
Environment:
Last Closed: 2011-02-10 09:00:10 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2011:0208 0 normal SHIPPED_LIVE Red Hat Network Satellite bug fix update 2011-02-10 09:00:01 UTC

Description Vishal Gaikwad 2011-01-19 09:18:31 UTC
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 14:18:33 UTC
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 14:18:34 UTC
    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 Zázrivec 2011-02-07 14:57:57 UTC
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 18:18:10 UTC
    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 09:00:10 UTC
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.