uyuni-project / uyuni

Source code for Uyuni
https://www.uyuni-project.org/
GNU General Public License v2.0
428 stars 179 forks source link

Uyuni 2022.02 - proxy not used as expected #4826

Closed PaulBarmettler closed 2 years ago

PaulBarmettler commented 2 years ago

Version of Uyuni Server and Proxy (if used)

2022.01-165.2.uyuni1

Details about issue

After selecting "SUSE Linux Enterprise Server 12 sp5" (x86_64) in Admin -> Products we see that Uyuni server tries to reach URL updates.suse.com directly to internet and is not using the configured proxy.

wombelix commented 2 years ago

Hey @PaulBarmettler, found that issue by accident, due to the generic title it wasn't clear what sort of problem you are reporting. My understanding is that the download SCC Products functionality share some code with reposync, you say the proxy settings getting ignored, so maybe it's related to https://github.com/uyuni-project/uyuni/issues/4932, can you take a look into my comment and give the described workaround a try?

PaulBarmettler commented 2 years ago

Hello Dominik

I'm not pretty sure what I have to do for testing... Changing opts.find_proxy(url, scheme) to opts.find_proxy(url, scheme.decode("utf-8")) in /usr/lib/python3.6/site-packages/spacewalk/satellite_tools/download.py

and then spacewalk-repo-sync for "SUSE Linux Enterprise Server 12 SP5 x86_64": sudo spacewalk-repo-sync --channel sles12-sp5-pool-x86_64

Regards

Paul Freundliche Grüsse Paul Barmettler

[CKW.]

PAUL BARMETTLER Leiter DBA & Linux a.i. T +41 41 249 52 42

CKW AG Rathausen 1 6032 Emmen Postadresse: Postfach 6002 Luzern Schweiz T +41 41 249 51 11 www.ckw.ch [Instagram]https://www.instagram.com/ckwag/ [Facebook]https://www.facebook.com/ckw.energiezukunft/ [LinkedIn]http://www.linkedin.com/company/ckw [Twitter]https://twitter.com/CKW_Luzern [YouTube]https://www.youtube.com/user/ckwAG

