Bug 1989631

Summary: Ruby warning: URI.escape is obsolete after the host is provisioned
Product: Red Hat Satellite Reporter: Ondrej Gajdusek <ogajduse>
Component: ProvisioningAssignee: aabramov
Status: CLOSED ERRATA QA Contact: sganar
Severity: medium Docs Contact:
Priority: unspecified    
Version: 6.10.0CC: aabramov, avroy, inecas, rlavi, saydas, sshtein, tbrisker, zhunting
Target Milestone: 6.12.0Keywords: Triaged
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-11-16 13:32:43 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 Ondrej Gajdusek 2021-08-03 15:57:14 UTC
Description of problem:
Aug  3 11:36:29 dhcp-2-205 foreman: /usr/share/foreman/lib/proxy_api/resource.rb:72: warning: URI.escape is obsolete
Aug  3 11:36:30 dhcp-2-205 smart-proxy: 10.1.2.205 - - [03/Aug/2021:11:36:30 EDT] "GET /tftp/serverName HTTP/1.1" 200 26
Aug  3 11:36:30 dhcp-2-205 smart-proxy: - -> /tftp/serverName
Aug  3 11:36:30 dhcp-2-205 foreman: /usr/share/foreman/lib/proxy_api/resource.rb:72: warning: URI.escape is obsolete
Aug  3 11:36:30 dhcp-2-205 smart-proxy: 10.1.2.205 - - [03/Aug/2021:11:36:30 EDT] "GET /tftp/serverName HTTP/1.1" 200 26
Aug  3 11:36:30 dhcp-2-205 smart-proxy: - -> /tftp/serverName
Aug  3 11:36:30 dhcp-2-205 foreman: /usr/share/foreman/lib/proxy_api/resource.rb:72: warning: URI.escape is obsolete
Aug  3 11:36:30 dhcp-2-205 smart-proxy: 10.1.2.205 - - [03/Aug/2021:11:36:30 EDT] "GET /dhcp/10.1.5.72/mac/56:6f:0d:72:07:b3 HTTP/1.1" 200 272
Aug  3 11:36:30 dhcp-2-205 smart-proxy: - -> /dhcp/10.1.5.72/mac/56:6f:0d:72:07:b3
Aug  3 11:36:30 dhcp-2-205 foreman: /usr/share/foreman/lib/proxy_api/resource.rb:72: warning: URI.escape is obsolete
Aug  3 11:36:30 dhcp-2-205 smart-proxy: 10.1.2.205 - - [03/Aug/2021:11:36:30 EDT] "GET /dhcp/10.1.5.72/ip/10.1.5.76 HTTP/1.1" 200 274
Aug  3 11:36:30 dhcp-2-205 smart-proxy: - -> /dhcp/10.1.5.72/ip/10.1.5.76

Version-Release number of selected component (if applicable):
tfm-rubygem-rails-6.0.3.7-1.el7sat.noarch
rh-ruby27-ruby-libs-2.7.3-129.el7.x86_64
rh-ruby27-runtime-2.7-2.el7.x86_64
rh-ruby27-ruby-2.7.3-129.el7.x86_64
foreman-2.5.2-1.el7sat.noarch
satellite-6.10.0-0.5.beta.el7sat.noarch

How reproducible:
Every time

Steps to Reproduce:
1. Provision host using unattended install.
2. See /var/log/messages at the moment when the host reports back to Satellite after it is provisioned

Actual results:
Satellite is using obsolete methods, warnings are generated.

Expected results:
Satellite is not using obsolete methods, no warnings about obsolete methods are present in the logs.

Additional info:
I expect the fix to be not only in the Foreman itself but also in its plugins that use this obsolete method.
BZ1982343 is dealing with the same issue in Katello.

Comment 2 Tomer Brisker 2021-10-28 07:43:35 UTC
Created redmine issue https://projects.theforeman.org/issues/33801 from this bug

Comment 3 Bryan Kearney 2021-11-04 13:51:02 UTC
Upstream bug assigned to aabramov

Comment 4 Bryan Kearney 2021-12-03 12:05:02 UTC
Moving this bug to POST for triage into Satellite since the upstream issue https://projects.theforeman.org/issues/33801 has been resolved.

Comment 7 sganar 2022-09-15 09:18:28 UTC
Verified.

Tested on Satellite 6.12.0 Snap 11.0

Steps followed: 
1. Provision host using unattended install.
2. See /var/log/messages at the moment when the host reports back to Satellite after it is provisioned

Observation: 
No warnings about obsolete methods are present in the logs.

Comment 11 errata-xmlrpc 2022-11-16 13:32:43 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 (Important: Satellite 6.12 Release), 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-2022:8506

Comment 12 Red Hat Bugzilla 2023-09-18 00:29:36 UTC
The needinfo request[s] on this closed bug have been removed as they have been unresolved for 120 days