[Spacewalk-list] CentOS 4 Clients - RHN TRACEBACK

Jan Pazdziora jpazdziora at redhat.com
Thu Jul 28 11:33:08 UTC 2011


On Mon, Jul 25, 2011 at 08:50:04PM +0000, Flaherty, Patrick wrote:
> 
> I have some legacy centos 4 clients on my Spacewalk 1.5 pg backend. An exception gets raised for function "lookup_package_arch". I think I've tracked it back to "rhnPackageArch" not having "i686-redhat-linux" 
> 
> select * from package_arch_id('i686-redhat-linux');
> ERROR:  -20243 : (package_arch_not_found) - Package architecture could not be found
> CONTEXT:  SQL statement "SELECT  rhn_exception.raise_exception('package_arch_not_found')"
> PL/pgSQL function "package_arch_id" line 14 at PERFORM
> 
> So two questions;
> 1) Are centos 4 clients still supported?
> 2) What's the best way to fix this problem? Re-import the CentOS 4 packages so that "rhnPackageArch" has the right values? Hack i686-redhat-linux into rhnPackageArch? Bleed goat onto KVM environment?
> 

The problem is that

> 	                self = <type 'instance'> <server.handlers.xmlrpc.registration.Registration instance at 0xa050e2c>
> 	             package = <type 'dict'> {'release': '1.2', 'epoch': '', 'version': '1.2.1.2', 'arch': '', 'name': 'zlib-devel'}
> 	           system_id = <type 'str'> <?xml version="1.0"?>

the arch is not reported at all by RHEL 4 clients -- it is an empty
string. And empty strings behaviour differs between PostgreSQL and
Oracle:

	https://fedorahosted.org/spacewalk/wiki/PostgreSQLPortingGuide#empty_string_null

You probably want to change that empty string to None before passing
it to the lookup_package_arch because PostgreSQL will not do that
automatically like Oracle does.

Please end in a patch -- I'll be happy to review and commit it to
Spacewalk master.

-- 
Jan Pazdziora
Principal Software Engineer, Satellite Engineering, Red Hat




More information about the Spacewalk-list mailing list