Tornado minion http proxy support / Python 3
See original GitHub issueDescription of Issue
Impossible to use archive.extracted, error on download with HTTP proxy defined But, the problem seem to be in utils/http.py
Setup
Simple example:
- start a Debian 10 container
- install salt-minion (Python 3) from Salt repositories
Test 1:
root@2a25eb5dded6:/# salt-call --local http.query https://www.google.com
local:
----------
body:
[........]
Test 2:
- Add
proxy_host
andproxy_port
in minion configuration and restart it
root@2a25eb5dded6:/# salt-call --local http.query https://www.google.com
[ERROR ] An un-handled exception was caught by salt's global exception handler:
NameError: name 'AsyncHTTPClient' is not defined
Traceback (most recent call last):
File "/usr/bin/salt-call", line 11, in <module>
salt_call()
File "/usr/lib/python3/dist-packages/salt/scripts.py", line 431, in salt_call
client.run()
File "/usr/lib/python3/dist-packages/salt/cli/call.py", line 57, in run
caller.run()
File "/usr/lib/python3/dist-packages/salt/cli/caller.py", line 138, in run
ret = self.call()
File "/usr/lib/python3/dist-packages/salt/cli/caller.py", line 237, in call
ret['return'] = self.minion.executors[fname](self.opts, data, func, args, kwargs)
File "/usr/lib/python3/dist-packages/salt/executors/direct_call.py", line 12, in execute
return func(*args, **kwargs)
File "/usr/lib/python3/dist-packages/salt/modules/http.py", line 41, in query
return salt.utils.http.query(url=url, opts=opts, **kwargs)
File "/usr/lib/python3/dist-packages/salt/utils/http.py", line 537, in query
AsyncHTTPClient.configure('CurlAsyncHTTPClient')
NameError: name 'AsyncHTTPClient' is not defined
Traceback (most recent call last):
File "/usr/bin/salt-call", line 11, in <module>
salt_call()
File "/usr/lib/python3/dist-packages/salt/scripts.py", line 431, in salt_call
client.run()
File "/usr/lib/python3/dist-packages/salt/cli/call.py", line 57, in run
caller.run()
File "/usr/lib/python3/dist-packages/salt/cli/caller.py", line 138, in run
ret = self.call()
File "/usr/lib/python3/dist-packages/salt/cli/caller.py", line 237, in call
ret['return'] = self.minion.executors[fname](self.opts, data, func, args, kwargs)
File "/usr/lib/python3/dist-packages/salt/executors/direct_call.py", line 12, in execute
return func(*args, **kwargs)
File "/usr/lib/python3/dist-packages/salt/modules/http.py", line 41, in query
return salt.utils.http.query(url=url, opts=opts, **kwargs)
File "/usr/lib/python3/dist-packages/salt/utils/http.py", line 537, in query
AsyncHTTPClient.configure('CurlAsyncHTTPClient')
NameError: name 'AsyncHTTPClient' is not defined
Versions Report
root@2a25eb5dded6:/# salt-call --versions-report
Salt Version:
Salt: 2019.2.2
Dependency Versions:
cffi: Not Installed
cherrypy: Not Installed
dateutil: 2.7.3
docker-py: Not Installed
gitdb: Not Installed
gitpython: Not Installed
ioflo: Not Installed
Jinja2: 2.10
libgit2: Not Installed
libnacl: Not Installed
M2Crypto: Not Installed
Mako: Not Installed
msgpack-pure: Not Installed
msgpack-python: 0.5.6
mysql-python: Not Installed
pycparser: Not Installed
pycrypto: 2.6.1
pycryptodome: Not Installed
pygit2: Not Installed
Python: 3.7.3 (default, Apr 3 2019, 05:39:12)
python-gnupg: Not Installed
PyYAML: 3.13
PyZMQ: 17.1.2
RAET: Not Installed
smmap: Not Installed
timelib: Not Installed
Tornado: 4.5.3
ZMQ: 4.3.1
System Versions:
dist: debian 10.2
locale: utf-8
machine: x86_64
release: 4.9.0-11-amd64
system: Linux
version: debian 10.2
Issue Analytics
- State:
- Created 4 years ago
- Comments:12 (10 by maintainers)
Top Results From Across the Web
HTTP Modules - Salt Project Documentation
This tutorial demonstrates using the various HTTP modules available in Salt. These modules wrap the Python tornado , urllib2 , and requests libraries, ......
Read more >Does tornado.httpclient.AsyncHTTPClient support using http ...
Tornado currently only supports proxies when configured to use curl_httpclient. This was Python 2.x-only until recently, ...
Read more >Salt Super-Proxy — salt-sproxy documentation
Salt Super-Proxy¶. Salt plugin to automate the management and configuration of network devices at scale, without running (Proxy) Minions.
Read more >What's New in Salt 3002 Magnesium
They are mostly focused on passing configuration and context options, subproxy process management, and netmiko proxy module improvements. There ...
Read more >rpms/salt - src.fedoraproject.org - Tree
For Python 3 only ... Requires: python%%{python3_pkgversion}-tornado >= 4.2.1, ... The Salt master is the central server to which all minions connect.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
same issue #54771
@slaws see the related issue. dmurphy18 mentions that the saltstack package has been patched for debian 10 before being packaged which is why you won’t find any commits in this repository.
@cmcmarrow can you confirm this is still an issue in
master
please?