Project

Profile

Help

Issue #5991

closed

Sync fails with TypeError: unsupported operand type(s) for -=: 'Retry' and 'int'

Added by jsherril@redhat.com over 4 years ago. Updated about 4 years ago.

Status:
CLOSED - NOTABUG
Priority:
Normal
Assignee:
-
Category:
-
Sprint/Milestone:
-
Start date:
Due date:
Estimated time:
Severity:
2. Medium
Version:
Platform Release:
OS:
Triaged:
No
Groomed:
No
Sprint Candidate:
No
Tags:
Pulp 2
Sprint:
Quarter:

Description

There have been ~4 reports of this so far across katello and satellite. Its unclear how to reproduce:

https://community.theforeman.org/t/foreman-proxy-content-not-synchronising/16774

Full traceback:

for-proxy pulp: nectar.downloaders.threaded:INFO: Download succeeded: https://foreman.local.com/pulp/repos/test/Testing_Centos7/CentOS7_Content_View/custom/CentOS_7_x86_64/foreman-plugins-124/repodata/7a7b0438a55a08de21727c1a4dfbfe479b9e6eeb17d7b6f5732d61e027c7b021-filelists.xml.gz.
Jan  2 00:49:49 for-proxy pulp: nectar.downloaders.threaded:ERROR: (11692-97152) unsupported operand type(s) for -=: 'Retry' and 'int'
Jan  2 00:49:49 for-proxy pulp: nectar.downloaders.threaded:ERROR: (11692-97152) Traceback (most recent call last):
Jan  2 00:49:49 for-proxy pulp: nectar.downloaders.threaded:ERROR: (11692-97152)   File "/usr/lib/python2.7/site-packages/nectar/downloaders/threaded.py", line 274, in _fetch
Jan  2 00:49:49 for-proxy pulp: nectar.downloaders.threaded:ERROR: (11692-97152)     **requests_kwargs)
Jan  2 00:49:49 for-proxy pulp: nectar.downloaders.threaded:ERROR: (11692-97152)   File "/usr/lib/python2.7/site-packages/requests/sessions.py", line 498, in get
Jan  2 00:49:49 for-proxy pulp: nectar.downloaders.threaded:ERROR: (11692-97152)     return self.request('GET', url, **kwargs)
Jan  2 00:49:49 for-proxy pulp: nectar.downloaders.threaded:ERROR: (11692-97152)   File "/usr/lib/python2.7/site-packages/requests/sessions.py", line 486, in request
Jan  2 00:49:49 for-proxy pulp: nectar.downloaders.threaded:ERROR: (11692-97152)     resp = self.send(prep, **send_kwargs)
Jan  2 00:49:49 for-proxy pulp: nectar.downloaders.threaded:ERROR: (11692-97152)   File "/usr/lib/python2.7/site-packages/requests/sessions.py", line 598, in send
Jan  2 00:49:49 for-proxy pulp: nectar.downloaders.threaded:ERROR: (11692-97152)     r = adapter.send(request, **kwargs)
Jan  2 00:49:49 for-proxy pulp: nectar.downloaders.threaded:ERROR: (11692-97152)   File "/usr/lib/python2.7/site-packages/requests/adapters.py", line 370, in send
Jan  2 00:49:49 for-proxy pulp: nectar.downloaders.threaded:ERROR: (11692-97152)     timeout=timeout
Jan  2 00:49:49 for-proxy pulp: nectar.downloaders.threaded:ERROR: (11692-97152)   File "/usr/lib/python2.7/site-packages/urllib3/connectionpool.py", line 597, in urlopen
Jan  2 00:49:49 for-proxy pulp: nectar.downloaders.threaded:ERROR: (11692-97152)     _stacktrace=sys.exc_info()[2])
Jan  2 00:49:49 for-proxy pulp: nectar.downloaders.threaded:ERROR: (11692-97152)   File "/usr/lib/python2.7/site-packages/urllib3/util/retry.py", line 236, in increment
Jan  2 00:49:49 for-proxy pulp: nectar.downloaders.threaded:ERROR: (11692-97152)     total -= 1
Jan  2 00:49:49 for-proxy pulp: nectar.downloaders.threaded:ERROR: (11692-97152) TypeError: unsupported operand type(s) for -=: 'Retry' and 'int'
Jan  2 00:49:49 for-proxy pulp: nectar.downloaders.threaded:ERROR: (11673-01440) unsupported operand type(s) for -=: 'Retry' and 'int'
Jan  2 00:49:49 for-proxy pulp: nectar.downloaders.threaded:ERROR: (11692-72288) unsupported operand type(s) for -=: 'Retry' and 'int'
Jan  2 00:49:49 for-proxy pulp: nectar.downloaders.threaded:ERROR: (11673-01440) Traceback (most recent call last):
Jan  2 00:49:49 for-proxy pulp: nectar.downloaders.threaded:ERROR: (11692-72288) Traceback (most recent call last):
Jan  2 00:49:49 for-proxy pulp: nectar.downloaders.threaded:ERROR: (11673-01440)   File "/usr/lib/python2.7/site-packages/nectar/downloaders/threaded.py", line 274, in _fetch
Jan  2 00:49:49 for-proxy pulp: nectar.downloaders.threaded:ERROR: (11692-72288)   File "/usr/lib/python2.7/site-packages/nectar/downloaders/threaded.py", line 274, in _fetch
Jan  2 00:49:49 for-proxy pulp: nectar.downloaders.threaded:ERROR: (11673-01440)     **requests_kwargs)
Jan  2 00:49:49 for-proxy pulp: nectar.downloaders.threaded:ERROR: (11692-72288)     **requests_kwargs)
Jan  2 00:49:49 for-proxy pulp: nectar.downloaders.threaded:ERROR: (11673-01440)   File "/usr/lib/python2.7/site-packages/requests/sessions.py", line 498, in get
Jan  2 00:49:49 for-proxy pulp: nectar.downloaders.threaded:ERROR: (11692-72288)   File "/usr/lib/python2.7/site-packages/requests/sessions.py", line 498, in get
Jan  2 00:49:49 for-proxy pulp: nectar.downloaders.threaded:ERROR: (11673-01440)     return self.request('GET', url, **kwargs)
Jan  2 00:49:49 for-proxy pulp: nectar.downloaders.threaded:ERROR: (11692-72288)     return self.request('GET', url, **kwargs)
Jan  2 00:49:49 for-proxy pulp: nectar.downloaders.threaded:ERROR: (11673-01440)   File "/usr/lib/python2.7/site-packages/requests/sessions.py", line 486, in request
Jan  2 00:49:49 for-proxy pulp: nectar.downloaders.threaded:ERROR: (11692-72288)   File "/usr/lib/python2.7/site-packages/requests/sessions.py", line 486, in request
Jan  2 00:49:49 for-proxy pulp: nectar.downloaders.threaded:ERROR: (11673-01440)     resp = self.send(prep, **send_kwargs)
Jan  2 00:49:49 for-proxy pulp: nectar.downloaders.threaded:ERROR: (11692-72288)     resp = self.send(prep, **send_kwargs)
Jan  2 00:49:49 for-proxy pulp: nectar.downloaders.threaded:ERROR: (11673-01440)   File "/usr/lib/python2.7/site-packages/requests/sessions.py", line 598, in send
Jan  2 00:49:49 for-proxy pulp: nectar.downloaders.threaded:ERROR: (11692-72288)   File "/usr/lib/python2.7/site-packages/requests/sessions.py", line 598, in send
Jan  2 00:49:49 for-proxy pulp: nectar.downloaders.threaded:ERROR: (11673-01440)     r = adapter.send(request, **kwargs)
Jan  2 00:49:49 for-proxy pulp: nectar.downloaders.threaded:ERROR: (11692-72288)     r = adapter.send(request, **kwargs)
Jan  2 00:49:49 for-proxy pulp: nectar.downloaders.threaded:ERROR: (11673-01440)   File "/usr/lib/python2.7/site-packages/requests/adapters.py", line 370, in send
Jan  2 00:49:49 for-proxy pulp: nectar.downloaders.threaded:ERROR: (11692-72288)   File "/usr/lib/python2.7/site-packages/requests/adapters.py", line 370, in send
Jan  2 00:49:49 for-proxy pulp: nectar.downloaders.threaded:ERROR: (11673-01440)     timeout=timeout
Jan  2 00:49:49 for-proxy pulp: nectar.downloaders.threaded:ERROR: (11692-72288)     timeout=timeout
Jan  2 00:49:49 for-proxy pulp: nectar.downloaders.threaded:ERROR: (11673-01440)   File "/usr/lib/python2.7/site-packages/urllib3/connectionpool.py", line 597, in urlopen
Jan  2 00:49:49 for-proxy pulp: nectar.downloaders.threaded:ERROR: (11692-72288)   File "/usr/lib/python2.7/site-packages/urllib3/connectionpool.py", line 597, in urlopen
Jan  2 00:49:49 for-proxy pulp: nectar.downloaders.threaded:ERROR: (11673-01440)     _stacktrace=sys.exc_info()[2])
Jan  2 00:49:49 for-proxy pulp: nectar.downloaders.threaded:ERROR: (11692-72288)     _stacktrace=sys.exc_info()[2])
Jan  2 00:49:49 for-proxy pulp: nectar.downloaders.threaded:ERROR: (11692-72288)   File "/usr/lib/python2.7/site-packages/urllib3/util/retry.py", line 236, in increment
Jan  2 00:49:49 for-proxy pulp: nectar.downloaders.threaded:ERROR: (11673-01440)   File "/usr/lib/python2.7/site-packages/urllib3/util/retry.py", line 236, in increment
Jan  2 00:49:49 for-proxy pulp: nectar.downloaders.threaded:ERROR: (11692-72288)     total -= 1
Jan  2 00:49:49 for-proxy pulp: nectar.downloaders.threaded:ERROR: (11692-72288) TypeError: unsupported operand type(s) for -=: 'Retry' and 'int'.
Katello::Errors::PulpError: RPM1004: Error retrieving metadata: Error 'unsupported operand type(s) for -=: 'Retry' and 'int'' 
Actions #1

Updated by daviddavis about 4 years ago

@jsherrill found this issue in RHEL that seems related. It seems like the issue was caused by importing Retry from requests.packages.urllib3.util instead of urllib3.util caused the same error.

https://bugzilla.redhat.com/show_bug.cgi?id=1785666

Actions #2

Updated by daviddavis about 4 years ago

  • Description updated (diff)

I was able to reproduce finally with python-requests 2.6.0-8.el7.7. The platform team provided a fixed version (python-requests-2.6.0-11.el7.noarch) that I tested and it fixes the issue.

We can close this now or wait until python-requests-2.6.0-11.el7.noarch is released. I'm fine with either.

Actions #3

Updated by fao89 about 4 years ago

  • Status changed from NEW to CLOSED - NOTABUG

Also available in: Atom PDF