Bug 1464157 - Unwanted behaviour of rhnpush when using HTTPS
Summary: Unwanted behaviour of rhnpush when using HTTPS
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Spacewalk
Classification: Community
Component: Server
Version: 2.6
Hardware: Unspecified
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Jan Dobes
QA Contact: Red Hat Satellite QA List
URL:
Whiteboard:
Depends On:
Blocks: spacewalk-review space27
TreeView+ depends on / blocked
 
Reported: 2017-06-22 14:29 UTC by Ondrej Gajdusek
Modified: 2017-09-27 19:36 UTC (History)
2 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2017-09-27 19:36:21 UTC
Embargoed:


Attachments (Terms of Use)

Description Ondrej Gajdusek 2017-06-22 14:29:08 UTC
Description of problem:
When running rhnpush -c yourchannel -u *** -p *** --server=https://FQDN/APP -vvv some-package.rpm
it shows you:
Uploading package rhnsd-5.0.26-1.el7.x86_64.rpm
Using POST request
flush
Waiting 4 seconds and trying again...
Uploading package rhnsd-5.0.26-1.el7.x86_64.rpm
# and repeat this output twice more (there are three tries https://github.com/spacewalkproject/spacewalk/blob/master/client/tools/rhnpush/rhnpush_main.py#L362)

The expected behaviour is that rhnpush's last outputted line is "Using POST request", but in this situation, this "flush" in output means that there was raised an AttributeError and the missing attribute is 'flush'. See  It has something to do with method "flush" from HTTPResponse class of Python httplib. I am not able to address this problem more concretely.
Good thing is that the package is present on the server after you run rhnpush.

Reproducible only using https, not http. Reproducible with any package.
This bug is not reproducible on RHEL. (note RHEL pyOpenSSL package requires quite a bit different packages)

Version-Release number of selected component (if applicable):
rpm -q pyOpenSSL rhnpush rhnlib system-python-libs m2crypto
pyOpenSSL-16.2.0-1.fc25.noarch
rhnpush-5.5.105-1.fc25.noarch
rhnlib-2.7.2-1.fc25.noarch
system-python-libs-3.5.3-6.fc25.x86_64
m2crypto-0.23.0-2.fc24.x86_64

How reproducible:
allways


Steps to Reproduce:
1.run rhnpush with parameter -vvv and upload any package
2.see the output and traceback below


Actual results:
[root@machine ~]# rhnpush -c fedora24-x86_64 -u *** -p *** --server=https://FQDN/APP -vvvv --nosig rhnsd-5.0.26-1.el7.x86_64.rpm
Connecting to https://FQDN/APP
url is https://FQDN/PACKAGE-PUSH
Result codes: 200 OK
Computing checksum and package info. This may take some time ...
Package rhnsd-5.0.26-1.el7.x86_64.rpm Not Found on RHN Server -- Uploading
Uploading package rhnsd-5.0.26-1.el7.x86_64.rpm
Using POST request
flush
Waiting 4 seconds and trying again...
Uploading package rhnsd-5.0.26-1.el7.x86_64.rpm
Using POST request
flush
Waiting 3 seconds and trying again...
Uploading package rhnsd-5.0.26-1.el7.x86_64.rpm
Using POST request
flush
Waiting 2 seconds and trying again...
Giving up after 3 attempts
Exception ignored in: <function WeakValueDictionary.__init__.<locals>.remove at 0x7f84f1db8d90>
Traceback (most recent call last):
  File "/usr/lib64/python3.5/weakref.py", line 117, in remove
TypeError: 'NoneType' object is not callable
[root@machine ~]# 


Expected results:
[root@machine ~]# rhnpush -c fedora24-x86_64 -u *** -p *** --server=https://FQDN/APP -vvvv --nosig spacewalk-backend-libs-2.7.114-1.el7.noarch.rpm 
Connecting to https://FQDN/APP
url is https://FQDN/PACKAGE-PUSH
Result codes: 200 OK
Computing checksum and package info. This may take some time ...
Package spacewalk-backend-libs-2.7.114-1.el7.noarch.rpm Not Found on RHN Server -- Uploading
Uploading package spacewalk-backend-libs-2.7.114-1.el7.noarch.rpm
Using POST request
[root@machine ~]# 


Additional info:
Important breakpoints for debugging should be on this lines:
client/rhel/rhnlib/rhn/SSL.py: 151, 153 # see what contains variable named 'name' here: https://github.com/spacewalkproject/spacewalk/blob/master/client/rhel/rhnlib/rhn/SSL.py#L150
client/tools/rhnpush/connection.py: 243
client/tools/rhnpush/rhnpush_main.py: 182, 392, 397, 420, 444, 577, 599, 637

This bug might be associated with BZ#1382311.

Comment 2 Jan Dobes 2017-07-31 14:23:14 UTC
fixed in spacewalk.git(master):

ef8b0f3eed819958c3d84a041c08438255e11b7e

Comment 3 Eric Herget 2017-09-27 19:36:21 UTC
Spacewalk 2.7 has been released.

https://github.com/spacewalkproject/spacewalk/wiki/ReleaseNotes27


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