Bug 833686 - rhnpush fails to upload a package if only the header is uploaded beforehand.
rhnpush fails to upload a package if only the header is uploaded beforehand.
Status: CLOSED CURRENTRELEASE
Product: Red Hat Satellite 5
Classification: Red Hat
Component: Client (Show other bugs)
550
Unspecified Unspecified
low Severity low
: ---
: ---
Assigned To: Michael Mráka
Lukas Pramuk
:
Depends On:
Blocks: sat550-lowbug
  Show dependency treegraph
 
Reported: 2012-06-20 03:05 EDT by Dimitar Yordanov
Modified: 2012-09-21 05:34 EDT (History)
2 users (show)

See Also:
Fixed In Version: spacewalk-backend-1.7.38-20
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-09-21 05:34:22 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Dimitar Yordanov 2012-06-20 03:05:11 EDT
Description of problem:
rhnpush fails to upload a package if only the header is uploaded beforehand.

Version-Release number of selected component (if applicable):
rhnpush-5.5.42-3.el6sat.noarch

How reproducible:
100%

Steps to Reproduce:

1. Create Custom Software Channnel
2.Upload only the header of a RPM package to Custom Software channel.
 rhnpush --verbose --header -c test_cust_chann  -u admin -p nimda --server=http://${SAME_SERVER}/APP --nosig 389-ds-base-libs-1.2.8.2-1.el6.x86_64.rpm

3. Try to Upload the whole package

rhnpush --verbose -c test_cust_chann  -u admin -p nimda --server=http://${SAME_SERVER}/APP --nosig 389-ds-base-libs-1.2.8.2-1.el6.x86_64.rpm

 
Actual results:
Internal Server Error


