Bug 517790

Summary: python error when import with spacewalk-repo-sync in multi-platform repo
Product: [Community] Spacewalk Reporter: sHaggY_caT <inbox>
Component: ServerAssignee: Jesus M. Rodriguez <jesusr>
Status: CLOSED CURRENTRELEASE QA Contact: Red Hat Satellite QA List <satqe-list>
Severity: medium Docs Contact:
Priority: low    
Version: 0.6CC: a.j.delaney, jsherril
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2010-04-14 19:21:05 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 559281    
Attachments:
Description Flags
rhnPackage record for MD5SUM=1d331fd47a249e341bb3378145bbae87 none

Description sHaggY_caT 2009-08-17 08:27:21 UTC
Description of problem:

When import rpms with spacewalk-repo-sync in multi-platform repo, for example i386 rpms with openvz repo (with yum this soft installing wery well), 

/usr/bin/spacewalk-repo-sync --channel openvz-utils --url http://mirror.yandex.ru/mirrors/download.openvz.org/current/ --type yum --label openvz-utils

we get python errors, with yum downloaded src.rpms, x86_64 and itanium rpms:

===========================================================
[root@spacewalk tmp]# /usr/bin/spacewalk-repo-sync --channel openvz-utils --url http://mirror.yandex.ru/mirrors/download.openvz.org/current/
--type yum --label openvz-utils
Repo http://mirror.yandex.ru/mirrors/download.openvz.org/current/ has 26 packages.
1/11 : vzctl-3.0.23-1-0.ia64
2/11 : vzctl-3.0.23-1-0.ppc64
3/11 : vzctl-3.0.23-1-0.x86_64
4/11 : vzctl-lib-3.0.23-1-0.ia64
5/11 : vzctl-lib-3.0.23-1-0.ppc64
6/11 : vzctl-lib-3.0.23-1-0.x86_64
7/11 : vzquota-3.0.12-1-0.ia64
8/11 : vzquota-3.0.12-1-0.ppc64
9/11 : vzquota-3.0.12-1-0.x86_64
10/11 : vztmpl-fedora-7-1.1-1-0.src
11/11 : vztmpl-fedora-core-6-1.2-1-0.src
Exception reported from spacewalk.local
Time: Mon Aug 17 03:11:05 2009
Exception type server.importlib.importLib.IncompatibleArchError

Exception Handler Information
Traceback (most recent call last):
  File "/usr/share/rhn/satellite_tools/reposync.py", line 154, in import_packages
    self.associate_package(pack, md5)
  File "/usr/share/rhn/satellite_tools/reposync.py", line 196, in associate_package
    self._importer_run(package, caller, backend)
  File "/usr/share/rhn/satellite_tools/reposync.py", line 204, in _importer_run
    importer.run()
  File "/usr/share/rhn/server/importlib/importLib.py", line 627, in run
    self.fix()
  File "/usr/share/rhn/server/importlib/packageImport.py", line 95, in fix
    self.__copyChannels(package, package)
  File "/usr/share/rhn/server/importlib/packageImport.py", line 205, in __copyChannels
    "Package arch %s incompatible with channel %s" %
IncompatibleArchError: Package arch ia64 incompatible with channel openvz-utils


Exception reported from spacewalk.local
Time: Mon Aug 17 03:11:05 2009
Exception type server.importlib.importLib.IncompatibleArchError

Exception Handler Information
Traceback (most recent call last):
  File "/usr/share/rhn/satellite_tools/reposync.py", line 154, in import_packages
    self.associate_package(pack, md5)
  File "/usr/share/rhn/satellite_tools/reposync.py", line 196, in associate_package
    self._importer_run(package, caller, backend)
  File "/usr/share/rhn/satellite_tools/reposync.py", line 204, in _importer_run
    importer.run()
  File "/usr/share/rhn/server/importlib/importLib.py", line 627, in run
    self.fix()
  File "/usr/share/rhn/server/importlib/packageImport.py", line 95, in fix
    self.__copyChannels(package, package)
  File "/usr/share/rhn/server/importlib/packageImport.py", line 205, in __copyChannels
    "Package arch %s incompatible with channel %s" %
IncompatibleArchError: Package arch ppc64 incompatible with channel openvz-utils


Exception reported from spacewalk.local
Time: Mon Aug 17 03:11:05 2009
Exception type server.importlib.importLib.IncompatibleArchError

