Bug 1255247

Summary: Option to remove / unset http proxy from satellite 6.1 not available
Product: Red Hat Satellite Reporter: Komal <kshravag>
Component: InstallationAssignee: Chris Roberts <chrobert>
Status: CLOSED ERRATA QA Contact: Jitendra Yejare <jyejare>
Severity: medium Docs Contact:
Priority: medium    
Version: 6.1.0CC: ahumbe, bbuckingham, bkearney, chrobert, cwelton, ekohlvan, jyejare, mgazdik, mmccune, mmello, pmutha, sgraessl, wpinheir
Target Milestone: UnspecifiedKeywords: Triaged
Target Release: Unused   
Hardware: All   
OS: Linux   
URL: http://projects.theforeman.org/issues/14956
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-02-21 16:54:17 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 Komal 2015-08-20 06:31:00 UTC
Description of problem:

Option to remove / unset http proxy from satellite 6.1 not available.

We can configure the HTTP proxy settings by running katello-installer with proxy options as in : https://access.redhat.com/solutions/1455833

However, there is no way specified to remove / unset the proxy settings once added in the configuration files. Also as the doc says the change should not be done directly using the configuration files.

Looking for recommended way to remove proxy.

Version-Release number of selected component (if applicable):
Satellite 6.1

How reproducible:
Always

Steps to Reproduce:
1. Add proxy settings as per : https://access.redhat.com/solutions/1455833
2. As network team has allowed direct internet access from satellite to internet need to remove proxy settings.

Actual results:
Manually have to change the json configuration files under  /etc/pulp/server/plugins.conf.d/ but it does not seem to be appropriate way.

Expected results:
Setting satellite 6.1 back to original state without having to install it for removing proxy settings. 


Additional info:

Comment 3 Mike McCune 2016-05-31 21:28:22 UTC
you can remove them via the specification of empty parameters:


  --katello-proxy-password=""
    --katello-proxy-port=""
    --katello-proxy-url=""
    --katello-proxy-username=""


but having an option to --katello-proxy-unset would be much simpler

Comment 4 Chris Roberts 2016-06-01 15:03:14 UTC
This has been mitigated with a katello-installer check to verify if a proxy http/s env is set and will stop the installer from running until that is corrected

PR https://github.com/Katello/katello-installer/pull/353

Moving to POST

Comment 6 Chris Roberts 2016-06-24 09:47:48 UTC
*** Bug 1284498 has been marked as a duplicate of this bug. ***

Comment 10 Sebastian Gräßl 2017-08-16 10:20:52 UTC
Failed on Satellite-6.3 Snap 11.

There is no option yet (nor --katello-proxy-unset or --katello-proxy="false") to unset the http_proxy. Setting --katello-proxy-* parameters to empty strings fails as well, requiring to provide a url. Manually resetting is still required.

Comment 11 Ewoud Kohl van Wijngaarden 2017-09-05 22:12:21 UTC
It's good to know that kafo automatically creates --reset-<param> options but these appear to be undocumented other than https://github.com/theforeman/kafo#resetting-an-argument. I checked foreman-installer --help and man foreman-installer and couldn't find it in either.

The correct workaround would be to use --reset-katello-proxy-url --reset-katello-proxy-port --reset-katello-proxy-username --reset-katello-proxy-password.

There is also a difference in how the parameters are used. katello.yaml only sets proxy config if the url is non-empty while pulp configs output every single parameter with a value or null if empty. Aligning these behaviours might be a good thing so that just unsetting the url parameter (that should be called host, but that's a different matter) would result in not using a proxy and simplying to --reset-katello-proxy-url.

Comment 12 Chris Roberts 2017-09-06 16:31:26 UTC
I have created this based on the comment from Ewoud:

https://access.redhat.com/solutions/3174751

If you would like this feature in the installer please open an RFE, this bug is related to having a proxy set with bash env variables and then running the installer which there is a check for.

Setting back on QA

Comment 13 Jitendra Yejare 2017-12-11 13:26:55 UTC
Verified !

@ Satellite 6.3 snap 27

As per comment 12, I ran following command to unset the proxy:
```
# satellite-installer --scenario satellite -v --reset-katello-proxy-url --reset-katello-proxy-port --reset-katello-proxy-username --reset-katello-proxy-password
```

The installer command is successful and I see the proxy is disabled all over the conf files.

Specially I see in /etc/pulp/server/plugins.conf.d/yum_importer.json is et to null. And also in other json files like ostree and docker.

# cat /etc/pulp/server/plugins.conf.d/yum_importer.json
{
    
    "proxy_host": null,
    
    
    "proxy_port": null,
    
    
    "proxy_username": null,
    
    
    "proxy_password": null,
    
    
    "max_speed": null
    
}

Hence changing the state to verified.

Comment 14 Satellite Program 2018-02-21 16:54:17 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-2018:0336