Bug 674510 - SQLStatementPrepareError: ('syntax error at or near "call" at character 11', 0, 'call rhn_channel.unsubscribe_server... - when deleting channel
Summary: SQLStatementPrepareError: ('syntax error at or near "call" at character 11', ...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Spacewalk
Classification: Community
Component: Server
Version: 1.3
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Michael Mráka
QA Contact: Red Hat Satellite QA List
URL:
Whiteboard:
Depends On:
Blocks: space14
TreeView+ depends on / blocked
 
Reported: 2011-02-02 09:21 UTC by Jan Hutař
Modified: 2011-04-26 09:10 UTC (History)
0 users

Fixed In Version: spacewalk-backend-1.4.3-1
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-04-26 09:10:38 UTC
Embargoed:


Attachments (Terms of Use)

Description Jan Hutař 2011-02-02 09:21:05 UTC
Description of problem:
When I try to delete channel, I got a traceback.


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


How reproducible:
1 of 1


Steps to Reproduce:
1. Have custom channel with system registered in it
2. Try to delete that channel
   # spacewalk-remove-channel -v -u -c psklenar_test_signed-channel


Actual results:
# spacewalk-remove-channel -v -c psklenar_test_signed-channel

Currently there are systems subscribed to one or more of the specified channels.
If you would like to automatically unsubscribe these systems, simply use the --unsubscribe flag.

The following systems were found to be subscribed:
org_id   id             name
--------------------------------
1        1000010011     automation-hp-nehalem-02.rhts.eng.bos.redhat.com
# spacewalk-remove-channel -v -u -c psklenar_test_signed-channel

The following channels will have their systems unsubscribed:
psklenar_test_signed-channel             1       
                  ________________________________________
Unsubscribing:    
ERROR: unhandled exception occurred: (('syntax error at or near "call" at character 11\n', 0, '\n         call rhn_channel.unsubscribe_server(%(server_id)s, %(channel_id)s)\n    ')).
Traceback (most recent call last):
  File "/usr/bin/spacewalk-remove-channel", line 553, in ?
    sys.exit(main() or 0)
  File "/usr/bin/spacewalk-remove-channel", line 131, in main
    if __serverCheck(channels.keys(), options.unsubscribe):
  File "/usr/bin/spacewalk-remove-channel", line 167, in __serverCheck
    return  __unsubscribeServers(labels)
  File "/usr/bin/spacewalk-remove-channel", line 216, in __unsubscribeServers
    __unbsubscribeServer(i['server_id'], i['channel_id'])
  File "/usr/bin/spacewalk-remove-channel", line 227, in __unbsubscribeServer
    h.execute(server_id=server_id, channel_id=channel_id)
  File "/usr/lib/python2.4/site-packages/spacewalk/server/rhnSQL/sql_base.py", line 163, in execute
    return apply(self._execute_wrapper, (self._execute, ) + p, kw)
  File "/usr/lib/python2.4/site-packages/spacewalk/server/rhnSQL/driver_postgresql.py", line 263, in _execute_wrapper
    raise rhnSQL.SQLStatementPrepareError(0, str(e), self.sql)
SQLStatementPrepareError: ('syntax error at or near "call" at character 11\n', 0, '\n         call rhn_channel.unsubscribe_server(%(server_id)s, %(channel_id)s)\n    ')


Expected results:
Should just work

Comment 2 Michael Mráka 2011-02-04 15:38:10 UTC
Fixed by
commit a941d18d25b8748a1f23c9016c5ab26307b10522
    674510 - fixed procedure call (PG)

Comment 3 Miroslav Suchý 2011-04-11 07:45:11 UTC
Mass moving to ON_QA before release of Spacewalk 1.4

Comment 4 Miroslav Suchý 2011-04-26 09:10:38 UTC
Spacewalk 1.4 has been released


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