Exception Handler Information
Traceback (most recent call last):
  File "/usr/share/rhn/satellite_tools/reposync.py", line 154, in import_packages
    self.associate_package(pack, md5)
  File "/usr/share/rhn/satellite_tools/reposync.py", line 196, in associate_package
    self._importer_run(package, caller, backend)
  File "/usr/share/rhn/satellite_tools/reposync.py", line 204, in _importer_run
    importer.run()
  File "/usr/share/rhn/server/importlib/importLib.py", line 627, in run
    self.fix()
  File "/usr/share/rhn/server/importlib/packageImport.py", line 95, in fix
  self.__copyChannels(package, package)
  File "/usr/share/rhn/server/importlib/packageImport.py", line 205, in __copyChannels
    "Package arch %s incompatible with channel %s" %
IncompatibleArchError: Package arch x86_64 incompatible with channel openvz-utils


Exception reported from spacewalk.local
Time: Mon Aug 17 03:11:05 2009
Exception type server.importlib.importLib.IncompatibleArchError

Exception Handler Information
Traceback (most recent call last):
  File "/usr/share/rhn/satellite_tools/reposync.py", line 154, in import_packages
    self.associate_package(pack, md5)
  File "/usr/share/rhn/satellite_tools/reposync.py", line 196, in associate_package
    self._importer_run(package, caller, backend)
  File "/usr/share/rhn/satellite_tools/reposync.py", line 204, in _importer_run
    importer.run()
  File "/usr/share/rhn/server/importlib/importLib.py", line 627, in run
    self.fix()
  File "/usr/share/rhn/server/importlib/packageImport.py", line 95, in fix
    self.__copyChannels(package, package)
  File "/usr/share/rhn/server/importlib/packageImport.py", line 205, in __copyChannels
    "Package arch %s incompatible with channel %s" %
IncompatibleArchError: Package arch ia64 incompatible with channel openvz-utils


Exception reported from spacewalk.local
Time: Mon Aug 17 03:11:05 2009
Exception type server.importlib.importLib.IncompatibleArchError

Exception Handler Information
Traceback (most recent call last):
  File "/usr/share/rhn/satellite_tools/reposync.py", line 154, in import_packages
    self.associate_package(pack, md5)
  File "/usr/share/rhn/satellite_tools/reposync.py", line 196, in associate_package
    self._importer_run(package, caller, backend)
  File "/usr/share/rhn/satellite_tools/reposync.py", line 204, in _importer_run
    importer.run()
  File "/usr/share/rhn/server/importlib/importLib.py", line 627, in run
 File "/usr/share/rhn/server/importlib/importLib.py", line 627, in run
    self.fix()
  File "/usr/share/rhn/server/importlib/packageImport.py", line 95, in fix
    self.__copyChannels(package, package)
  File "/usr/share/rhn/server/importlib/packageImport.py", line 205, in __copyChannels
    "Package arch %s incompatible with channel %s" %
IncompatibleArchError: Package arch ppc64 incompatible with channel openvz-utils


Exception reported from spacewalk.local
Time: Mon Aug 17 03:11:05 2009
Exception type server.importlib.importLib.IncompatibleArchError

Exception Handler Information
Traceback (most recent call last):
  File "/usr/share/rhn/satellite_tools/reposync.py", line 154, in import_packages
    self.associate_package(pack, md5)
  File "/usr/share/rhn/satellite_tools/reposync.py", line 196, in associate_package
    self._importer_run(package, caller, backend)
  File "/usr/share/rhn/satellite_tools/reposync.py", line 204, in _importer_run
    importer.run()
  File "/usr/share/rhn/server/importlib/importLib.py", line 627, in run
    self.fix()
  File "/usr/share/rhn/server/importlib/packageImport.py", line 95, in fix
    self.__copyChannels(package, package)
  File "/usr/share/rhn/server/importlib/packageImport.py", line 205, in __copyChannels
    "Package arch %s incompatible with channel %s" %
IncompatibleArchError: Package arch x86_64 incompatible with channel openvz-utils


Exception reported from spacewalk.local
Time: Mon Aug 17 03:11:05 2009
Exception type server.importlib.importLib.IncompatibleArchError

