Bug 1763283

Summary: Error while refreshing manifest- 'no implicit conversion of Integer into String'
Product: Red Hat Satellite Reporter: rakesh kumar <rakumar>
Component: Subscription ManagementAssignee: Justin Sherrill <jsherril>
Status: CLOSED ERRATA QA Contact: jcallaha
Severity: medium Docs Contact:
Priority: unspecified    
Version: 6.5.0CC: bkearney, bshahu, chrobert, pcreech
Target Milestone: 6.7.0Keywords: Triaged
Target Release: Unused   
Hardware: x86_64   
OS: Linux   
URL: https://projects.theforeman.org/issues/27121
Whiteboard:
Fixed In Version: katello-3.13.1-1.el7.noarch Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-04-14 13:26:02 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description rakesh kumar 2019-10-18 16:41:12 UTC
Description of problem:
Manifest refresh fails with below error if the proxy is set on the Satellite which has user name contain all integer like '654321':


2019-10-18T12:22:21 [I|app|801e7437] Current user set to admin (admin)
2019-10-18T12:22:24 [I|app|ca2c6411] Current user set to b0d4b5a4-6dc6-4281-89ca-ddedc9fe7e0c (regular)
2019-10-18T12:22:24 [E|app|801e7437] TypeError: no implicit conversion of Integer into String
/opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.12.0.7/app/lib/katello/util/http_proxy.rb:15:in `escape'
/opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.12.0.7/app/lib/katello/util/http_proxy.rb:15:in `proxy_uri'
/opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.12.0.7/app/lib/katello/resources/candlepin.rb:89:in `resource'
/opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.12.0.7/app/lib/katello/resources/candlepin.rb:132:in `upstream_owner_id'
/opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.12.0.7/app/lib/katello/resources/candlepin/upstream_pool.rb:15:in `path'


Version-Release number of selected component (if applicable):
Red Hat Satellite 6.5 
Red Hat Satellite 6.6

How reproducible:

Always

Steps to Reproduce:
1. Setup proxy on Satellite with authentication, the proxy username should contain all integers, like:

# satellite-installer --scenario satellite --katello-proxy-url http://xx.xx.xx.xx --katello-proxy-port 3128 --katello-proxy-username 654321 --katello-proxy-password redhat


2. Refresh the manifest


Actual results:
Manifest refresh failed with below error:

no implicit conversion of Integer into String'


Expected results:

Manifest refresh should work without any error.


Additional info:

Comment 4 Chris Roberts 2019-11-06 16:49:54 UTC
Tested on Katello 3.13 which will be Satellite 6.7 and confirmed it works correctly now. Linked Redmine and commit that corrected this.

Here is the output of my testing:

Proxy logs showing working and satellite rhsm connection going through:

[root@proxy ~]# curl -x http://172.17.150.247:3128 --proxy-user 654321:123456 -I http://google.com
HTTP/1.1 301 Moved Permanently
Location: http://www.google.com/
Content-Type: text/html; charset=UTF-8
Date: Wed, 06 Nov 2019 14:51:41 GMT
Expires: Fri, 06 Dec 2019 14:51:41 GMT
Cache-Control: public, max-age=2592000
Server: gws
Content-Length: 219
X-XSS-Protection: 0
X-Frame-Options: SAMEORIGIN
X-Cache: MISS from proxy.croberts.lan
X-Cache-Lookup: MISS from proxy.croberts.lan:3128
Via: 1.1 proxy.croberts.lan (squid/3.5.20)
Connection: keep-alive

1573058052.785    660 172.17.150.247 TCP_TUNNEL/200 2872 CONNECT subscription.rhsm.stage.redhat.com:443 - HIER_DIRECT/10.24.204.73 -
1573058057.909    527 172.17.150.247 TCP_TUNNEL/200 2872 CONNECT subscription.rhsm.stage.redhat.com:443 - HIER_DIRECT/10.24.204.73 -

Screenshot of manifest refresh going through:

https://s.nimbusweb.me/share/3505070/clt2nwfm30nfg6uv9sfl

Comment 5 Bryan Kearney 2019-11-08 20:59:56 UTC
Connecting redmine issue https://projects.theforeman.org/issues/27121 from this bug

Comment 6 jcallaha 2019-12-11 19:57:09 UTC
Verified in Satellite 6.7 Snap 4

The fix for this was to properly align the proxy config through each of the affected operations.

To test this, I enabled katello to route through a proxy for all its actions.

During each action, I monitored the Satellite's network traffic and saw that the proxy was correctly being used.

Comment 9 errata-xmlrpc 2020-04-14 13:26:02 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2020:1454