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

deploy_node doesn't work on windows workstation: AttributeError: 'module' object has no attribute 'inet_pton'

    Details

    • Type: Bug
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: Compute
    • Labels:
      None
    • Environment:

      Windows 7 Entreprise SP1 with python 2.7.8 32 bits

      Description

      When I try to sawn a VM using the deploy_node function of NodeDriver class, executing it through a windows workstation, I face this issue:
      Traceback (most recent call last):
      File "C:\infappdata\InstTools\Python27\lib\site-packages\libcloud\compute\base.py", line 893, in deploy_node
      ssh_interface=ssh_interface)[0]
      File "C:/temp/Python/scripts/cloud/_modules/openstack-1_0_0.py", line 105, in create_node
      File "C:\infappdata\InstTools\Python27\lib\site-packages\libcloud\compute\base.py", line 1329, in wait_until_running
      for node in running_nodes]
      File "C:\infappdata\InstTools\Python27\lib\site-packages\libcloud\compute\base.py", line 1303, in filter_addresses
      return [address for address in addresses if is_supported(address)]
      File "C:\infappdata\InstTools\Python27\lib\site-packages\libcloud\compute\base.py", line 1295, in is_supported
      family=socket.AF_INET):
      File "C:\infappdata\InstTools\Python27\lib\site-packages\libcloud\utils\networking.py", line 80, in is_valid_ip_address
      socket.inet_pton(family, address)
      AttributeError: 'module' object has no attribute 'inet_pton'

        Activity

        Hide
        nfraison Fraison Nicolas added a comment - - edited

        To correct this I would like to update the is_valid_ip_address function of networking:
        from:
        socket.inet_pton(family, address)

        to
        if (platform.system()=='Windows'):
        socket.inet_aton( address)
        else:
        socket.inet_pton(family, address)

        Show
        nfraison Fraison Nicolas added a comment - - edited To correct this I would like to update the is_valid_ip_address function of networking: from: socket.inet_pton(family, address) to if (platform.system()=='Windows'): socket.inet_aton( address) else: socket.inet_pton(family, address)
        Hide
        githubbot ASF GitHub Bot added a comment -

        GitHub user ashangit opened a pull request:

        https://github.com/apache/libcloud/pull/343

        LIBCLOUD-601 Add check windows os in is_valid_ip_address to run inet_aton

        You can merge this pull request into a Git repository by running:

        $ git pull https://github.com/ashangit/libcloud LIBCLOUD-601_inet_aton

        Alternatively you can review and apply these changes as the patch at:

        https://github.com/apache/libcloud/pull/343.patch

        To close this pull request, make a commit to your master/trunk branch
        with (at least) the following in the commit message:

        This closes #343


        commit 93e37f882cbb1e0e71ee154f5e2aaeba52c011df
        Author: 503264 <503264@bnpparibas.com>
        Date: 2014-07-30T10:13:15Z

        LIBCLOUD-601 Add check windows os in is_valid_ip_address to run inet_aton


        Show
        githubbot ASF GitHub Bot added a comment - GitHub user ashangit opened a pull request: https://github.com/apache/libcloud/pull/343 LIBCLOUD-601 Add check windows os in is_valid_ip_address to run inet_aton You can merge this pull request into a Git repository by running: $ git pull https://github.com/ashangit/libcloud LIBCLOUD-601 _inet_aton Alternatively you can review and apply these changes as the patch at: https://github.com/apache/libcloud/pull/343.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #343 commit 93e37f882cbb1e0e71ee154f5e2aaeba52c011df Author: 503264 <503264@bnpparibas.com> Date: 2014-07-30T10:13:15Z LIBCLOUD-601 Add check windows os in is_valid_ip_address to run inet_aton
        Hide
        githubbot ASF GitHub Bot added a comment -

        Github user asfgit closed the pull request at:

        https://github.com/apache/libcloud/pull/343

        Show
        githubbot ASF GitHub Bot added a comment - Github user asfgit closed the pull request at: https://github.com/apache/libcloud/pull/343

          People

          • Assignee:
            Unassigned
            Reporter:
            nfraison Fraison Nicolas
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:

              Development