Exception Handler Information
Traceback (most recent call last):
  File "/usr/share/rhn/satellite_tools/reposync.py", line 154, in import_packages
    self.associate_package(pack, md5)
  File "/usr/share/rhn/satellite_tools/reposync.py", line 196, in associate_package
 self._importer_run(package, caller, backend)
  File "/usr/share/rhn/satellite_tools/reposync.py", line 204, in _importer_run
    importer.run()
  File "/usr/share/rhn/server/importlib/importLib.py", line 627, in run
    self.fix()
  File "/usr/share/rhn/server/importlib/packageImport.py", line 95, in fix
    self.__copyChannels(package, package)
  File "/usr/share/rhn/server/importlib/packageImport.py", line 205, in __copyChannels
    "Package arch %s incompatible with channel %s" %
IncompatibleArchError: Package arch ia64 incompatible with channel openvz-utils


Exception reported from spacewalk.local
Time: Mon Aug 17 03:11:05 2009
Exception type server.importlib.importLib.IncompatibleArchError

Exception Handler Information
Traceback (most recent call last):
  File "/usr/share/rhn/satellite_tools/reposync.py", line 154, in import_packages
    self.associate_package(pack, md5)
  File "/usr/share/rhn/satellite_tools/reposync.py", line 196, in associate_package
    self._importer_run(package, caller, backend)
  File "/usr/share/rhn/satellite_tools/reposync.py", line 204, in _importer_run
    importer.run()
  File "/usr/share/rhn/server/importlib/importLib.py", line 627, in run
    self.fix()
  File "/usr/share/rhn/server/importlib/packageImport.py", line 95, in fix
    self.__copyChannels(package, package)
  File "/usr/share/rhn/server/importlib/packageImport.py", line 205, in __copyChannels
    "Package arch %s incompatible with channel %s" %
IncompatibleArchError: Package arch ppc64 incompatible with channel openvz-utils


Exception reported from spacewalk.local
Time: Mon Aug 17 03:11:05 2009
Exception type server.importlib.importLib.IncompatibleArchError

Exception Handler Information
Traceback (most recent call last):
  File "/usr/share/rhn/satellite_tools/reposync.py", line 154, in import_packages
    self.associate_package(pack, md5)
  File "/usr/share/rhn/satellite_tools/reposync.py", line 196, in associate_package
    self._importer_run(package, caller, backend)
  File "/usr/share/rhn/satellite_tools/reposync.py", line 204, in _importer_run
    importer.run()
  File "/usr/share/rhn/server/importlib/importLib.py", line 627, in run
    self.fix()
  File "/usr/share/rhn/server/importlib/packageImport.py", line 95, in fix
    self.__copyChannels(package, package)
  File "/usr/share/rhn/server/importlib/packageImport.py", line 205, in __copyChannels
    "Package arch %s incompatible with channel %s" %
IncompatibleArchError: Package arch x86_64 incompatible with channel openvz-utils


Exception reported from spacewalk.local
Time: Mon Aug 17 03:11:05 2009
Exception type server.importlib.importLib.InvalidPackageError

Exception Handler Information
Traceback (most recent call last):
  File "/usr/share/rhn/satellite_tools/reposync.py", line 154, in import_packages
    self.associate_package(pack, md5)
  File "/usr/share/rhn/satellite_tools/reposync.py", line 196, in associate_package
    self._importer_run(package, caller, backend)
 File "/usr/share/rhn/satellite_tools/reposync.py", line 204, in _importer_run
    importer.run()
  File "/usr/share/rhn/server/importlib/importLib.py", line 628, in run
    self.submit()
  File "/usr/share/rhn/server/importlib/packageImport.py", line 114, in submit
    self.backend.lookupPackages(self.batch)
  File "/usr/share/rhn/server/importlib/backend.py", line 519, in lookupPackages
    self.__lookupObjectCollection(packages, 'rhnPackage', ignore_missing)
  File "/usr/share/rhn/server/importlib/backend.py", line 1771, in __lookupObjectCollection
    raise InvalidPackageError(object, "Could not find object %s in table %s" % (object, tableName))
