Uploaded image for project: 'Libcloud'
  1. Libcloud
  2. LIBCLOUD-936

AWS ELB/ALB Driver connection object initialization is broken

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • None
    • LoadBalancer
    • None

    Description

      Code to reproduce:

      from libcloud.loadbalancer.types import Provider
      from libcloud.loadbalancer.providers import get_driver
      
      key = ''
      secret = ''
      token = ''
      
      cls = get_driver(Provider.ELB)
      #cls = get_driver(Provider.ALB)
      
      driver = cls(key, secret, 'us-east-1', token=token)
      data = driver.list_balancers()
      

      Error:

      /Users/irvan/py27venv/bin/python test_token.py
      Traceback (most recent call last):
        File "test_token.py", line 33, in <module>
          data = driver.list_balancers()
        File "/Users/irvan/Repos/GIT/github/libcloud/libcloud/loadbalancer/drivers/elb.py", line 68, in list_balancers
          data = self.connection.request(ROOT, params=params).object
        File "/Users/irvan/Repos/GIT/github/libcloud/libcloud/common/base.py", line 603, in request
          headers=headers, stream=stream)
        File "/Users/irvan/Repos/GIT/github/libcloud/libcloud/http.py", line 215, in request
          verify=self.verification
        File "/Users/irvan/py27venv/lib/python2.7/site-packages/requests/sessions.py", line 518, in request
          resp = self.send(prep, **send_kwargs)
        File "/Users/irvan/py27venv/lib/python2.7/site-packages/requests/sessions.py", line 639, in send
          r = adapter.send(request, **kwargs)
        File "/Users/irvan/py27venv/lib/python2.7/site-packages/requests/adapters.py", line 502, in send
          raise ConnectionError(e, request=request)
      requests.exceptions.ConnectionError: HTTPSConnectionPool(host='elasticloadbalancing.%s.amazonaws.com', port=443): Max retries exceeded with url: /2012-06-01/?Action=DescribeLoadBalancers&Version=2012-06-01 (Caused by NewConnectionError('<requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x10760f4d0>: Failed to establish a new connection: [Errno 8] nodename nor servname provided, or not known',))
      

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              irvan Anton Kozyrev
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: