Description of problem: I cannot push rhel4 package, TypeError: expecting numeric data Version-Release number of selected component (if applicable): today's sw nightly on F13 rhnpush-5.5.4-1.fc13.noarch spacewalk-backend-1.1.42-1.fc13.noarch spacewalk-schema-1.1.21-1.fc13.noarch How reproducible: alwyas with this zsh-4.2.0-4.EL.4.5.i386.rpm from rhel4 Steps to Reproduce: 1. create i386 called 'bug523146-1619' on space3walk 2. rhnpush -v --server=nec-em9.rhts.eng.bos.redhat.com --username=XX --password=YY rhel4/zsh-4.2.0-4.EL.4.5.i386.rpm --channel=bug523146-1619 Actual results: (selinux and iptables was switched off) # rhnpush -v --server=nec-em9.rhts.eng.bos.redhat.com --username=admin --password=admin rhel4/zsh-4.2.0-4.EL.4.5.i386.rpm --channel=bug523146-1619 -vvv Connecting to http://nec-em9.rhts.eng.bos.redhat.com/APP url is http://nec-em9.rhts.eng.bos.redhat.com/PACKAGE-PUSH Result codes: 200 OK Computing checksum and package info. This may take some time ... Package rhel4/zsh-4.2.0-4.EL.4.5.i386.rpm Not Found on RHN Server -- Uploading Uploading package rhel4/zsh-4.2.0-4.EL.4.5.i386.rpm Using POST request Internal server error 500 Internal Server Error Error pushing rhel4/zsh-4.2.0-4.EL.4.5.i386.rpm: (500) Expected results: I can push the package Additional info: [Wed Jul 28 14:06:27 2010] [error] RHN 1331 2010/07/28 14:06:27 -04:00: ('Unhandled exception',) [Wed Jul 28 14:06:28 2010] [error] Exception reported from nec-em9.rhts.eng.bos.redhat.com [Wed Jul 28 14:06:28 2010] [error] Time: Wed Jul 28 14:06:28 2010 [Wed Jul 28 14:06:28 2010] [error] Exception type <type 'exceptions.TypeError'> [Wed Jul 28 14:06:28 2010] [error] Exception while handling function upload_server._wrapper [Wed Jul 28 14:06:28 2010] [error] Request object information: [Wed Jul 28 14:06:28 2010] [error] URI: /PACKAGE-PUSH [Wed Jul 28 14:06:28 2010] [error] Remote Host: nec-em9.rhts.eng.bos.redhat.com [Wed Jul 28 14:06:28 2010] [error] Server Name: nec-em9.rhts.eng.bos.redhat.com:80 [Wed Jul 28 14:06:28 2010] [error] Headers passed in: [Wed Jul 28 14:06:28 2010] [error] \tAccept-Encoding: identity [Wed Jul 28 14:06:28 2010] [error] \tCONTENT_LENGTH: 1665511 [Wed Jul 28 14:06:28 2010] [error] \tCONTENT_TYPE: application/x-rpm [Wed Jul 28 14:06:28 2010] [error] \tDOCUMENT_ROOT: /var/www/html [Wed Jul 28 14:06:28 2010] [error] \tGATEWAY_INTERFACE: CGI/1.1 [Wed Jul 28 14:06:28 2010] [error] \tHTTP_ACCEPT_ENCODING: identity [Wed Jul 28 14:06:28 2010] [error] \tHTTP_HOST: nec-em9.rhts.eng.bos.redhat.com [Wed Jul 28 14:06:28 2010] [error] \tHTTP_USER_AGENT: rhnpush [Wed Jul 28 14:06:28 2010] [error] \tHTTP_X_RHN_UPLOAD_AUTH_SESSION: 68x3de6d695518e59e456fd61e3ea3dd14f [Wed Jul 28 14:06:28 2010] [error] \tHTTP_X_RHN_UPLOAD_FILE_MD5SUM: 7913adfe26af9354b1c26156db2fb66e [Wed Jul 28 14:06:28 2010] [error] \tHTTP_X_RHN_UPLOAD_FORCE: 0 [Wed Jul 28 14:06:28 2010] [error] \tHTTP_X_RHN_UPLOAD_PACKAGE_ARCH: i386 [Wed Jul 28 14:06:28 2010] [error] \tHTTP_X_RHN_UPLOAD_PACKAGE_NAME: zsh [Wed Jul 28 14:06:28 2010] [error] \tHTTP_X_RHN_UPLOAD_PACKAGE_RELEASE: 4.EL.4.5 [Wed Jul 28 14:06:28 2010] [error] \tHTTP_X_RHN_UPLOAD_PACKAGE_VERSION: 4.2.0 [Wed Jul 28 14:06:28 2010] [error] \tHTTP_X_RHN_UPLOAD_PACKAGING: rpm [Wed Jul 28 14:06:28 2010] [error] \tHost: nec-em9.rhts.eng.bos.redhat.com [Wed Jul 28 14:06:28 2010] [error] \tNLS_LANG: english.AL32UTF8 [Wed Jul 28 14:06:28 2010] [error] \tORACLE_HOME: /opt/oracle [Wed Jul 28 14:06:28 2010] [error] \tPATH_INFO: [Wed Jul 28 14:06:28 2010] [error] \tQUERY_STRING: [Wed Jul 28 14:06:28 2010] [error] \tREMOTE_ADDR: 127.0.0.1 [Wed Jul 28 14:06:28 2010] [error] \tREMOTE_PORT: 57089 [Wed Jul 28 14:06:28 2010] [error] \tREQUEST_METHOD: POST [Wed Jul 28 14:06:28 2010] [error] \tREQUEST_URI: /PACKAGE-PUSH [Wed Jul 28 14:06:28 2010] [error] \tSCRIPT_FILENAME: /usr/share/rhn/wsgi/package_push.py [Wed Jul 28 14:06:28 2010] [error] \tSCRIPT_NAME: /PACKAGE-PUSH [Wed Jul 28 14:06:28 2010] [error] \tSCRIPT_URI: http://nec-em9.rhts.eng.bos.redhat.com/PACKAGE-PUSH [Wed Jul 28 14:06:28 2010] [error] \tSCRIPT_URL: /PACKAGE-PUSH [Wed Jul 28 14:06:28 2010] [error] \tSERVER_ADDR: 127.0.0.1 [Wed Jul 28 14:06:28 2010] [error] \tSERVER_ADMIN: root@localhost [Wed Jul 28 14:06:28 2010] [error] \tSERVER_NAME: nec-em9.rhts.eng.bos.redhat.com [Wed Jul 28 14:06:28 2010] [error] \tSERVER_PORT: 80 [Wed Jul 28 14:06:28 2010] [error] \tSERVER_PROTOCOL: HTTP/1.1 [Wed Jul 28 14:06:28 2010] [error] \tSERVER_SIGNATURE: <address>Apache Server at nec-em9.rhts.eng.bos.redhat.com Port 80</address> [Wed Jul 28 14:06:28 2010] [error] [Wed Jul 28 14:06:28 2010] [error] \tSERVER_SOFTWARE: Apache [Wed Jul 28 14:06:28 2010] [error] \tUser-Agent: rhnpush [Wed Jul 28 14:06:28 2010] [error] \tX-RHN-Upload-Auth-Session: 68x3de6d695518e59e456fd61e3ea3dd14f [Wed Jul 28 14:06:28 2010] [error] \tX-RHN-Upload-File-Checksum: 7913adfe26af9354b1c26156db2fb66e [Wed Jul 28 14:06:28 2010] [error] \tX-RHN-Upload-File-Checksum-Type: md5 [Wed Jul 28 14:06:28 2010] [error] \tX-RHN-Upload-File-MD5sum: 7913adfe26af9354b1c26156db2fb66e [Wed Jul 28 14:06:28 2010] [error] \tX-RHN-Upload-Force: 0 [Wed Jul 28 14:06:28 2010] [error] \tX-RHN-Upload-Package-Arch: i386 [Wed Jul 28 14:06:28 2010] [error] \tX-RHN-Upload-Package-Name: zsh [Wed Jul 28 14:06:28 2010] [error] \tX-RHN-Upload-Package-Release: 4.EL.4.5 [Wed Jul 28 14:06:28 2010] [error] \tX-RHN-Upload-Package-Version: 4.2.0 [Wed Jul 28 14:06:28 2010] [error] \tX-RHN-Upload-Packaging: rpm [Wed Jul 28 14:06:28 2010] [error] \tmod_wsgi.application_group: nec-em9.rhts.eng.bos.redhat.com|/package-push [Wed Jul 28 14:06:28 2010] [error] \tmod_wsgi.callable_object: application [Wed Jul 28 14:06:28 2010] [error] \tmod_wsgi.handler_script: [Wed Jul 28 14:06:28 2010] [error] \tmod_wsgi.input_chunked: 0 [Wed Jul 28 14:06:28 2010] [error] \tmod_wsgi.listener_host: [Wed Jul 28 14:06:28 2010] [error] \tmod_wsgi.listener_port: 80 [Wed Jul 28 14:06:28 2010] [error] \tmod_wsgi.process_group: [Wed Jul 28 14:06:28 2010] [error] \tmod_wsgi.request_handler: wsgi-script [Wed Jul 28 14:06:28 2010] [error] \tmod_wsgi.script_reloading: 1 [Wed Jul 28 14:06:28 2010] [error] \tmod_wsgi.version: (3, 1) [Wed Jul 28 14:06:28 2010] [error] \twsgi.errors: <mod_wsgi.Log object at 0x27a0340> [Wed Jul 28 14:06:28 2010] [error] \twsgi.file_wrapper: <built-in method file_wrapper of mod_wsgi.Adapter object at 0x2783608> [Wed Jul 28 14:06:28 2010] [error] \twsgi.input: <mod_wsgi.Input object at 0x27a0610> [Wed Jul 28 14:06:28 2010] [error] \twsgi.multiprocess: True [Wed Jul 28 14:06:28 2010] [error] \twsgi.multithread: False [Wed Jul 28 14:06:28 2010] [error] \twsgi.run_once: False [Wed Jul 28 14:06:28 2010] [error] \twsgi.url_scheme: http [Wed Jul 28 14:06:28 2010] [error] \twsgi.version: (1, 1) [Wed Jul 28 14:06:28 2010] [error] [Wed Jul 28 14:06:28 2010] [error] Exception Handler Information [Wed Jul 28 14:06:28 2010] [error] Traceback (most recent call last): [Wed Jul 28 14:06:28 2010] [error] File "/usr/share/rhn/server/apacheUploadServer.py", line 102, in _wrapper [Wed Jul 28 14:06:28 2010] [error] ret = function(req) [Wed Jul 28 14:06:28 2010] [error] File "/usr/share/rhn/upload_server/handlers/package_push/package_push.py", line 135, in handler [Wed Jul 28 14:06:28 2010] [error] relative_path=self.rel_package_path, org_id=self.org_id) [Wed Jul 28 14:06:28 2010] [error] File "/usr/share/rhn/server/rhnPackageUpload.py", line 175, in push_package [Wed Jul 28 14:06:28 2010] [error] importer.run() [Wed Jul 28 14:06:28 2010] [error] File "/usr/share/rhn/server/importlib/importLib.py", line 648, in run [Wed Jul 28 14:06:28 2010] [error] self.submit() [Wed Jul 28 14:06:28 2010] [error] File "/usr/share/rhn/server/importlib/packageImport.py", line 318, in submit [Wed Jul 28 14:06:28 2010] [error] transactional=self.transactional) [Wed Jul 28 14:06:28 2010] [error] File "/usr/share/rhn/server/importlib/backend.py", line 742, in processPackages [Wed Jul 28 14:06:28 2010] [error] transactional=transactional) [Wed Jul 28 14:06:28 2010] [error] File "/usr/share/rhn/server/importlib/backend.py", line 1601, in __processObjectCollection__ [Wed Jul 28 14:06:28 2010] [error] return self.__doDML(dml) [Wed Jul 28 14:06:28 2010] [error] File "/usr/share/rhn/server/importlib/backend.py", line 1709, in __doDML [Wed Jul 28 14:06:28 2010] [error] self.__doInsert(dml.insert, dml.tables) [Wed Jul 28 14:06:28 2010] [error] File "/usr/share/rhn/server/importlib/backend.py", line 1716, in __doInsert [Wed Jul 28 14:06:28 2010] [error] self.__doInsertTable(tname, dict) [Wed Jul 28 14:06:28 2010] [error] File "/usr/share/rhn/server/importlib/backend.py", line 1730, in __doInsertTable [Wed Jul 28 14:06:28 2010] [error] insertObj.query(hash) [Wed Jul 28 14:06:28 2010] [error] File "/usr/share/rhn/server/importlib/backendLib.py", line 428, in query [Wed Jul 28 14:06:28 2010] [error] executeStatement(statement, values, self.count) [Wed Jul 28 14:06:28 2010] [error] File "/usr/share/rhn/server/importlib/backendLib.py", line 458, in executeStatement [Wed Jul 28 14:06:28 2010] [error] count = count + apply(statement.executemany, (), tempdict) [Wed Jul 28 14:06:28 2010] [error] File "/usr/share/rhn/server/rhnSQL/sql_base.py", line 177, in executemany [Wed Jul 28 14:06:28 2010] [error] return apply(self._execute_wrapper, (self._executemany, ) + p, kw) [Wed Jul 28 14:06:28 2010] [error] File "/usr/share/rhn/server/rhnSQL/driver_cx_Oracle.py", line 98, in _execute_wrapper [Wed Jul 28 14:06:28 2010] [error] retval = apply(function, p, kw) [Wed Jul 28 14:06:28 2010] [error] File "/usr/share/rhn/server/rhnSQL/driver_cx_Oracle.py", line 189, in _executemany [Wed Jul 28 14:06:28 2010] [error] self._real_cursor.executemany(None, arr) [Wed Jul 28 14:06:28 2010] [error] TypeError: expecting numeric data [Wed Jul 28 14:06:28 2010] [error] [Wed Jul 28 14:06:28 2010] [error] RHN 1334 2010/07/28 14:06:28 -04:00: ('Unhandled exception',)
[root@xen96 ~]# cat /etc/fedora-release Fedora release 13 (Goddard) [root@xen96 ~]# rpm -q rhnpush spacewalk-backend spacewalk-schema rhnpush-5.5.4-1.fc13.noarch spacewalk-backend-1.2.1-1.fc13.noarch spacewalk-schema-1.1.30-1.fc13.noarch [root@xen96 ~]# rhnpush -v --server=localhost --username=admin --pass XXX --channel bug523146-1619 zsh-4.2.0-4.EL.4.5.i386.rpm Connecting to http://localhost/APP Package zsh-4.2.0-4.EL.4.5.i386.rpm Not Found on RHN Server -- Uploading Uploading package zsh-4.2.0-4.EL.4.5.i386.rpm Using POST request And package is avaiable in webUI.
I've bumped up the debug and the difference between RHEL 5 and Fedora 13 (both i386) is that on RHEL 5 (python 2.4), verifyflags for that zsh rpm are -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1, -1, -1, -1, -1, ... while on Fedora 13 (python 2.6, should that be the main difference), the values are 4294967295L, 4294967295L, 4294967295L, 4294967295L, 4294967295L, 42 94967295L, 4294967295L, 4294967295L, 4294967295L, 4294967295L, 4294967295L, 4294967295L, 4294967295L, 4294967295L, 4294967295L, 4294967295L, 4294967295L, 429496 7295L, 4294967295L, 4294967295L, 4294967295L, 4294967295L, 4294967295L, 4294967295L, 4294967295L, 4294967295L, 4294967295L, 4294967295L, 4294967295L, 4294967295 L, 4294967295L, 4294967295L, 4294967295L, 4294967295L, 4294967295L, 4294967295L, 4294967295L, 4294967295L, 4294967295L, 4294967295L, 4294967295L, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4294967295L, 4294967295L, 4294967295L, 4294967295L, ...
Also, when I've forced the chunk_size to be 1 in _executemany in driver_cx_Oracle.py, the thing passes on Fedora 13. When I've changed it to 2, it fails in the situation when one dictionary has 4294967295L while the next one has (string) '0': Exception: expecting numeric data [{'username': 'root', 'lang': None, 'file_mode': '33261', 'capability_id': '306', 'file_siz e': '22684', 'rdev': '0', 'verifyflags': 4294967295L, 'groupname': 'root', 'package_id': '3', 'flags': '0', 'mtime': '2006-10-03 16:25:37', 'checksum_id': '508' , 'device': '2305', 'inode': '5030967', 'linkto': None}, {'username': 'root', 'lang': None, 'file_mode': '16877', 'capability_id': '338', 'file_size': '4096', ' rdev': '0', 'verifyflags': '0', 'groupname': 'root', 'package_id': '3', 'flags': '0', 'mtime': '2006-10-03 16:25:37', 'checksum_id': None, 'device': '2305', 'in ode': '5031689', 'linkto': None}] [Sun Dec 26 16:27:32 2010] [error]
When I turn off the stringification of [types.IntType, types.FloatType] in adjust_type in sql_base.py, the rhnpush passes on Fedora 13.
By the way, on my Satellite 5.4 (RHEL 5 obviously), the following select returns mostly negative values: SQL> select VERIFYFLAGS, count(*) from rhnpackagefile group by VERIFYFLAGS ; VERIFYFLAGS COUNT(*) ----------- ---------- -40 93987 -116 55068 -100 84 -36 66689 -60 13 -1 17756599 3 186 -256 34 0 995705 -33 10644826 -104 134 -5 600 12 rows selected. SQL> That probably is not correct, is it?
I've filed Satellite bug 665775 to track investigation of the existing negative values in our databases.
Aligning under space13.
Taking.
Fixed in Spacewalk master, 77efefcf49a269db0870a4ec4b49368c77eea6a3. We try not to stringify the numerical values and we shall see how it works on RHEL and Fedora, on Oracle and PostgreSQL. The reason for this change is that the drivers (cx_Oracle, psycopg2) should handle the types just fine, or convert them.
Tagged and built as spacewalk-backend-1.3.35-1.
Moving ON_QA ...
This bug has been fixed in Spacewalk 1.3.