Bug 735059 - rhnpush fails on spacewalk running PostgreSQL
Summary: rhnpush fails on spacewalk running PostgreSQL
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Spacewalk
Classification: Community
Component: Server
Version: 1.6
Hardware: Unspecified
OS: Unspecified
low
low
Target Milestone: ---
Assignee: Michael Mráka
QA Contact: Red Hat Satellite QA List
URL:
Whiteboard:
Depends On:
Blocks: space16
TreeView+ depends on / blocked
 
Reported: 2011-09-01 10:24 UTC by Martin Minar
Modified: 2016-07-04 00:56 UTC (History)
6 users (show)

Fixed In Version: spacewalk-backend-1.6.15-1
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-12-22 16:50:21 UTC


Attachments (Terms of Use)

Description Martin Minar 2011-09-01 10:24:14 UTC
Description of problem:
When running PostgreSQL database you might encounter into problems when trying to write BLOB into database. This particular when using rhnpush.

Version-Release number of selected component (if applicable):
spacewalk-backend-1.6.13-1

How reproducible:
Always

Steps to Reproduce:
1. Prepare packages you want to push
2. rhnpush -u user -p pass --server=https://<FQDN>/APP -c test-x86_64-0 -d <packages_directory>
  
Actual results:
Traceback (most recent call last):
  File "/usr/lib/python2.4/site-packages/spacewalk/server/apacheUploadServer.py", line 100, in _wrapper
    ret = function(req)
  File "/usr/share/rhn/upload_server/handlers/package_push/package_push.py", line 136, in handler
    relative_path=self.rel_package_path, org_id=self.org_id)
  File "/usr/lib/python2.4/site-packages/spacewalk/server/rhnPackageUpload.py", line 166, in push_package
    importer.run()
  File "/usr/lib/python2.4/site-packages/spacewalk/server/importlib/importLib.py", line 625, in run
    self.submit()
  File "/usr/lib/python2.4/site-packages/spacewalk/server/importlib/packageImport.py", line 309, in submit
    transactional=self.transactional)
  File "/usr/lib/python2.4/site-packages/spacewalk/server/importlib/backend.py", line 667, in processPackages
    transactional=transactional)
  File "/usr/lib/python2.4/site-packages/spacewalk/server/importlib/backend.py", line 1515, in __processObjectCollection__
    return self.__doDML(dml)
  File "/usr/lib/python2.4/site-packages/spacewalk/server/importlib/backend.py", line 1623, in __doDML
    self.__doInsert(dml.insert, dml.tables)
  File "/usr/lib/python2.4/site-packages/spacewalk/server/importlib/backend.py", line 1630, in __doInsert
    self.__doInsertTable(tname, dict)
  File "/usr/lib/python2.4/site-packages/spacewalk/server/importlib/backend.py", line 1644, in __doInsertTable
    insertObj.query(hash)
  File "/usr/lib/python2.4/site-packages/spacewalk/server/importlib/backendLib.py", line 441, in query
    self._update_blobs(blobValuesHash)
  File "/usr/lib/python2.4/site-packages/spacewalk/server/importlib/backendLib.py", line 353, in _update_blobs
    if blob.size() > len_v:
AttributeError: 'buffer' object has no attribute 'size'

Expected results:
Push is done.

Additional info:
This kind of bug is described in Postgre porting guide: https://fedorahosted.org/spacewalk/wiki/PostgreSQLPortingGuide#blob_in_python

Comment 3 Michael Mráka 2011-09-02 08:53:47 UTC
Fixed in spacewalk master by
commit 16a5943fda761f2c6b27e02e9ca8ea515bc0426e
    735059 - modified TableInsert to use our direct blob insert

Comment 4 Milan Zázrivec 2011-12-22 16:50:21 UTC
Spacewalk 1.6 has been released.


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