[Spacewalk-list] rhn-channel command bombs on servers when adding child channels

Dimitar Yordanov dyordano at redhat.com
Tue Aug 26 12:34:33 UTC 2014


Hi Mark, 

  This issue was addressed in SW-nightly via bug report 1122438 - Syntax Error in SQL-Statement "subscribe_sql" in "rhnChannel.py" 
   https://bugzilla.redhat.com/show_bug.cgi?id=1122438

Dimi

----- Original Message -----
> From: "Mark Manley" <mwmanley at gmail.com>
> To: spacewalk-list at redhat.com
> Sent: Tuesday, August 19, 2014 12:20:37 AM
> Subject: [Spacewalk-list] rhn-channel command bombs on servers when adding	child channels
> 
> Howdy,
> 
> I'm running Spacewalk client/server 2.2 on CentOS 6.4 and seeing these SQL
> errors when trying to run the rhn-channel command on clients to add child
> channels via a proxy. I'm redacting most of the traceback emails since it
> emails quite a bit of information, including passwords. Is this a known bug?
> I have no problems adding child channels via the Spacewalk server's web
> interface or via the spacecmd command, and I used to do this quite a bit
> with the 1.x versions of Spacewalk.
> 
> I see this running:
> 
> rhn-channel -a -c <CHILD CHANNEL LABEL> -u <USER> -p <PASSWORD>
> 
> Removing child channels works great.
> 
> Thanks!
> 
> -MM
> 
> ######
> 
> Extra information about this error:
> SQL Error generated: ('ERROR:  syntax error at or near
> "rhnServerChannel"\nLINE 4:        join rhnServerChannel sc on
> c.parent_channel = sc.cha...\n                    ^\n', <connection object
> at 0x7fb57452bad0; dsn: 'port=5432
> host=spacewalk\-db01\.prd\.nj1\.tapad\.com password=xxxxxxxxxxxxxxxxxxxxxxxx
> dbname=spaceschema user=spaceuser', closed: 0>, '\nselect 1\n  from
> rhnChannel c,\n       join rhnServerChannel sc on c.parent_channel =
> sc.channel_id\n  where sc.server_id = %(sid)s\n    and c.label =
> %(channel)s\n')
> 
> Exception Handler Information
> Traceback (most recent call last):
>   File "/usr/lib/python2.6/site-packages/spacewalk/server/apacheRequest.py",
>   line 122, in call_function
>     response = func(*params)
>   File "/usr/share/rhn/server/handlers/xmlrpc/up2date.py", line 171, in
>   subscribeChannels
>     username, passwd)
>   File "/usr/lib/python2.6/site-packages/spacewalk/server/rhnChannel.py",
>   line 1756, in subscribe_channel
>     h.execute(sid=server_id, channel=str(channel))
>   File
>   "/usr/lib/python2.6/site-packages/spacewalk/server/rhnSQL/sql_base.py",
>   line 147, in execute
>     return self._execute_wrapper(self._execute, *p, **kw)
>   File
>   "/usr/lib/python2.6/site-packages/spacewalk/server/rhnSQL/driver_postgresql.py",
>   line 294, in _execute_wrapper
>     raise sql_base.SQLStatementPrepareError(self.dbh, e.pgerror, self.sql)
> SQLStatementPrepareError: ('ERROR:  syntax error at or near
> "rhnServerChannel"\nLINE 4:        join rhnServerChannel sc on
> c.parent_channel = sc.cha...\n                    ^\n', <connection object
> at 0x7fb57452bad0; dsn: 'port=5432
> host=spacewalk\-db01\.prd\.nj1\.tapad\.com password=xxxxxxxxxxxxxxxxxxxxxxxx
> dbname=spaceschema user=spaceuser', closed: 0>, '\nselect 1\n  from
> rhnChannel c,\n       join rhnServerChannel sc on c.parent_channel =
> sc.channel_id\n  where sc.server_id = %(sid)s\n    and c.label =
> %(channel)s\n')
> 
> Local variables by frame
> Frame _execute_wrapper in
> /usr/lib/python2.6/site-packages/spacewalk/server/rhnSQL/driver_postgresql.py
> at line 294
> 	            function = <type 'instancemethod'> <bound method Cursor._execute
> 	            of <spacewalk.server.rhnSQL.driver_postgresql.Cursor instance
> 	            at 0x7fb574d6be60>>
> 	                   e = <class 'psycopg2.ProgrammingError'> syntax error at
> 	                   or near "rhnServerChannel"
> LINE 4:        join rhnServerChannel sc on c.parent_channel = sc.cha...
>                     ^
> 
> 
> _______________________________________________
> Spacewalk-list mailing list
> Spacewalk-list at redhat.com
> https://www.redhat.com/mailman/listinfo/spacewalk-list

-- 
Dimitar Yordanov
System Management Quality Engineer
Red Hat Satellite | Spacewalk 





More information about the Spacewalk-list mailing list