Bug 657288 - spacewalk-postgresql - registered system is not updating
Summary: spacewalk-postgresql - registered system is not updating
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Spacewalk
Classification: Community
Component: Server
Version: 1.2
Hardware: i386
OS: Linux
low
medium
Target Milestone: ---
Assignee: Jan Pazdziora
QA Contact: Red Hat Satellite QA List
URL:
Whiteboard:
Depends On:
Blocks: space14
TreeView+ depends on / blocked
 
Reported: 2010-11-25 11:39 UTC by Anton Bugreev
Modified: 2011-04-26 09:10 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-04-26 09:10:29 UTC


Attachments (Terms of Use)

Description Anton Bugreev 2010-11-25 11:39:29 UTC
Description of problem:

spacewalk not upgrade packages on registered system (PosgreSQL backend). OS - CentOS 5

On registered system do:
# rhn_check -vvvvvvvvvv
D: opening  db environment /var/lib/rpm/Packages joinenv
D: opening  db index       /var/lib/rpm/Packages rdonly mode=0x0
D: locked   db index       /var/lib/rpm/Packages
D: opening  db index       /var/lib/rpm/Providename rdonly mode=0x0
XMLRPC ProtocolError: <ProtocolError for SPACEWALK-HOST /XMLRPC: 500 Internal Server Error>
D: closed   db index       /var/lib/rpm/Providename
D: closed   db index       /var/lib/rpm/Packages
D: closed   db environment /var/lib/rpm/Packages
D: May free Score board((nil))

From spacewalk i getting error:
Exception reported from SPACEWALK-HOST
Time: Thu Nov 25 16:59:10 2010
Exception type spacewalk.server.rhnSQL.sql_base.SQLStatementPrepareError
Exception while handling function queue.get
Request object information:
URI: /XMLRPC
Remote Host: IP-REGISTERED-SYSTEM
Server Name: SPACEWALK-HOST:0
Headers passed in:
	Accept-Encoding: identity
	Content-Length: 2720
	Host: SPACEWALK-HOST
	content-type: text/xml
	user-agent: rhn.rpclib.py/$Revision$
	x-client-version: 1
	x-info: RPC Processor (C) Red Hat, Inc (version $Revision$)
	x-rhn-client-capability: packages.verifyAll(1)=1,caneatCheese(1)=1,packages.extended_profile(2)=1,reboot.reboot(1)=1,packages.verify(1)=1,packages.runTransaction(1)=1,packages.update(2)=2,packages.rollBack(1)=1,packages.verifyAll(1)=1,caneatCheese(1)=1,packages.extended_profile(2)=1,reboot.reboot(1)=1,packages.verify(1)=1,packages.runTransaction(1)=1,packages.update(2)=2,packages.rollBack(1)=1
	x-rhn-transport-capability: follow-redirects=3
	x-transport-info: Extended Capabilities Transport (C) Red Hat, Inc (version $Revision$)
	x-up2date-version: 1.2.15-1.el5
