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
Fixed in spacewalk master by commit fe7eae1b5e7b5fae73ecf145b6fa25d753c087a0 query should not end with semicolon in oracle
Spacewalk 2.1 has been released. https://fedorahosted.org/spacewalk/wiki/ReleaseNotes21