Bug 748735 - Cumin generates application error: TypeError: len() of unsized object from cumin/objectframe.py, line 298
Summary: Cumin generates application error: TypeError: len() of unsized object from cu...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise MRG
Classification: Red Hat
Component: cumin
Version: 2.1
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: 2.1.1
: ---
Assignee: Chad Roberts
QA Contact: Stanislav Graf
URL:
Whiteboard:
Depends On: 771642
Blocks: 765607
TreeView+ depends on / blocked
 
Reported: 2011-10-25 08:24 UTC by Stanislav Graf
Modified: 2012-02-06 18:17 UTC (History)
4 users (show)

Fixed In Version: cumin-0.1.5174-1
Doc Type: Bug Fix
Doc Text:
Cause Following a host link from the Inventory page will open a summary page for the host with the Overview tab selected. A host may be visible on the Inventory page even when no Sesame data is available for that host, but the Overview tab requires Sesame data. Consequence Following the host link for a system without Sesame data available will generate an exception on the Overview tab. Fix Check for missing Sesame data when generating the Overview tab and notify the user with a yellow banner when no data is available. Result The exceptional condition is caught early and handled. The user is notified with a message, and can navigate away from the Overview tab normally.
Clone Of:
Environment:
Last Closed: 2012-02-06 18:17:36 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 771642 0 unspecified CLOSED Cumin generates application error: AttributeError: 'int' object has no attribute 'name', wallabyoperations.py line 420 2021-02-22 00:41:40 UTC
Red Hat Product Errata RHSA-2012:0100 0 normal SHIPPED_LIVE Moderate: MRG Grid security, bug fix, and enhancement update 2012-02-06 23:15:47 UTC

Internal Links: 771642

Description Stanislav Graf 2011-10-25 08:24:22 UTC
Description of problem:
Login to cumin and see this error. Maybe the last thing was restarting service.


Version-Release number of selected component (if applicable):
cumin-0.1.5068-1.el5.noarch

How reproducible:
I don't know.

Steps to Reproduce:
1. Use cumin.
2. Restart cumin service
3. Login to cumin
  
Actual results:
Cumin generates error.

Expected results:
Cumin works properly.

Additional info:
See attached information

Comment 2 Chad Roberts 2011-11-01 18:51:42 UTC
Fixed in revision 5103.

Seems like there was not necessarily a reliable way to reproduce this one.  It was probably related to a cumin restart when you were on an inventory page.  If your login succeeded before the system inventory had been repopulated in the database, an error would occur.

Comment 3 Martin Kudlej 2011-12-06 12:41:15 UTC
As I understand it correctly you know how to reproduce this issue. Could you write here how to reproduce this?

Comment 4 Chad Roberts 2011-12-06 14:26:38 UTC
Here is how I reproduced the problem:

1)  Navigate to Inventory::<choose a node>
2)  Restart cumin
3)  Right after cumin restarts (ie:  it is listening on port 45672 again), hit Refresh in your browser

In the broken version, if you were to hit refresh before the background wallaby data had loaded (no way to know when this happened, but an "immediate" refresh when cumin restarts was working for me), you would get an exception.  In the fixed version, the underlying problem has been fixed and you should not see an exception.

Comment 6 Stanislav Graf 2012-01-04 10:30:05 UTC
Reproduced:
RHEL 5.7 i386/x86_64
RHEL 6.2 i386/x86_64
MRG 2.1.0, cumin-0.1.5098-2

Message:
"APPLICATION ERROR"

Verification;
RHEL 5.7 i386/x86_64
RHEL 6.2 i386/x86_64
MRG 2.1.x, cumin-0.1.5180-1

Message:
"There is no content to display for the chosen host.  This may be due to the sesame system being down."

Select overview several times, the same message. Wait 5 minutes, still the same. Select Configuration -> ERROR

