question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Tornado minion http proxy support / Python 3

See original GitHub issue

Description 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 and proxy_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:closed
  • Created 4 years ago
  • Comments:12 (10 by maintainers)

github_iconTop GitHub Comments

1reaction
dgengtekcommented, Nov 30, 2019

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.

0reactions
sagetheragecommented, May 7, 2021

@cmcmarrow can you confirm this is still an issue in master please?

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found