Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 643384

Summary: Cumin: NameError: global name 'UpdateException' is not defined
Product: Red Hat Enterprise MRG Reporter: Matthew Farrellee <matt>
Component: cuminAssignee: Justin Ross <jross>
Status: CLOSED ERRATA QA Contact: Jan Sarenik <jsarenik>
Severity: medium Docs Contact:
Priority: high    
Version: 1.2CC: iboverma, jneedle, jross, jsarenik, tross
Target Milestone: 1.3.0.1   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Under certain conditions, restarting the cumin service (service cumin restart) threw the following exception: Cumin: NameError: global name 'UpdateException' is not defined. This was caused by the fact that the UpdateException was not defined. With this update, the aforementioned exception has been removed from the code and is no longer thrown.
Story Points: ---
Clone Of: Environment:
Last Closed: 2010-11-30 17:50:55 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Matthew Farrellee 2010-10-15 13:19:36 UTC
cumin-0.1.4369-1.el5

[root@grid0 ~]# service cumin restart
Stopping cumin:                                            [  OK  ]
Starting cumin:                                            [  OK  ]
[root@grid0 ~]# Exception in thread Thread-1:
Traceback (most recent call last):
  File "/usr/lib64/python2.4/threading.py", line 442, in __bootstrap
    self.run()
  File "/usr/share/cumin/python/mint/update.py", line 52, in run
    update.process(self)
  File "/usr/share/cumin/python/mint/update.py", line 194, in process
    except UpdateException, e:
NameError: global name 'UpdateException' is not defined

Comment 1 Justin Ross 2010-10-15 14:04:40 UTC
This is in the exception path for updates.  If an unexpected exception occurs in a cumin-data update, this bug will kill the update thread.  The user will need to restart the console.

Unexpected process exceptions were rare in testing, and that's presumably why we missed this.  Users seem to be running into it with more frequency for as yet undetermined reasons, because this flaw keeps us from seeing the backtrace.

I've changed this to high priority.

Comment 2 Justin Ross 2010-10-15 14:53:17 UTC
Fixed on trunk at change 4387.

The best way I can think of to reproduce this is to mettle with the database schema.  For instance, before change 4387, dropping the Slot table should trigger an unexpected update exception and kill the update thread.  As of 4387, cumin-data's update thread should carry on unaffected.

Comment 3 Justin Ross 2010-10-18 14:30:44 UTC
The root cause appears to be a problem with the ordering of qmfv1 data updates.  The workaround is to use the following config to exclude broker data:

[data]
packages: com.redhat.grid, com.redhat.sesame

Comment 5 Jan Sarenik 2010-11-10 11:19:49 UTC
Reproduced on cumin-0.1.4369-1.el5

  $ psql -d cumin -U cumin -h localhost
  cumin=# SET search_path TO "com.redhat.grid";
  SET
  cumin=# DROP TABLE "Slot";
  DROP TABLE
  cumin=# \q
  # service cumin start
  Starting cumin:                                            [  OK  ]
  Exception in thread Thread-1:
    Traceback (most recent call last):
    File "/usr/lib64/python2.4/threading.py", line 442, in __bootstrap
      self.run()
    File "/usr/share/cumin/python/mint/update.py", line 52, in run
      update.process(self)
    File "/usr/share/cumin/python/mint/update.py", line 194, in process
      except UpdateException, e:
  NameError: global name 'UpdateException' is not defined

Comment 6 Jan Sarenik 2010-11-10 11:25:37 UTC
Verified on cumin-0.1.4410-2.el5

Comment 8 errata-xmlrpc 2010-11-30 17:50:55 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/RHSA-2010-0921.html

Comment 9 Martin Prpič 2010-12-01 14:51:28 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:
Under certain conditions, restarting the cumin service (service cumin restart) threw the following exception:

Cumin: NameError: global name 'UpdateException' is not defined.

This was caused by the fact that the UpdateException was not defined. With this update, the aforementioned exception has been removed from the code and is no longer thrown.