Comment 8 Matthew Farrellee 2012-01-04 12:27:32 UTC
(In reply to comment #6)

Please open a new BZ for the new error.

Comment 9 Stanislav Graf 2012-01-04 12:59:48 UTC
Bug 771642 - Cumin generates application error: AttributeError: 'int' object has no attribute 'name', wallabyoperations.py line 420

Comment 10 Trevor McKay 2012-01-04 13:45:24 UTC
Well,

  we can catch the error by putting some type assertion checks in the wallabyoperations code.  At this line, the value passed in is expected to be either a string (the name of a wallaby node) or a node object.  Instead, it is apparently an int.

  The question remains, why are we getting an int here?

Comment 12 Trevor McKay 2012-01-10 00:41:24 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
    Following a host link from the Inventory page will open an Overview page for that system.  A host may be visible on the Inventory page even when no Sesame data is available for that host, but the Overview page requires Sesame data.

Consequence
    Following the host link for a system without Sesame data available will generate an exception on the Overview page.

Fix
    Check for missing Sesame data when generating the Overview page and notify the user with a yellow banner when no data is available.

Result
    The exceptional condition is caught early and handled. The user is notified with a message, and can navigate away from the page normally.

Comment 13 Trevor McKay 2012-01-10 00:49:37 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,11 +1,11 @@
 Cause
-    Following a host link from the Inventory page will open an Overview page for that system.  A host may be visible on the Inventory page even when no Sesame data is available for that host, but the Overview page requires Sesame data.
+    Following a host link from the Inventory page will open a summary page for the host with the Overview tab selected.  A host may be visible on the Inventory page even when no Sesame data is available for that host, but the Overview tab requires Sesame data.
 
 Consequence
-    Following the host link for a system without Sesame data available will generate an exception on the Overview page.
+    Following the host link for a system without Sesame data available will generate an exception on the Overview tab.
 
 Fix
-    Check for missing Sesame data when generating the Overview page and notify the user with a yellow banner when no data is available.
+    Check for missing Sesame data when generating the Overview tab and notify the user with a yellow banner when no data is available.
 
 Result
-    The exceptional condition is caught early and handled. The user is notified with a message, and can navigate away from the page normally.+    The exceptional condition is caught early and handled. The user is notified with a message, and can navigate away from the Overview tab normally.

Comment 14 Stanislav Graf 2012-01-11 11:22:50 UTC
Verify:
RHEL5 i386/x86_64
cumin-0.1.5184-1.el5.noarch

RHEL6 i386/x86_64
cumin-0.1.5184-1.el6.noarch

Cumin id for the Sesame object, Restart cumin
---------------------------------------------
1. Install cumin with condor/qpidd/sesame/wallaby.
2. Navigate to Inventory::<choose a node>
3. Configuration tab will be populated based on Cumin id for the Sesame object (system.id in the URL will be an int).
4. Restart cumin
5. Right after cumin restarts (ie:  it is listening on port 45672 again), hit
Refresh in your browser
6. Overview: "There is no content to display for the chosen host.  This may be due to the sesame system being down."
7. Configuration: "Host data may have changed.  Return to the Inventory page and try again"
8. Details: "There is no content to display"
9. Return to the Inventory page and try again - OK

Cumin id for the Sesame object, Stop sesame
-------------------------------------------
1. Install cumin with condor/qpidd/sesame/wallaby.
2. Navigate to Inventory::<choose a node>
3. Cumin id for the Sesame object (system.id in the URL will be an int).
4. Stop sesame
5. Right after cumin restarts (ie:  it is listening on port 45672 again), hit
Refresh in your browser
6. Overview: "There is no content to display for the chosen host.  This may be due to the sesame system being down."
7. Configuration: "Host data may have changed.  Return to the Inventory page and try again"
8. Details: "There is no content to display"
9. Return to the Inventory page and try again
10. Configuration tab will be populated based on the host name (sytem.id in the URL
will be a hostname string)

Host name, Restart cumin
------------------------
1. Install cumin with condor/qpidd/(no sesame)/wallaby.
2. Navigate to Inventory::<choose a node>
3. Configuration tab will be populated based on the host name (sytem.id in the URL
will be a hostname string)
4. Grid::Configuration - add tag to this host (the same as system.id)
5. Navigate to Inventory::<choose a node>
6. Restart cumin
7. Right after cumin restarts (ie:  it is listening on port 45672 again), hit
Refresh in your browser
8. Everything looks fine (like before restart).



VERIFIED

Comment 15 errata-xmlrpc 2012-02-06 18:17:36 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.

http://rhn.redhat.com/errata/RHSA-2012-0100.html


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