Additional info:
###  /var/log/httpd/error_log   ##########################################
[Tue Jun 19 13:22:08 2012] [error] Exception reported from ibm-x3755-02.ovirt.rhts.eng.bos.redhat.com
[Tue Jun 19 13:22:08 2012] [error] Time: Tue Jun 19 13:22:08 2012
[Tue Jun 19 13:22:08 2012] [error] Exception type <type 'exceptions.AttributeError'>
[Tue Jun 19 13:22:08 2012] [error] Exception while handling function packages.getPackageChecksumBySession
[Tue Jun 19 13:22:08 2012] [error] Request object information:
[Tue Jun 19 13:22:08 2012] [error] URI: /APP
[Tue Jun 19 13:22:08 2012] [error] Remote Host: ibm-x3755-02.ovirt.rhts.eng.bos.redhat.com
[Tue Jun 19 13:22:08 2012] [error] Server Name: ibm-x3755-02.ovirt.rhts.eng.bos.redhat.com:80
[Tue Jun 19 13:22:08 2012] [error] Headers passed in:
[Tue Jun 19 13:22:08 2012] [error] \tAccept-Encoding: identity
[Tue Jun 19 13:22:08 2012] [error] \tCONTENT_LENGTH: 418
[Tue Jun 19 13:22:08 2012] [error] \tCONTENT_TYPE: application/binary
[Tue Jun 19 13:22:08 2012] [error] \tContent-Encoding: x-gzip
[Tue Jun 19 13:22:08 2012] [error] \tContent-Transfer-Encoding: binary
[Tue Jun 19 13:22:08 2012] [error] \tDOCUMENT_ROOT: /var/www/html
[Tue Jun 19 13:22:08 2012] [error] \tGATEWAY_INTERFACE: CGI/1.1
[Tue Jun 19 13:22:08 2012] [error] \tHTTP_ACCEPT_ENCODING: identity
[Tue Jun 19 13:22:08 2012] [error] \tHTTP_CONTENT_ENCODING: x-gzip
[Tue Jun 19 13:22:08 2012] [error] \tHTTP_CONTENT_TRANSFER_ENCODING: binary
[Tue Jun 19 13:22:08 2012] [error] \tHTTP_HOST: ibm-x3755-02.ovirt.rhts.eng.bos.redhat.com
[Tue Jun 19 13:22:08 2012] [error] \tHTTP_USER_AGENT: rhn.rpclib.py/$Revision$
[Tue Jun 19 13:22:08 2012] [error] \tHTTP_X_CLIENT_VERSION: 1
[Tue Jun 19 13:22:08 2012] [error] \tHTTP_X_INFO: RPC Processor (C) Red Hat, Inc (version $Revision$)
[Tue Jun 19 13:22:08 2012] [error] \tHTTP_X_RHN_TRANSPORT_CAPABILITY: follow-redirects=3
[Tue Jun 19 13:22:08 2012] [error] \tHTTP_X_TRANSPORT_INFO: Extended Capabilities Transport (C) Red Hat, Inc (version $Revision$)
[Tue Jun 19 13:22:08 2012] [error] \tHost: ibm-x3755-02.ovirt.rhts.eng.bos.redhat.com
[Tue Jun 19 13:22:08 2012] [error] \tPATH_INFO: 
[Tue Jun 19 13:22:08 2012] [error] \tQUERY_STRING: 
[Tue Jun 19 13:22:08 2012] [error] \tREMOTE_ADDR: 10.16.68.23
[Tue Jun 19 13:22:08 2012] [error] \tREMOTE_PORT: 36284
[Tue Jun 19 13:22:08 2012] [error] \tREQUEST_METHOD: POST
[Tue Jun 19 13:22:08 2012] [error] \tREQUEST_URI: /APP
[Tue Jun 19 13:22:08 2012] [error] \tSCRIPT_FILENAME: /usr/share/rhn/wsgi/app.py
[Tue Jun 19 13:22:08 2012] [error] \tSCRIPT_NAME: /APP
[Tue Jun 19 13:22:08 2012] [error] \tSCRIPT_URI: http://ibm-x3755-02.ovirt.rhts.eng.bos.redhat.com/APP
[Tue Jun 19 13:22:08 2012] [error] \tSCRIPT_URL: /APP
[Tue Jun 19 13:22:08 2012] [error] \tSERVER_ADDR: 10.16.68.23
[Tue Jun 19 13:22:08 2012] [error] \tSERVER_ADMIN: root@localhost
[Tue Jun 19 13:22:08 2012] [error] \tSERVER_NAME: ibm-x3755-02.ovirt.rhts.eng.bos.redhat.com
[Tue Jun 19 13:22:08 2012] [error] \tSERVER_PORT: 80
[Tue Jun 19 13:22:08 2012] [error] \tSERVER_PROTOCOL: HTTP/1.1
[Tue Jun 19 13:22:08 2012] [error] \tSERVER_SIGNATURE: <address>Apache Server at ibm-x3755-02.ovirt.rhts.eng.bos.redhat.com Port 80</address>
[Tue Jun 19 13:22:08 2012] [error] 
[Tue Jun 19 13:22:08 2012] [error] \tSERVER_SOFTWARE: Apache
[Tue Jun 19 13:22:08 2012] [error] \tUser-Agent: rhn.rpclib.py/$Revision$
[Tue Jun 19 13:22:08 2012] [error] \tX-Client-Version: 1
[Tue Jun 19 13:22:08 2012] [error] \tX-Info: RPC Processor (C) Red Hat, Inc (version $Revision$)
[Tue Jun 19 13:22:08 2012] [error] \tX-RHN-Transport-Capability: follow-redirects=3
[Tue Jun 19 13:22:08 2012] [error] \tX-Transport-Info: Extended Capabilities Transport (C) Red Hat, Inc (version $Revision$)
[Tue Jun 19 13:22:08 2012] [error] \tmod_wsgi.application_group: ibm-x3755-02.ovirt.rhts.eng.bos.redhat.com|/app
[Tue Jun 19 13:22:08 2012] [error] \tmod_wsgi.callable_object: application
[Tue Jun 19 13:22:08 2012] [error] \tmod_wsgi.handler_script: 
[Tue Jun 19 13:22:08 2012] [error] \tmod_wsgi.input_chunked: 0
[Tue Jun 19 13:22:08 2012] [error] \tmod_wsgi.listener_host: 
[Tue Jun 19 13:22:08 2012] [error] \tmod_wsgi.listener_port: 80
[Tue Jun 19 13:22:08 2012] [error] \tmod_wsgi.process_group: 
[Tue Jun 19 13:22:08 2012] [error] \tmod_wsgi.request_handler: wsgi-script
[Tue Jun 19 13:22:08 2012] [error] \tmod_wsgi.script_reloading: 1
[Tue Jun 19 13:22:08 2012] [error] \tmod_wsgi.version: (3, 2)
[Tue Jun 19 13:22:08 2012] [error] \twsgi.errors: <mod_wsgi.Log object at 0x7f152f6c59b0>
[Tue Jun 19 13:22:08 2012] [error] \twsgi.file_wrapper: <built-in method file_wrapper of mod_wsgi.Adapter object at 0x7f152f655738>
[Tue Jun 19 13:22:08 2012] [error] \twsgi.input: <mod_wsgi.Input object at 0x7f152fbfce30>
[Tue Jun 19 13:22:08 2012] [error] \twsgi.multiprocess: True
[Tue Jun 19 13:22:08 2012] [error] \twsgi.multithread: False
[Tue Jun 19 13:22:08 2012] [error] \twsgi.run_once: False
[Tue Jun 19 13:22:08 2012] [error] \twsgi.url_scheme: http
[Tue Jun 19 13:22:08 2012] [error] \twsgi.version: (1, 1)
[Tue Jun 19 13:22:08 2012] [error] 
[Tue Jun 19 13:22:08 2012] [error] Exception Handler Information
[Tue Jun 19 13:22:08 2012] [error] Traceback (most recent call last):
[Tue Jun 19 13:22:08 2012] [error]   File "/usr/lib/python2.6/site-packages/spacewalk/server/apacheRequest.py", line 122, in call_function
[Tue Jun 19 13:22:08 2012] [error]     response = apply(func, params)
[Tue Jun 19 13:22:08 2012] [error]   File "/usr/share/rhn/server/handlers/app/packages.py", line 408, in getPackageChecksumBySession
[Tue Jun 19 13:22:08 2012] [error]     return self.getAnyChecksum(info, session = session_string)
[Tue Jun 19 13:22:08 2012] [error]   File "/usr/share/rhn/server/handlers/app/packages.py", line 392, in getAnyChecksum
[Tue Jun 19 13:22:08 2012] [error]     ret = self._getPackageChecksum(org_id, pkg_infos)
[Tue Jun 19 13:22:08 2012] [error]   File "/usr/share/rhn/server/handlers/app/packages.py", line 480, in _getPackageChecksum
[Tue Jun 19 13:22:08 2012] [error]     row_list[pkg] = self._get_package_checksum(h, query_args)
[Tue Jun 19 13:22:08 2012] [error]   File "/usr/share/rhn/server/handlers/app/packages.py", line 490, in _get_package_checksum
[Tue Jun 19 13:22:08 2012] [error]     filePath = os.path.join(CFG.MOUNT_POINT, row['path'])
[Tue Jun 19 13:22:08 2012] [error]   File "/usr/lib64/python2.6/posixpath.py", line 65, in join
[Tue Jun 19 13:22:08 2012] [error]     if b.startswith('/'):
[Tue Jun 19 13:22:08 2012] [error] AttributeError: 'NoneType' object has no attribute 'startswith'
[Tue Jun 19 13:22:08 2012] [error]
Comment 2 Michael Mráka 2012-06-26 07:55:07 EDT
Fixed in spacewalk nightly by
commit be337700d59bd4fc4165d552f7bb43c6a0a9cf3b
    833686 - don't open file if path is None
Comment 3 Michael Mráka 2012-06-26 08:05:41 EDT
Backported to SATELLITE-5.5 as
commit c411ff9d01a23718e7713f62b5aae945d1bcef1d
    833686 - don't open file if path is None
Comment 6 Clifford Perry 2012-09-21 05:34:22 EDT
This issue is resolved with the release of RHN Satellite 5.5. 

As of September 20th 2012, RHN Satellite 5.5 has been generally available. 

Release Notes and other 5.5 documentation can be found here:

 https://access.redhat.com/knowledge/docs/Red_Hat_Network_Satellite/

The associated Errata for the 5.5 release are:

5.5 Satellite GA Errata
 - http://rhn.redhat.com/errata/RHEA-2012-1296.html

5.5 Upgrade Errata
 - http://rhn.redhat.com/errata/RHEA-2012-1298.html

5.5 RHN Proxy GA Errata
 - http://rhn.redhat.com/errata/RHEA-2012-1297.html

5.5 RHN Tools GA Errata
 - http://rhn.redhat.com/errata/RHEA-2012-1299.html

Regards,
Clifford
- Engineering Manager, Satellite

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