InvalidPackageError: Could not find object [<server.importlib.importLib.IncompletePackage instance; attributes={'package_size': None, 'package_arch_id': 111, 'name': 'vztmpl-fedora-7', 'md5sum': '27a8d66beda0fe4e915e1564c468e8f3', 'org_id': '1', 'package_id': None, 'channels': {134: 'openvz-utils'}, 'nevra_id': 7978, 'epoch': '', 'version': '1.1', 'name_id': 3580, 'last_modified': None, 'release': '1', 'arch': 'src', 'evr_id': 3705}] in table rhnPackage


Exception reported from spacewalk.local
Time: Mon Aug 17 03:11:05 2009
Exception type server.importlib.importLib.InvalidPackageError

Exception Handler Information
Traceback (most recent call last):
  File "/usr/share/rhn/satellite_tools/reposync.py", line 154, in import_packages
    self.associate_package(pack, md5)
  File "/usr/share/rhn/satellite_tools/reposync.py", line 196, in associate_package
    self._importer_run(package, caller, backend)
  File "/usr/share/rhn/satellite_tools/reposync.py", line 204, in _importer_run
    importer.run()
  File "/usr/share/rhn/server/importlib/importLib.py", line 628, in run
    self.submit()
  File "/usr/share/rhn/server/importlib/packageImport.py", line 114, in submit
    self.backend.lookupPackages(self.batch)
  File "/usr/share/rhn/server/importlib/backend.py", line 519, in lookupPackages
    self.__lookupObjectCollection(packages, 'rhnPackage', ignore_missing)
  File "/usr/share/rhn/server/importlib/backend.py", line 1771, in __lookupObjectCollection
    raise InvalidPackageError(object, "Could not find object %s in table %s" % (object, tableName))
InvalidPackageError: Could not find object [<server.importlib.importLib.IncompletePackage instance; attributes={'package_size': None, 'package_arch_id': 111, 'name': 'vztmpl-fedora-core-6', 'md5sum': '27a8d66beda0fe4e915e1564c468e8f3', 'org_id': '1', 'package_id': None, 'channels': {134: 'openvz-utils'}, 'nevra_id': 7985, 'epoch': '', 'version': '1.2', 'name_id': 3581, 'last_modified': None, 'release': '1', 'arch': 'src', 'evr_id': 3707}] in table rhnPackage


Exception reported from spacewalk.local
Time: Mon Aug 17 03:11:05 2009
Exception type server.importlib.importLib.InvalidPackageError

Exception Handler Information
Traceback (most recent call last):
  File "/usr/share/rhn/satellite_tools/reposync.py", line 154, in import_packages
    self.associate_package(pack, md5)
  File "/usr/share/rhn/satellite_tools/reposync.py", line 196, in associate_package
    self._importer_run(package, caller, backend)
  File "/usr/share/rhn/satellite_tools/reposync.py", line 204, in _importer_run
    importer.run()
  File "/usr/share/rhn/server/importlib/importLib.py", line 628, in run
    self.submit()
  File "/usr/share/rhn/server/importlib/packageImport.py", line 114, in submit
    self.backend.lookupPackages(self.batch)
  File "/usr/share/rhn/server/importlib/backend.py", line 519, in lookupPackages
    self.__lookupObjectCollection(packages, 'rhnPackage', ignore_missing)
  File "/usr/share/rhn/server/importlib/backend.py", line 1771, in __lookupObjectCollection
    raise InvalidPackageError(object, "Could not find object %s in table %s" % (object, tableName))
InvalidPackageError: Could not find object [<server.importlib.importLib.IncompletePackage instance; attributes={'package_size': None, 'package_arch_id': 111, 'name': 'vztmpl-fedora-core-6', 'md5sum': '27a8d66beda0fe4e915e1564c468e8f3', 'org_id': '1', 'package_id': None, 'channels': {134: 'openvz-utils'}, 'nevra_id': 7985, 'epoch': '', 'version': '1.2', 'name_id': 3581, 'last_modified': None, 'release': '1', 'arch': 'src', 'evr_id': 3707}] in table rhnPackage


Sync complete

Comment 1 Aidan Delaney 2009-09-23 09:26:52 UTC
I have a log-file with 15996 occurrences of this error.  I'm running spacewalk 0.6 on x86_64 and was spacewalk-repo-sync'ing the Fedora 11 PPC repo.  Example error below.  My spacewalk 0.6 was upgraded from 0.5 and is thus not a clean install.

