Bug 34706 - UMC ignores the UCR variable proxy/http
UMC ignores the UCR variable proxy/http
Status: RESOLVED WONTFIX
Product: UCS
Classification: Unclassified
Component: UMC (Generic)
UCS 4.1
Other Linux
: P5 enhancement (vote)
: ---
Assigned To: UMC maintainers
:
Depends on: 33879
Blocks:
  Show dependency treegraph
 
Reported: 2014-04-30 13:06 CEST by Alexander Kläser
Modified: 2019-01-03 07:20 CET (History)
4 users (show)

See Also:
What kind of report is it?: Bug Report
What type of bug is this?: 4: Minor Usability: Impairs usability in secondary scenarios
Who will be affected by this bug?: 2: Will only affect a few installed domains
How will those affected feel about the bug?: 2: A Pain – users won’t like this once they notice it
User Pain: 0.091
Enterprise Customer affected?:
School Customer affected?:
ISV affected?:
Waiting Support:
Flags outvoted (downgraded) after PO Review:
Ticket number:
Bug group (optional): Error handling, External feedback
Max CVSS v3 score:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Alexander Kläser univentionstaff 2014-04-30 13:06:05 CEST
As described at Bug 33879, the environment variables http_proxy and https_proxy will be evaluated automatically by urllib. However, when setting the UCR variable http/proxy, it will not be set in the environment variables for UMC processes. 

The only environment variables that are set are the following ones:

{'LANG': 'de_DE.UTF-8', 'PATH': '/bin:/sbin:/usr/bin:/usr/sbin'}

It would be helpful to set the proxy environment variables in order to avoid problems with handling proxies in UMC modules.
Comment 1 Stefan Gohmann univentionstaff 2014-06-02 07:26:28 CEST
I think this would change the default behavior for several modules. Do we have specific proxy problems in UMC modules?
Comment 2 Alexander Kläser univentionstaff 2014-06-05 12:31:31 CEST
(In reply to Stefan Gohmann from comment #1)
> I think this would change the default behavior for several modules. Do we
> have specific proxy problems in UMC modules?

This would only concern UMC modules that send HTTP requests from the server side. Which are just a few, i.e., with a quick look:

> ~/svn/ucs322$ rgrep -l 'import urllib' */*/umc/python
> management/univention-management-console-module-appcenter/umc/python/appcenter/util.py
> management/univention-management-console-module-appcenter/umc/python/appcenter/app_center.py
> management/univention-management-console-module-appcenter/umc/python/appcenter/__init__.py
> management/univention-management-console-module-lib/umc/python/lib/server.py
> management/univention-management-console-module-udm/umc/python/udm/tools.py
> management/univention-management-console-module-udm/umc/python/udm/__init__.py
> management/univention-system-info/umc/python/sysinfo/upload.py
> management/univention-system-info/umc/python/sysinfo/__init__.py

> ~/svn/school32r2$ rgrep -l 'import urllib' */umc/python
> ucs-school-umc-installer/umc/python/schoolinstaller/__init__.py

> ~/svn/ucc20$ rgrep -l 'import urllib' .
> ./ucc-image-toolkit/src/images.py
→ this lib is used in the UCC image management + UCC setup wizard

For some modules (App Center, UCC modules, UDM license requests) a workaround has been added, in other cases not (e.g., Sys Info module). It would facilitate the development of new modules/features and it would for the future avoid proxy problems AFAIS.
Comment 3 Janek Walkenhorst univentionstaff 2016-10-12 18:02:29 CEST
(In reply to Alexander Kläser from comment #2)
> For some modules […] a workaround has been added, in other cases not (e.g., Sys Info module).

This leads to a long hang if the proxy is required for HTTP because the normal route is blackholed. (If wget without proxy fails quickly, than the update-pciids fails quickly, and thus the module only hangs a short time)
Comment 4 Stefan Gohmann univentionstaff 2019-01-03 07:20:54 CET
This issue has been filled against UCS 4.1. The maintenance with bug and security fixes for UCS 4.1 has ended on 5st of April 2018.

Customers still on UCS 4.1 are encouraged to update to UCS 4.3. Please contact
your partner or Univention for any questions.

If this issue still occurs in newer UCS versions, please use "Clone this bug" or simply reopen the issue. In this case please provide detailed information on how this issue is affecting you.