You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@libcloud.apache.org by "Fahri Cihan Demirci (JIRA)" <ji...@apache.org> on 2016/10/09 06:12:20 UTC

[jira] [Created] (LIBCLOUD-858) Unable to list nodes with Libvirt provider on Python 3

Fahri Cihan Demirci created LIBCLOUD-858:
--------------------------------------------

             Summary: Unable to list nodes with Libvirt provider on Python 3
                 Key: LIBCLOUD-858
                 URL: https://issues.apache.org/jira/browse/LIBCLOUD-858
             Project: Libcloud
          Issue Type: Bug
          Components: Compute
         Environment: Ubuntu 16.04.1 LTS
Python 3.5.2
Libcloud installed from 1a836148250ebf852a7f28e4d93007417ee7639d

            Reporter: Fahri Cihan Demirci


Using the {{list_nodes}} methods of the Libvirt provider driver results in an error when using Python 3. A simple script to trigger this is as follows:

{code}
from libcloud.compute.providers import get_driver
from libcloud.compute.types import Provider

cls = get_driver(Provider.LIBVIRT)
driver = cls('qemu:///system')
nodes = driver.list_nodes()
{code}

It results in the following error:
{code}
Traceback (most recent call last):
  File "libcloud_list_nodes.py", line 6, in <module>
    nodes = driver.list_nodes()
  File "/home/femnad/v/libcloud3-pristine/lib/python3.5/site-packages/apache_libcloud-1.2.1-py3.5.egg/libcloud/compute/drivers/libvirt_driver.py", line 120, in list_nodes
    nodes = self._to_nodes(domains=domains)
  File "/home/femnad/v/libcloud3-pristine/lib/python3.5/site-packages/apache_libcloud-1.2.1-py3.5.egg/libcloud/compute/drivers/libvirt_driver.py", line 276, in _to_nodes
    nodes = [self._to_node(domain=domain) for domain in domains]
  File "/home/femnad/v/libcloud3-pristine/lib/python3.5/site-packages/apache_libcloud-1.2.1-py3.5.egg/libcloud/compute/drivers/libvirt_driver.py", line 276, in <listcomp>
    nodes = [self._to_node(domain=domain) for domain in domains]
  File "/home/femnad/v/libcloud3-pristine/lib/python3.5/site-packages/apache_libcloud-1.2.1-py3.5.egg/libcloud/compute/drivers/libvirt_driver.py", line 285, in _to_node
    ip_addresses = self._get_ip_addresses_for_domain(domain)
  File "/home/femnad/v/libcloud3-pristine/lib/python3.5/site-packages/apache_libcloud-1.2.1-py3.5.egg/libcloud/compute/drivers/libvirt_driver.py", line 333, in _get_ip_addresses_for_domain
    arp_table = self._parse_ip_table_arp(arp_output=stdout)
  File "/home/femnad/v/libcloud3-pristine/lib/python3.5/site-packages/apache_libcloud-1.2.1-py3.5.egg/libcloud/compute/drivers/libvirt_driver.py", line 410, in _parse_ip_table_arp
    return self._parse_mac_addr_table(arp_output, arp_regex)
  File "/home/femnad/v/libcloud3-pristine/lib/python3.5/site-packages/apache_libcloud-1.2.1-py3.5.egg/libcloud/compute/drivers/libvirt_driver.py", line 431, in _parse_mac_addr_table
    lines = cmd_output.split('\n')
TypeError: a bytes-like object is required, not 'str'
{code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)