Von: Dominik Wombacher @.> Gesendet: Sonntag, 6. März 2022 08:06 An: uyuni-project/uyuni @.> Cc: Barmettler Paul CKW @.>; Mention @.> Betreff: Re: [uyuni-project/uyuni] Uyuni Bugreport - Uyuni 2022.02 (Issue #4826)

[EXTERN] Dieses Mail stammt nicht von einem Mitarbeitenden der CKW-Gruppe

Hey @PaulBarmettlerhttps://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2FPaulBarmettler&data=04%7C01%7Cpaul.barmettler%40ckw.ch%7C8ffd6f47d3054b306b1008d9ff3fc29a%7C4abcb15f9fd74a13ac163d55a64fa21e%7C0%7C0%7C637821471641802148%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=pWlzr2HEJdOWMo%2FIMEqQxoUr8rbQaRVefNNUxcl0yjk%3D&reserved=0, found that issue by accident, due to the generic title it wasn't clear what sort of problem you are reporting. My understanding is that the download SCC Products functionality share some code with reposync, you say the proxy settings getting ignored, so maybe it's related to #4932https://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fuyuni-project%2Fuyuni%2Fissues%2F4932&data=04%7C01%7Cpaul.barmettler%40ckw.ch%7C8ffd6f47d3054b306b1008d9ff3fc29a%7C4abcb15f9fd74a13ac163d55a64fa21e%7C0%7C0%7C637821471641802148%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=HHWkKwKeOSHyeoVHkmbhAiQHYnKmGJ1L6HSbCEXHS1o%3D&reserved=0, can you take a look into my commenthttps://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fuyuni-project%2Fuyuni%2Fissues%2F4932%23issuecomment-1059199170&data=04%7C01%7Cpaul.barmettler%40ckw.ch%7C8ffd6f47d3054b306b1008d9ff3fc29a%7C4abcb15f9fd74a13ac163d55a64fa21e%7C0%7C0%7C637821471641802148%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=7ySgZHn1SGk5SGR7F1CkEfW8oLtqjvQsCCxkGOXP%2BIU%3D&reserved=0 and give the described workaround a try?

- Reply to this email directly, view it on GitHubhttps://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fuyuni-project%2Fuyuni%2Fissues%2F4826%23issuecomment-1059908429&data=04%7C01%7Cpaul.barmettler%40ckw.ch%7C8ffd6f47d3054b306b1008d9ff3fc29a%7C4abcb15f9fd74a13ac163d55a64fa21e%7C0%7C0%7C637821471641802148%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=gRoRdkDDoXLTE6pg68CUDUU6xjrrf4axu739issEy7s%3D&reserved=0, or unsubscribehttps://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAXW4VXI6EHT3SR273BHRHVDU6RKNHANCNFSM5ODOH5KQ&data=04%7C01%7Cpaul.barmettler%40ckw.ch%7C8ffd6f47d3054b306b1008d9ff3fc29a%7C4abcb15f9fd74a13ac163d55a64fa21e%7C0%7C0%7C637821471641802148%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=dBVIj%2Blhvk8VUjLySe%2Fg9bd8wtPqQXbIVSvkP%2F5kyEw%3D&reserved=0. Triage notifications on the go with GitHub Mobile for iOShttps://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fapps.apple.com%2Fapp%2Fapple-store%2Fid1477376905%3Fct%3Dnotification-email%26mt%3D8%26pt%3D524675&data=04%7C01%7Cpaul.barmettler%40ckw.ch%7C8ffd6f47d3054b306b1008d9ff3fc29a%7C4abcb15f9fd74a13ac163d55a64fa21e%7C0%7C0%7C637821471641802148%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=Gl3R6AiyLa9gOVZ3BV5kRrdwn5QIR49SP1QgcIW%2Fv%2BI%3D&reserved=0 or Androidhttps://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fplay.google.com%2Fstore%2Fapps%2Fdetails%3Fid%3Dcom.github.android%26referrer%3Dutm_campaign%253Dnotification-email%2526utm_medium%253Demail%2526utm_source%253Dgithub&data=04%7C01%7Cpaul.barmettler%40ckw.ch%7C8ffd6f47d3054b306b1008d9ff3fc29a%7C4abcb15f9fd74a13ac163d55a64fa21e%7C0%7C0%7C637821471641802148%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=DYEHJRCjoRYHc7bhGMBCcaemlyYIhvA41QXGFQ6HaS0%3D&reserved=0. You are receiving this because you were mentioned.Message ID: @.**@.>>

wombelix commented 2 years ago

Hey Paul,

you have to change the file /usr/lib/python3.6/site-packages/spacewalk/satellite_tools/download.py, afterwards just try again to Sync a Product as you did before. Following Code Snippets should make it easier for you.

Apply Workaround:

sed -i.bak 's/opts.find_proxy(url, scheme)/opts.find_proxy(url, scheme.decode("utf-8"))/gi' /usr/lib/python3.6/site-packages/spacewalk/satellite_tools/download.py

Revert Workaround:

mv /usr/lib/python3.6/site-packages/spacewalk/satellite_tools/download.py.bak /usr/lib/python3.6/site-packages/spacewalk/satellite_tools/download.py

Cheers Dominik

PaulBarmettler commented 2 years ago

Hello Dominik

We tried to reproduce the issue, but were not successful. Also after changing the file /usr/lib/python3.6/site-packages/spacewalk/satellite_tools/download.py and running the command: sudo spacewalk-repo-sync --channel sle-product-sles15-sp3-pool-x86_64 we got errors on firewall for tcp-port 443. Refer to attachment.

Regards

Paul Freundliche Grüsse Paul Barmettler

[CKW.]

PAUL BARMETTLER Leiter DBA & Linux a.i. T +41 41 249 52 42

CKW AG Rathausen 1 6032 Emmen Postadresse: Postfach 6002 Luzern Schweiz T +41 41 249 51 11 www.ckw.ch [Instagram]https://www.instagram.com/ckwag/ [Facebook]https://www.facebook.com/ckw.energiezukunft/ [LinkedIn]http://www.linkedin.com/company/ckw [Twitter]https://twitter.com/CKW_Luzern [YouTube]https://www.youtube.com/user/ckwAG

Von: Dominik Wombacher @.> Gesendet: Dienstag, 8. März 2022 00:12 An: uyuni-project/uyuni @.> Cc: Barmettler Paul CKW @.>; Mention @.> Betreff: Re: [uyuni-project/uyuni] Uyuni Bugreport - Uyuni 2022.02 (Issue #4826)

[EXTERN] Dieses Mail stammt nicht von einem Mitarbeitenden der CKW-Gruppe

Hey Paul,

you have to change the file /usr/lib/python3.6/site-packages/spacewalk/satellite_tools/download.py, afterwards just try again to Sync a Product as you did before. Following Code Snippets should make it easier for you.

Apply Workaround:

sed -i.bak 's/opts.find_proxy(url, scheme)/opts.find_proxy(url, scheme.decode("utf-8"))/gi' /usr/lib/python3.6/site-packages/spacewalk/satellite_tools/download.py

Revert Workaround:

mv /usr/lib/python3.6/site-packages/spacewalk/satellite_tools/download.py.bak /usr/lib/python3.6/site-packages/spacewalk/satellite_tools/download.py

Cheers Dominik

- Reply to this email directly, view it on GitHubhttps://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fuyuni-project%2Fuyuni%2Fissues%2F4826%23issuecomment-1061235525&data=04%7C01%7Cpaul.barmettler%40ckw.ch%7C5a585a3e0c784477fcb808da008fd905%7C4abcb15f9fd74a13ac163d55a64fa21e%7C0%7C0%7C637822915133839591%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=Zb5QRrELgkQ9fivR7A4VN0iGNmt1lz1gDTBQaQr%2BgO8%3D&reserved=0, or unsubscribehttps://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAXW4VXNXRGP4ZKHORKRIFKDU62EK7ANCNFSM5ODOH5KQ&data=04%7C01%7Cpaul.barmettler%40ckw.ch%7C5a585a3e0c784477fcb808da008fd905%7C4abcb15f9fd74a13ac163d55a64fa21e%7C0%7C0%7C637822915133839591%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=Nqp88BmeEWq7LO47zlHhVTz6J%2FzYn0lfDEhdt3ufOTQ%3D&reserved=0. Triage notifications on the go with GitHub Mobile for iOShttps://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fapps.apple.com%2Fapp%2Fapple-store%2Fid1477376905%3Fct%3Dnotification-email%26mt%3D8%26pt%3D524675&data=04%7C01%7Cpaul.barmettler%40ckw.ch%7C5a585a3e0c784477fcb808da008fd905%7C4abcb15f9fd74a13ac163d55a64fa21e%7C0%7C0%7C637822915133839591%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=sMLBFqAwCTR3oFXNheV%2FzLiCI3t2U%2FxiWYd2swJcZS0%3D&reserved=0 or Androidhttps://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fplay.google.com%2Fstore%2Fapps%2Fdetails%3Fid%3Dcom.github.android%26referrer%3Dutm_campaign%253Dnotification-email%2526utm_medium%253Demail%2526utm_source%253Dgithub&data=04%7C01%7Cpaul.barmettler%40ckw.ch%7C5a585a3e0c784477fcb808da008fd905%7C4abcb15f9fd74a13ac163d55a64fa21e%7C0%7C0%7C637822915133839591%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=CD5lZpTSmxApBTZCIBrGUGUclSJRFq534BPpUthT6Vc%3D&reserved=0. You are receiving this because you were mentioned.Message ID: @.**@.>>

wombelix commented 2 years ago

Refer to attachment

maybe you should write updates directly in the github issue and provide such information inline, can't see any attachment, don't think that will work when you just reply by mail.

PaulBarmettler commented 2 years ago

MicrosoftTeams-image

As requested

wombelix commented 2 years ago

I couldn't reproduce this error in my Environment, after applying the workaround as described in https://github.com/uyuni-project/uyuni/issues/4932#issuecomment-1059199170 I was able to sync openSUSE Leap 15.3 and Oracle Linux 8 Repositories without issues. This fix will also be part of the next Release probably https://github.com/uyuni-project/uyuni/pull/4953. Syncing Oracle Linux 8 Repos use the same code as Alma Linux or CentOS, so I don't think I will be able to further assist right now.

wombelix commented 2 years ago

@PaulBarmettler if you want you can take a look at https://github.com/uyuni-project/uyuni/issues/4850#issuecomment-1075481991, maybe this could also solve your issue.

mcalmer commented 2 years ago

@PaulBarmettler how did you configure the proxy? Is it in rhn.conf / from the WebUI or did you use the yast module and it was configured in /etc/sysconfig/proxy ?

mcalmer commented 2 years ago

No answer so I think the problem is solved.

PaulBarmettler commented 1 year ago

Hello

First of all we set the proxy in OpenSUSE Leap: /etc/sysconfig/proxy

On our own proxy we allowed to reach following target: download.opensuse.org mirrors.fedoraproject.org developer.download.nvidia.com

secondly we set it also in /etc/rhn/rhn.conf

Regards

Paul Freundliche Grüsse Paul Barmettler

[CKW.]

PAUL BARMETTLER Leiter DBA & Linux a.i. T +41 41 249 52 42

CKW AG Rathausen 1 6032 Emmen Postadresse: Postfach 6002 Luzern Schweiz T +41 41 249 51 11 www.ckw.ch [Instagram]https://www.instagram.com/ckwag/ [Facebook]https://www.facebook.com/ckw.energiezukunft/ [LinkedIn]http://www.linkedin.com/company/ckw [Twitter]https://twitter.com/CKW_Luzern [YouTube]https://www.youtube.com/user/ckwAG

Von: Michael Calmer @.> Gesendet: Mittwoch, 11. Mai 2022 12:12 An: uyuni-project/uyuni @.> Cc: Barmettler Paul CKW @.>; Mention @.> Betreff: Re: [uyuni-project/uyuni] Uyuni Bugreport - Uyuni 2022.02 (Issue #4826)

[EXTERN] Dieses Mail stammt nicht von einem Mitarbeitenden der CKW-Gruppe

@PaulBarmettlerhttps://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2FPaulBarmettler&data=05%7C01%7Cpaul.barmettler%40ckw.ch%7Cab8ba5af17884ae4fae708da3336bbfd%7C4abcb15f9fd74a13ac163d55a64fa21e%7C0%7C0%7C637878607427322493%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=XWji%2BGvIw2Kh3REONWY8mmL%2BhZDmg5vh1BeR2A5oRGc%3D&reserved=0 how did you configure the proxy? Is it in rhn.conf / from the WebUI or did you use the yast module and it was configured in /etc/sysconfig/proxy ?

- Reply to this email directly, view it on GitHubhttps://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fuyuni-project%2Fuyuni%2Fissues%2F4826%23issuecomment-1123508451&data=05%7C01%7Cpaul.barmettler%40ckw.ch%7Cab8ba5af17884ae4fae708da3336bbfd%7C4abcb15f9fd74a13ac163d55a64fa21e%7C0%7C0%7C637878607427322493%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=JLKrobFlG3iWhMfwZvY3l38lcNZwLxqjtZWHejdb2%2FU%3D&reserved=0, or unsubscribehttps://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAXW4VXJUGHXGXOOYUADSRTTVJOBYFANCNFSM5ODOH5KQ&data=05%7C01%7Cpaul.barmettler%40ckw.ch%7Cab8ba5af17884ae4fae708da3336bbfd%7C4abcb15f9fd74a13ac163d55a64fa21e%7C0%7C0%7C637878607427322493%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=W2WT5mlY2wfD16bxs7Z6T6FJSVD%2BQRPOhX1w2KJQpsc%3D&reserved=0. You are receiving this because you were mentioned.Message ID: @.**@.>>