Extra information about this error:
SQL Error generated: ('syntax error at or near "name" at character 38\n', 0, '\n    select distinct\n        pn.name name,\n        pe.epoch epoch,\n        pe.version version,\n        pe.release release,\n        pa.label  arch\n    from rhnActionPackage ap,\n        rhnPackage p,\n        rhnPackageName pn,\n        rhnPackageEVR pe,\n        rhnPackageArch pa,\n        rhnServerChannel sc,\n        rhnChannelPackage cp\n    where ap.action_id = %(actionid)s\n        and ap.evr_id is not null\n        and ap.evr_id = p.evr_id\n        and ap.evr_id = pe.id\n        and ap.name_id = p.name_id\n        and ap.name_id = pn.id\n        and ap.package_arch_id = pa.id(+)\n        and p.id = cp.package_id\n        and cp.channel_id = sc.channel_id\n        and sc.server_id = %(serverid)s\n    union\n    select distinct\n        pn.name name,\n        null version,\n        null release,\n        null epoch,\n        pa.label arch\n    from rhnActionPackage ap,\n        rhnPackag!
 e p,\n        rhnPackageName pn,\n        rhnPackageArch pa,\n        rhnServerChannel sc,\n        rhnChannelPackage cp\n    where ap.action_id = %(actionid)s\n        and ap.evr_id is null\n        and ap.name_id = p.name_id\n        and p.name_id = pn.id\n        and ap.package_arch_id = pa.id(+)\n        and p.id = cp.package_id\n        and cp.channel_id = sc.channel_id\n        and sc.server_id = %(serverid)s')


Version-Release number of selected component (if applicable):
server package - spacewalk-postgresql-1.2.3-1.el5
client package - rhn-setup-1.2.15-1.el5

How reproducible:
I have reinstalled OS and spacewalk twice with the same result.

Steps to Reproduce:
1. On server add repos:
# BASEARCH=$(uname -i)
# rpm -Uvh http://spacewalk.redhat.com/yum/1.2/RHEL/5/$BASEARCH/spacewalk-repo-1.2-0.el5.noarch.rpm
# rpm -ihv http://spacewalk.redhat.com/yum/1.2/RHEL/5/$BASEARCH/spacewalk-client-repo-1.2-0.el5.noarch.rpm
# wget -O /etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release http://www.redhat.com/security/37017186.txt
# rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release

2. On the server install postgresql (follow https://fedorahosted.org/spacewalk/wiki/PostgreSQLServerSetup)

3. Install Spacewalk:
# yum install spacewalk-postgresql 
# spacewalk-setup --disconnected
  
Actual results:
Packages in the registered system is not updated.

Comment 1 Jan Pazdziora 2010-11-26 13:58:56 UTC
(In reply to comment #0)

Taking.

> Description of problem:
> 
> spacewalk not upgrade packages on registered system (PosgreSQL backend). OS -
> CentOS 5

[...]

> Actual results:
> Packages in the registered system is not updated.

Can you describe in more detail how exactly you try to do the update? Where you click, etc.

Comment 2 Anton Bugreev 2010-11-29 05:27:12 UTC
(In reply to comment #1)
> (In reply to comment #0)
> 
> Taking.
> 
> > Description of problem:
> > 
> > spacewalk not upgrade packages on registered system (PosgreSQL backend). OS -
> > CentOS 5
> 
> [...]
> 
> > Actual results:
> > Packages in the registered system is not updated.
> 
> Can you describe in more detail how exactly you try to do the update? Where you
> click, etc.

On spacewalk panel:
1) i create channel centos5-base-i386
2) i run command spacewalk-repo-sync (syncing with mirror centos)
3) i create activation-key centos-servers-i386-key (where base channel is the centos5-base-i386)

On registering system i run command:
1) rhnreg_ks --serverUrl=http://SPACEWALK-HOST/XMLRPC --activationkey=<key-with-custom-channel>

Again, on spacewalk panel:
1) I go to "Systems" -> "hostname-of-registered-system" and  i see what updates are available (89 packages)
2) I go to "Systems" -> "hostname-of-registered-system" -> "Packages", select all packages and push button "Upgrade Packages".
3) I select "Schedule action as soon as possible" and push button "Confirm"

Within days of getting mail with the subject "RHN TRACEBACK from SPACEWALK-HOST" with an error message (indicated in the first comment).

Registered system is not updating.

p.s. thank you for your attention.

Comment 3 Jan Pazdziora 2011-02-21 09:29:55 UTC
I believe we've addressed the issue with Spacewalk 1.3.

Could you please upgrade and check if it fixes the issue on your installation as well?

Thanks,

Jan

Comment 4 Anton Bugreev 2011-02-22 04:51:47 UTC
Hello.
Unfortunately i removed installation with PostgreSQL DB and installed spacewalk with oracle DB. I will test installation spacewalk 1.3 + PostgreSQL.

Thanks for help.

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


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