From: Nathan Cutler Date: Fri, 8 Jan 2021 13:25:33 +0000 (+0100) Subject: mgr/telemetry: fix proxy usage X-Git-Tag: v14.2.17~79^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F38816%2Fhead;p=ceph.git mgr/telemetry: fix proxy usage This nautilus-only commit is not cherry-picked from master because it fixes an incomplete nautilus backport. Commit 5d7c79b079827dffdabf78bd18c2930cfed92286 mgr/telemetry: fix and document proxy usage targeting master was initially backported to nautilus by 21b00799948f0863e169d45415fcc5dfb0fac02d However, this initial backport omitted the "fix" part. Fixes: 21b00799948f0863e169d45415fcc5dfb0fac02d Signed-off-by: Nathan Cutler --- diff --git a/src/pybind/mgr/telemetry/module.py b/src/pybind/mgr/telemetry/module.py index 305b59b3a8a..c21e23407b5 100644 --- a/src/pybind/mgr/telemetry/module.py +++ b/src/pybind/mgr/telemetry/module.py @@ -694,7 +694,7 @@ class Module(MgrModule): proxies['http'] = self.proxy proxies['https'] = self.proxy try: - resp = requests.put(url=url, json=report) + resp = requests.put(url=url, json=report, proxies=proxies) resp.raise_for_status() except Exception as e: fail_reason = 'Failed to send %s to %s: %s' % (what, url, str(e))