Skip to content

With http_proxy settings configured magnum_cluster_api refuses to connect to kube clusters #790

@klindgren-godaddy

Description

@klindgren-godaddy

Problem:
set http_proxy, https_proxy, and no_proxy env variables:
export no_proxy="your_kubecluster"
export http_proxy="your_http_proxy:3128"
export HTTPS_PROXY="your_https_proxy:3128"

Attempt to use magnum_cluster_api to connect to the management cluster to build a new workload cluster and you will see an error like:

2025-09-02 16:53:45.847 7 ERROR oslo.service.loopingcall [-] Fixed interval looping call 'magnum.service.periodic.ClusterUpdateJob.update_status' failed: RuntimeError: configured proxy http://10.33.124.130:3128/ requires the disabled feature "kube/http-proxy" 2025-09-02 16:53:45.847 7 ERROR oslo.service.loopingcall Traceback (most recent call last): 2025-09-02 16:53:45.847 7 ERROR oslo.service.loopingcall File "/var/lib/kolla/venv/lib64/python3.11/site-packages/oslo_service/loopingcall.py", line 150, in _run_loop 2025-09-02 16:53:45.847 7 ERROR oslo.service.loopingcall result = func(*self.args, **self.kw) 2025-09-02 16:53:45.847 7 ERROR oslo.service.loopingcall ^^^^^^^^^^^^^^^^^^^^^^^^^^^ 2025-09-02 16:53:45.847 7 ERROR oslo.service.loopingcall File "/var/lib/kolla/venv/lib64/python3.11/site-packages/magnum/service/periodic.py", line 72, in update_status 2025-09-02 16:53:45.847 7 ERROR oslo.service.loopingcall cdriver = driver.Driver.get_driver_for_cluster(self.ctx, self.cluster) 2025-09-02 16:53:45.847 7 ERROR oslo.service.loopingcall ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 2025-09-02 16:53:45.847 7 ERROR oslo.service.loopingcall File "/var/lib/kolla/venv/lib64/python3.11/site-packages/magnum/drivers/common/driver.py", line 165, in get_driver_for_cluster 2025-09-02 16:53:45.847 7 ERROR oslo.service.loopingcall return cls.get_driver(ct.server_type, ct.cluster_distro, ct.coe, 2025-09-02 16:53:45.847 7 ERROR oslo.service.loopingcall ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 2025-09-02 16:53:45.847 7 ERROR oslo.service.loopingcall File "/var/lib/kolla/venv/lib64/python3.11/site-packages/magnum/drivers/common/driver.py", line 125, in get_driver 2025-09-02 16:53:45.847 7 ERROR oslo.service.loopingcall definition_map = cls.get_drivers() 2025-09-02 16:53:45.847 7 ERROR oslo.service.loopingcall ^^^^^^^^^^^^^^^^^ 2025-09-02 16:53:45.847 7 ERROR oslo.service.loopingcall File "/var/lib/kolla/venv/lib64/python3.11/site-packages/magnum/drivers/common/driver.py", line 79, in get_drivers 2025-09-02 16:53:45.847 7 ERROR oslo.service.loopingcall for cluster_type in def_class().provides: 2025-09-02 16:53:45.847 7 ERROR oslo.service.loopingcall ^^^^^^^^^^^ 2025-09-02 16:53:45.847 7 ERROR oslo.service.loopingcall File "/var/lib/kolla/venv/lib64/python3.11/site-packages/magnum_cluster_api/driver.py", line 52, in __init__ 2025-09-02 16:53:45.847 7 ERROR oslo.service.loopingcall magnum_cluster_api.Driver("magnum-system", resources.CLUSTER_CLASS_NAME) 2025-09-02 16:53:45.847 7 ERROR oslo.service.loopingcall RuntimeError: configured proxy http://<your proxy>:3128/ requires the disabled feature "kube/http-proxy"

This appears to be related to commit: 5c6ee47

Updating Cargo.toml to include http-proxy feature for kube:

kube = { version = "0.99.0", features = ["runtime", "derive", "http-proxy"] }

and rebuilding the python package and bundled rust drivers, fixes this specific error and attempts to use the configured proxy via the env varriables.

The issue is that the no_proxy env variables are no longer respected. So it will force the use of the proxy for everything, even if the management cluster in in the no_proxy list.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions