Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 1064274 - spacewalk-remove-channel failing on OracleXE DB backend with "SQLStatementPrepareError: ('ORA-00911: invalid character\n'..."
Summary: spacewalk-remove-channel failing on OracleXE DB backend with "SQLStatementPre...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Spacewalk
Classification: Community
Component: Server
Version: 2.1
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Michael Mráka
QA Contact: Red Hat Satellite QA List
URL:
Whiteboard:
Depends On:
Blocks: space21
TreeView+ depends on / blocked
 
Reported: 2014-02-12 10:29 UTC by Jan Hutař
Modified: 2014-03-04 13:08 UTC (History)
0 users

Fixed In Version: spacewalk-backend-2.1.50-1
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-03-04 13:07:25 UTC


Attachments (Terms of Use)

Description Jan Hutař 2014-02-12 10:29:45 UTC
Description of problem:
spacewalk-remove-channel failing on OracleXE DB backend with "SQLStatementPrepareError: ('ORA-00911: invalid character\n'..."


Version-Release number of selected component (if applicable):
spacewalk-backend-tools-2.1.49-1.el5


How reproducible:
always


Steps to Reproduce:
1. # spacewalk-remove-channel -v -u -c <some_custom_channel>


Actual results:
# spacewalk-remove-channel -v -u -c <some_custom_channel>
2014/02/12 05:23:09 -04:00 rhnSQL/driver_cx_Oracle.connect('Connecting to database', 'spaceuser@//localhost:1521/XE')

ERROR: unhandled exception occurred: (('ORA-00911: invalid character\n', 911, "select kt.base_path from rhnChannel c join rhnKickstartableTree kt on c.id = kt.channel_id where c.label in (:p_0) and not exists ( select 1 from rhnKickstartableTree ktx join rhnChannel cx on cx.id = ktx.channel_id where replace(ktx.base_path, :mnt_point, '') = replace(kt.base_path, :mnt_point, '') and cx.label not in (:p_0));")).
Traceback (most recent call last):
  File "/usr/bin/spacewalk-remove-channel", line 589, in ?
    sys.exit(main() or 0)
  File "/usr/bin/spacewalk-remove-channel", line 152, in main
    skip_kickstart_trees=options.skip_kickstart_trees)
  File "/usr/bin/spacewalk-remove-channel", line 305, in delete_channels
    _delete_ks_files(channelLabels)
  File "/usr/bin/spacewalk-remove-channel", line 569, in _delete_ks_files
    h.execute(**params)
  File "/usr/lib/python2.4/site-packages/spacewalk/server/rhnSQL/sql_base.py", line 153, in execute
    return apply(self._execute_wrapper, (self._execute, ) + p, kw)
  File "/usr/lib/python2.4/site-packages/spacewalk/server/rhnSQL/driver_cx_Oracle.py", line 109, in _execute_wrapper
    retval = apply(function, p, kw)
  File "/usr/lib/python2.4/site-packages/spacewalk/server/rhnSQL/sql_base.py", line 207, in _execute
    return self._execute_(args, kwargs)
  File "/usr/lib/python2.4/site-packages/spacewalk/server/rhnSQL/driver_cx_Oracle.py", line 162, in _execute_
    self._real_cursor.execute(*(None, ), **params)
SQLStatementPrepareError: ('ORA-00911: invalid character\n', 911, "select kt.base_path from rhnChannel c join rhnKickstartableTree kt on c.id = kt.channel_id where c.label in (:p_0) and not exists ( select 1 from rhnKickstartableTree ktx join rhnChannel cx on cx.id = ktx.channel_id where replace(ktx.base_path, :mnt_point, '') = replace(kt.base_path, :mnt_point, '') and cx.label not in (:p_0));")


Expected results:
Should delete the channel

Comment 2 Michael Mráka 2014-02-12 13:21:09 UTC
Fixed in spacewalk master by
commit fe7eae1b5e7b5fae73ecf145b6fa25d753c087a0
    query should not end with semicolon in oracle

Comment 3 Matej Kollar 2014-03-04 13:07:25 UTC
Spacewalk 2.1 has been released.
https://fedorahosted.org/spacewalk/wiki/ReleaseNotes21

Comment 4 Matej Kollar 2014-03-04 13:08:48 UTC
Spacewalk 2.1 has been released.
https://fedorahosted.org/spacewalk/wiki/ReleaseNotes21


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