Exception Handler Information
Traceback (most recent call last):
  File "/usr/share/rhn/satellite_tools/reposync.py", line 157, in import_packages
    self.associate_package(pack, md5)
  File "/usr/share/rhn/satellite_tools/reposync.py", line 199, in associate_package
    self._importer_run(package, caller, backend)
  File "/usr/share/rhn/satellite_tools/reposync.py", line 207, in _importer_run
    importer.run()
  File "/usr/share/rhn/server/importlib/importLib.py", line 628, in run
    self.submit()
  File "/usr/share/rhn/server/importlib/packageImport.py", line 114, in submit
    self.backend.lookupPackages(self.batch)
  File "/usr/share/rhn/server/importlib/backend.py", line 519, in lookupPackages
    self.__lookupObjectCollection(packages, 'rhnPackage', ignore_missing)
  File "/usr/share/rhn/server/importlib/backend.py", line 1771, in __lookupObjectCollection
    raise InvalidPackageError(object, "Could not find object %s in table %s" % (object, tableName))
InvalidPackageError: Could not find object [<server.importlib.importLib.IncompletePackage instance; attributes={'package_size': None, 'package_arch_id': 100\
, 'name': 'dnssec-conf', 'md5sum': '1d331fd47a249e341bb3378145bbae87', 'org_id': '1', 'package_id': None, 'channels': {121: 'fedora-11-ppc'}, 'nevra_id': 39\
2, 'epoch': '', 'version': '1.20', 'name_id': 316, 'last_modified': None, 'release': '2.fc11', 'arch': 'noarch', 'evr_id': 181}] in table rhnPackage

Comment 2 Aidan Delaney 2009-09-23 10:10:21 UTC
The description of the table in my db is below.  It doesn't appear to match many of the attributes of the IncompletePackage object.  For instance, the table has no "name" as a varchar, nor does it have an "arch".

SQL> desc rhnPackage
 Name					   Null?    Type
 ----------------------------------------- -------- ----------------------------
 ID					   NOT NULL NUMBER
 ORG_ID 					    NUMBER
 NAME_ID				   NOT NULL NUMBER
 EVR_ID 				   NOT NULL NUMBER
 PACKAGE_ARCH_ID			   NOT NULL NUMBER
 PACKAGE_GROUP					    NUMBER
 RPM_VERSION					    VARCHAR2(16)
 DESCRIPTION					    VARCHAR2(4000)
 SUMMARY					    VARCHAR2(4000)
 PACKAGE_SIZE				   NOT NULL NUMBER
 PAYLOAD_SIZE					    NUMBER
 BUILD_HOST					    VARCHAR2(256)
 BUILD_TIME					    DATE
 SOURCE_RPM_ID					    NUMBER
 MD5SUM 				   NOT NULL VARCHAR2(64)
 VENDOR 				   NOT NULL VARCHAR2(64)
 PAYLOAD_FORMAT 				    VARCHAR2(32)
 COMPAT 					    NUMBER(1)
 PATH						    VARCHAR2(1000)
 HEADER_SIG					    VARCHAR2(64)
 COPYRIGHT					    VARCHAR2(128)
 COOKIE 					    VARCHAR2(128)
 LAST_MODIFIED				   NOT NULL DATE
 CREATED				   NOT NULL DATE
 MODIFIED				   NOT NULL DATE
 HEADER_START				   NOT NULL NUMBER
 HEADER_END				   NOT NULL NUMBER

Comment 3 Aidan Delaney 2009-09-23 10:36:03 UTC
Created attachment 362276 [details]
rhnPackage record for MD5SUM=1d331fd47a249e341bb3378145bbae87

In the example stacktrace from comment #1 there is an InvalidPackageError because 
a record of the package cannot be found in the database.  I've manually pulled out the record that is associated where MD5SUM = '1d331fd47a249e341bb3378145bbae87'.   As you can see there is partial information for the package dnssec-conf in the database.

Is there any other information that I can provide?

Comment 4 Aidan Delaney 2009-09-25 08:58:49 UTC
This issue appears to have been solved in git.  See
http://git.fedorahosted.org/git/spacewalk.git/?p=spacewalk.git;a=commitdiff_plain;h=00265ecc8795780e511234ac28819c0c7e708ce0
for details.

JSherril rocks.  I shall send him a pet winged monkey.

Comment 5 Justin Sherrill 2010-04-14 19:21:05 UTC
Nice to see that this was resolved :}

-Justin