Bug 623220

Summary: Wallaby config versioning can crash with SQL syntax errors
Product: Red Hat Enterprise MRG Reporter: Will Benton <willb>
Component: wallabyAssignee: Will Benton <willb>
Status: CLOSED ERRATA QA Contact: Lubos Trilety <ltrilety>
Severity: medium Docs Contact:
Priority: low    
Version: DevelopmentCC: ltrilety, matt
Target Milestone: 1.3   
Target Release: ---   
Hardware: All   
OS: Linux   
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
Bug Depends On:    
Bug Blocks: 612869, 620511    

Description Will Benton 2010-08-11 16:19:00 UTC
Description of problem:

Wallaby uses a base-26 representation of the Ruby thread ID as part of a temporary table name.  If this ID is negative, the representation will include a leading "-", which results in a SQL syntax error.

Version-Release number of selected component (if applicable):


How reproducible:

service condor stop ; rm -f /var/lib/condor/config/00wallaby_node.config ; service condor start
Actual results:

Wallaby raises an exception and does not complete the operation; there will be errors in the agent log like this one:

E, [2010-08-11T10:48:35.290651 #16654] ERROR -- : Error calling whatChanged: near "-": syntax error
E, [2010-08-11T10:48:35.290890 #16654] ERROR -- :     /usr/lib/ruby/site_ruby/1.8/sqlite3/errors.rb:62:in `check'
    /usr/lib/ruby/site_ruby/1.8/sqlite3/statement.rb:39:in `initialize'
    /usr/lib/ruby/site_ruby/1.8/sqlite3/database.rb:154:in `new'
    /usr/lib/ruby/site_ruby/1.8/sqlite3/database.rb:154:in `prepare'
    /usr/lib/ruby/site_ruby/1.8/sqlite3/database.rb:181:in `execute'
    /usr/lib/ruby/site_ruby/1.8/mrg/grid/config/Configuration.rb:94:in `build'
    /usr/lib/ruby/site_ruby/1.8/mrg/grid/config/Node.rb:236:in `whatChanged'
    /usr/lib/ruby/site_ruby/1.8/spqr/app.rb:130:in `send'
    /usr/lib/ruby/site_ruby/1.8/spqr/app.rb:130:in `method_call'
    /usr/lib/ruby/site_ruby/1.8/qmf.rb:1460:in `do_agent_events'
    /usr/lib/ruby/site_ruby/1.8/qmf.rb:1493:in `do_events'
    /usr/lib/ruby/site_ruby/1.8/qmf.rb:1519:in `sess_event_recv'
    /usr/lib/ruby/site_ruby/1.8/qmf.rb:308:in `run'
    /usr/lib/ruby/site_ruby/1.8/qmf.rb:242:in `initialize'
    /usr/lib/ruby/site_ruby/1.8/qmf.rb:241:in `new'
    /usr/lib/ruby/site_ruby/1.8/qmf.rb:241:in `initialize'
    /usr/lib/ruby/site_ruby/1.8/spqr/app.rb:211:in `new'
    /usr/lib/ruby/site_ruby/1.8/spqr/app.rb:211:in `main'

Expected results:

The operation will complete successfully.

Comment 1 Will Benton 2010-08-11 16:19:20 UTC
This is fixed in master.

Comment 2 Lubos Trilety 2010-08-18 09:22:18 UTC
Problem reproduced with version:

Comment 3 Will Benton 2010-08-18 18:53:48 UTC
0.9.2 was released before the fix.  The fix is in 0.9.4 and later.

Comment 4 Lubos Trilety 2010-08-20 08:00:26 UTC
Tested with (version):

Tested on:
RHEL5 i386,x86_64   - passed
RHEL4 i386,x86_64 (only client)  - passed