libcloud-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF subversion and git services (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (LIBCLOUD-858) Unable to list nodes with Libvirt provider on Python 3
Date Sun, 09 Oct 2016 08:25:21 GMT

    [ https://issues.apache.org/jira/browse/LIBCLOUD-858?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15559578#comment-15559578
] 

ASF subversion and git services commented on LIBCLOUD-858:
----------------------------------------------------------

Commit f5ff0cfb080b767b542e9deec5ecc34dedcb4f0c in libcloud's branch refs/heads/trunk from
[~femnad]
[ https://git-wip-us.apache.org/repos/asf?p=libcloud.git;h=f5ff0cf ]

LIBCLOUD-858: Fix Listing Libvirt Nodes with Python 3

Closes #894


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

Mime
View raw message