Bug 1861256

Summary: [RFE] Check for global http proxy in environemnt
Product: Red Hat Satellite Reporter: Kavita <kgaikwad>
Component: Satellite MaintainAssignee: Anurag Patel <apatel>
Status: CLOSED ERRATA QA Contact: Jameer Pathan <jpathan>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 6.4CC: apatel, gtalreja, kgaikwad, pcreech
Target Milestone: 6.8.0Keywords: FutureFeature
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: rubygem-foreman_maintain-0.6.9 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-10-27 12:38:24 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Kavita 2020-07-28 07:41:37 UTC
foreman-installer fails if global http proxy is set. foreman-maintain should print a warning therefore.

Comment 1 Kavita 2020-07-28 07:41:44 UTC
Created from redmine issue https://projects.theforeman.org/issues/30324

Comment 2 Kavita 2020-07-28 07:41:47 UTC
Upstream bug assigned to None

Comment 3 Bryan Kearney 2020-07-28 08:05:54 UTC
Moving this bug to POST for triage into Satellite since the upstream issue https://projects.theforeman.org/issues/30324 has been resolved.

Comment 4 Kavita 2020-07-28 08:07:27 UTC
*** Bug 1861253 has been marked as a duplicate of this bug. ***

Comment 7 Jameer Pathan 2020-09-07 10:23:57 UTC
Verified:

Verified with:
- Satellite 6.8.0 snap 14
- rubygem-foreman_maintain-0.6.9-1.el7sat.noarch

Test steps:
1. set http proxy environment variable (http_proxy, https_proxy, HTTP_PROXY or HTTPS_PROXY)
2. foreman-maintain health check --label env-proxy

Observation:
- Check detects whether any http proxy variable is set or not.

[root@hpe-dl360egen8-01 root]# export http_proxy=https://proxy.example.com:5442

[root@hpe-dl360egen8-01 root]# foreman-maintain health check --label env-proxy
Running ForemanMaintain::Scenario::FilteredScenario
================================================================================
Check to make sure no HTTP(S) proxy set in ENV:                       [FAIL]
Global HTTP(S) proxy in environment (env) is set. Please unset first!
--------------------------------------------------------------------------------
Scenario [ForemanMaintain::Scenario::FilteredScenario] failed.

The following steps ended up in failing state:

  [env-proxy]

Resolve the failed steps and rerun
the command. In case the failures are false positives,
use --whitelist="env-proxy"


[root@hpe-dl360egen8-01 root]# unset http_proxy
[root@hpe-dl360egen8-01 root]# foreman-maintain health check --label env-proxy
Running ForemanMaintain::Scenario::FilteredScenario
================================================================================
Check to make sure no HTTP(S) proxy set in ENV:                       [OK]
--------------------------------------------------------------------------------

Comment 10 errata-xmlrpc 2020-10-27 12:38:24 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 (Satellite 6.8 Satellite Maintenance 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/RHBA-2020:4365