Bug 2168352 - The virt-who does not consider the defined HTTP Proxy which is selected while creating virt-who configuration on Satellite [NEEDINFO]
Summary: The virt-who does not consider the defined HTTP Proxy which is selected while...
Keywords:
Status: NEW
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: virt-who
Version: 8.7
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: rc
: ---
Assignee: candlepin-bugs
QA Contact: yuefliu
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2023-02-08 19:08 UTC by Jayant Bhatia
Modified: 2023-07-23 07:31 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed:
Type: Bug
Target Upstream Version:
Embargoed:
chrobert: needinfo? (jhnidek)


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker RHELPLAN-149712 0 None None None 2023-02-22 20:04:24 UTC
Red Hat Issue Tracker SAT-15774 0 None None None 2023-02-09 15:12:37 UTC

Description Jayant Bhatia 2023-02-08 19:08:47 UTC
Description of problem:
The HTTP proxy is added while creating virt-who configuration on Satellite WebUI, but after the same configuration is deployed on Satellite, virt-who ignores the proxy and does not consider it.


Version-Release number of selected component (if applicable): satellite-6.13.0-4.el8sat.noarch


How reproducible: Always


Steps to Reproduce:

1. Navigate to Satellite WebUI -> Infrastructure -> HTTP Proxies -> New HTTP Proxy and create a proxy (say 'test_proxy') with some dummy values.

2. Navigate to Satellite WebUI -> Infrastructure -> Virt-who Configurations -> Create Config. Select 'Hypervisor Type' as 'VMware vSphere / vCenter (esx)' and fill all the respective mandatory fields accordingly.

3. Ensure 'HTTP Proxy' field is set to the above created HTTP Proxy ('test_proxy'). Submit it.

4. Deploy virt-who config on Satellite using command "hammer virt-who-config deploy" command.


Actual results: The deployed virt-who config ignored the HTTP Proxy and is not using the defined 'test_proxy'. Below message is displayed while running "# virt-who -o -d" command.

       2023-02-09 00:26:44,961 [virtwho.rhsm_log WARNING] MainProcess(31894):MainThread @config.py:init_config:1594 - [global]: Ignoring unknown configuration option "https_proxy"

There is no proxy entry present in /etc/virt-who.d/virt-who-config-x.conf file, but instead proxy entry has been made in /etc/virt-who.conf file which will be used by all virt-who configurations.

       # cat /etc/virt-who.conf  | grep proxy
        https_proxy=https://proxy.example.com:8080


Expected results: 

(1) The virt-who should consider the proxy defined in virt-who config file. 

(2) The proxy entry should not be added in /etc/virt-who.conf file, but it should be only added to /etc/virt-who.d/virt-who-config-x.conf file. Because there could be a scenario where user would like to use proxy only for one config and not for all config. Proxy added in /etc/virt-who.conf file will make it effective for all present virt-who configs.

Comment 1 Brad Buckingham 2023-02-09 15:10:58 UTC
Is this a regression from Satellite 6.12?  Thanks!

Comment 2 Jayant Bhatia 2023-02-09 15:48:10 UTC
I could reproduce the same issue on Satellite 6.12, hence the same issue is present on Satellite 6.12 as well

Comment 3 Chris Roberts 2023-02-14 18:28:16 UTC
After talking to the Candlepin team, this would be an RFE to have the proxy as an virt-who instance wide.

virt-who puts the proxy info into the environment it does not do the work. There is no handling for proxies in the virt-who code

if you want to run different virt-who endpoints with different proxies, you need to have different instances of virt-who

Should we close this out Jayant or do you want to make a separate RFE for the candlepin team?

Comment 4 Jayant Bhatia 2023-02-14 18:55:29 UTC
Thank you Chris! I will do raise a RFE with Candlepin team for the same. But still I would like this specific Bug to address the issue where the proxy is not getting considered even after mentioning it while creating virt-who configuration. 

For Example: I created the virt-who configuration and ensured 'HTTP Proxy' field is correctly set. Now if I deploy the virt-who configuration and run "# virt-who -o -d" command, the virt-who should first go to proxy server and then it should go to VCenter to fetch the guests hosts mappings. But in current scenario, virt-who is not reaching out to proxy but it is directly reaching out to VCenter to fetch guests hosts mappings.

Comment 5 Chris Roberts 2023-02-15 20:06:31 UTC
Jayant,

I found this:

rhsm_proxy_hostname = internal-proxy.example.com
rhsm_proxy_port = 3128

Check scenario 2 - https://access.redhat.com/articles/2953631

Let me know if that would work to solve this BZ. As far as why the proxy is not working, i'm still looking into it.

Comment 6 Jayant Bhatia 2023-02-15 20:55:10 UTC
Thank you Chris. The Scenario 2 in https://access.redhat.com/articles/2953631 makes sense. As you mentioned, we still need to debug on why the proxy is not working with virt-who. I tried adding https_proxy parameter manually in '/etc/sysconfig/virt-who' file but it is still ignored. Also adding 'rhsm_proxy_hostname' entry in '/etc/virt-who.d/*.conf' have no effect.


Note You need to log in before you can comment on or make changes to this bug.