Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 2168352

Summary: The virt-who does not consider the defined HTTP Proxy which is selected while creating virt-who configuration on Satellite
Product: Red Hat Enterprise Linux 8 Reporter: Jayant Bhatia <jbhatia>
Component: virt-whoAssignee: candlepin-bugs
Status: CLOSED WONTFIX QA Contact: yuefliu <yuefliu>
Severity: high Docs Contact:
Priority: high    
Version: 8.7CC: ahumbe, chrobert, hsun, jhnidek, kuhuang, redakkan
Target Milestone: rcKeywords: Triaged
Target Release: ---Flags: pm-rhel: mirror+
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: 2023-08-22 07:28:48 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 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.

Comment 15 RHEL Program Management 2023-08-22 07:28:48 UTC
After evaluating this issue, there are no plans to address it further or fix it in an upcoming release.  Therefore, it is being closed.  If plans change such that this issue will be fixed in an upcoming release, then the bug can be reopened.

Comment 16 Red Hat Bugzilla 2023-12-21 04:25:13 UTC
The needinfo request[s] on this closed bug have been removed as they have been unresolved for 120 days