You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@libcloud.apache.org by "Hutson Betts (Created) (JIRA)" <ji...@apache.org> on 2011/10/11 20:09:11 UTC

[dev] [jira] [Created] (LIBCLOUD-117) OpenNebula Compute Network Description

OpenNebula Compute Network Description
--------------------------------------

                 Key: LIBCLOUD-117
                 URL: https://issues.apache.org/jira/browse/LIBCLOUD-117
             Project: Libcloud
          Issue Type: Bug
          Components: Compute
    Affects Versions: 0.5.2, 0.6.0
         Environment: Debian Squeeze using 0.5.2 libcloud extracted archive file.
            Reporter: Hutson Betts
             Fix For: 0.5.2, 0.6.0
         Attachments: opennebula.network.error.py.patch

An issue exists in the way the OpenNebula driver pulls the network IP address for a compute node. It causes the driver to fail every time.

Function Call:
	cloudProvider.connection.list_nodes()

Exception Output:
	Traceback (most recent call last):
	  File "test.py", line 65, in <module>
	    nodes[cloudProvider.host] = cloudProvider.connection.list_nodes()
	  File "/var/lib/service-manager/service-management-system/lib/apache-libcloud-0.5.2/libcloud/compute/drivers/opennebula.py", line 113, in list_nodes
	    return self._to_nodes(self.connection.request('/compute').object)
	  File "/var/lib/service-manager/service-management-system/lib/apache-libcloud-0.5.2/libcloud/compute/drivers/opennebula.py", line 188, in _to_nodes
	    computes.append(self._to_node(compute))
	  File "/var/lib/service-manager/service-management-system/lib/apache-libcloud-0.5.2/libcloud/compute/drivers/opennebula.py", line 200, in _to_node
	    networks.append(element.attrib["ip"])
	KeyError: 'ip'

Cause:
	for element in compute.findall("NIC"):
            networks.append(element.attrib["ip"])

OpenNebula/OCCI Compute Definition
	<COMPUTE href="http://www.opennebula.org/compute/32">
		<ID>32</ID>
		...
		<NIC>
		    <NETWORK href="http://www.opennebula.org/network/12"/>
		    <MAC>00:ff:72:31:23:17</MAC>
		    <IP>192.168.0.12</IP>
		    ...
		</NIC>
		...
	</COMPUTE>

Conclusion:
	IP address information is not an attribute. Rather it's a child element of the NIC.

Patch:
	With patch, the NIC information is returned correctly:
		<Node: uuid=894yf9823fh9, name=one-34, state=4, public_ip=['10.2.0.5', '10.2.2.3'], provider=OpenNebula ...>

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[dev] [jira] [Updated] (LIBCLOUD-117) OpenNebula Compute Network Description

Posted by "Hutson Betts (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/LIBCLOUD-117?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Hutson Betts updated LIBCLOUD-117:
----------------------------------

    Attachment: opennebula.network.error.py.patch
    
> OpenNebula Compute Network Description
> --------------------------------------
>
>                 Key: LIBCLOUD-117
>                 URL: https://issues.apache.org/jira/browse/LIBCLOUD-117
>             Project: Libcloud
>          Issue Type: Bug
>          Components: Compute
>    Affects Versions: 0.5.2, 0.6.0
>         Environment: Debian Squeeze using 0.5.2 libcloud extracted archive file.
>            Reporter: Hutson Betts
>              Labels: patch
>             Fix For: 0.5.2, 0.6.0
>
>         Attachments: opennebula.network.error.py.patch
>
>   Original Estimate: 1h
>  Remaining Estimate: 1h
>
> An issue exists in the way the OpenNebula driver pulls the network IP address for a compute node. It causes the driver to fail every time.
> Function Call:
> 	cloudProvider.connection.list_nodes()
> Exception Output:
> 	Traceback (most recent call last):
> 	  File "test.py", line 65, in <module>
> 	    nodes[cloudProvider.host] = cloudProvider.connection.list_nodes()
> 	  File "/var/lib/service-manager/service-management-system/lib/apache-libcloud-0.5.2/libcloud/compute/drivers/opennebula.py", line 113, in list_nodes
> 	    return self._to_nodes(self.connection.request('/compute').object)
> 	  File "/var/lib/service-manager/service-management-system/lib/apache-libcloud-0.5.2/libcloud/compute/drivers/opennebula.py", line 188, in _to_nodes
> 	    computes.append(self._to_node(compute))
> 	  File "/var/lib/service-manager/service-management-system/lib/apache-libcloud-0.5.2/libcloud/compute/drivers/opennebula.py", line 200, in _to_node
> 	    networks.append(element.attrib["ip"])
> 	KeyError: 'ip'
> Cause:
> 	for element in compute.findall("NIC"):
>             networks.append(element.attrib["ip"])
> OpenNebula/OCCI Compute Definition
> 	<COMPUTE href="http://www.opennebula.org/compute/32">
> 		<ID>32</ID>
> 		...
> 		<NIC>
> 		    <NETWORK href="http://www.opennebula.org/network/12"/>
> 		    <MAC>00:ff:72:31:23:17</MAC>
> 		    <IP>192.168.0.12</IP>
> 		    ...
> 		</NIC>
> 		...
> 	</COMPUTE>
> Conclusion:
> 	IP address information is not an attribute. Rather it's a child element of the NIC.
> Patch:
> 	With patch, the NIC information is returned correctly:
> 		<Node: uuid=894yf9823fh9, name=one-34, state=4, public_ip=['10.2.0.5', '10.2.2.3'], provider=OpenNebula ...>

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[dev] [jira] [Commented] (LIBCLOUD-117) OpenNebula Compute Network Description

Posted by "Tomaz Muraus (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/LIBCLOUD-117?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13125290#comment-13125290 ] 

Tomaz Muraus commented on LIBCLOUD-117:
---------------------------------------

I see. Yes, afaik OpenNebula driver is pretty old and hasn't been updated for a while.

I think we should do a similar thing which we did with OpenStack driver recently and support both versions - 1.4 and 3.0
                
> OpenNebula Compute Network Description
> --------------------------------------
>
>                 Key: LIBCLOUD-117
>                 URL: https://issues.apache.org/jira/browse/LIBCLOUD-117
>             Project: Libcloud
>          Issue Type: Bug
>          Components: Compute
>    Affects Versions: 0.5.2, 0.6.0
>         Environment: Debian Squeeze using 0.5.2 libcloud extracted archive file.
>            Reporter: Hutson Betts
>              Labels: patch
>             Fix For: 0.5.2, 0.6.0
>
>         Attachments: opennebula.network.error.py.patch
>
>   Original Estimate: 1h
>  Remaining Estimate: 1h
>
> An issue exists in the way the OpenNebula driver pulls the network IP address for a compute node. It causes the driver to fail every time.
> Function Call:
> 	cloudProvider.connection.list_nodes()
> Exception Output:
> 	Traceback (most recent call last):
> 	  File "test.py", line 65, in <module>
> 	    nodes[cloudProvider.host] = cloudProvider.connection.list_nodes()
> 	  File "/var/lib/service-manager/service-management-system/lib/apache-libcloud-0.5.2/libcloud/compute/drivers/opennebula.py", line 113, in list_nodes
> 	    return self._to_nodes(self.connection.request('/compute').object)
> 	  File "/var/lib/service-manager/service-management-system/lib/apache-libcloud-0.5.2/libcloud/compute/drivers/opennebula.py", line 188, in _to_nodes
> 	    computes.append(self._to_node(compute))
> 	  File "/var/lib/service-manager/service-management-system/lib/apache-libcloud-0.5.2/libcloud/compute/drivers/opennebula.py", line 200, in _to_node
> 	    networks.append(element.attrib["ip"])
> 	KeyError: 'ip'
> Cause:
> 	for element in compute.findall("NIC"):
>             networks.append(element.attrib["ip"])
> OpenNebula/OCCI Compute Definition
> 	<COMPUTE href="http://www.opennebula.org/compute/32">
> 		<ID>32</ID>
> 		...
> 		<NIC>
> 		    <NETWORK href="http://www.opennebula.org/network/12"/>
> 		    <MAC>00:ff:72:31:23:17</MAC>
> 		    <IP>192.168.0.12</IP>
> 		    ...
> 		</NIC>
> 		...
> 	</COMPUTE>
> Conclusion:
> 	IP address information is not an attribute. Rather it's a child element of the NIC.
> Patch:
> 	With patch, the NIC information is returned correctly:
> 		<Node: uuid=894yf9823fh9, name=one-34, state=4, public_ip=['10.2.0.5', '10.2.2.3'], provider=OpenNebula ...>

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[dev] [jira] [Commented] (LIBCLOUD-117) OpenNebula Compute Network Description

Posted by "Hutson Betts (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/LIBCLOUD-117?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13125268#comment-13125268 ] 

Hutson Betts commented on LIBCLOUD-117:
---------------------------------------

My testing was against an OpenNebula 2.2 installation I have running on a server. However OpenNebula 3.0 seems to be the same. The OpenNebula OCCI API can be found at: http://opennebula.org/documentation:rel3.0:occidd. In the "The Compute Resource" sub-section, it shows IP as a tag.

Was the test fixture designed against OpenNebula 1.4? In that version of OpenNebula "ip" was an attribute. That can be seen in their documentation as well: http://opennebula.org/documentation:archives:rel1.4:occidd under the "The Compute Resource" sub-section.

However, your fall-back solution is a better choice since it makes that section compatible with all versions of OpenNebula's OCCI API.
                
> OpenNebula Compute Network Description
> --------------------------------------
>
>                 Key: LIBCLOUD-117
>                 URL: https://issues.apache.org/jira/browse/LIBCLOUD-117
>             Project: Libcloud
>          Issue Type: Bug
>          Components: Compute
>    Affects Versions: 0.5.2, 0.6.0
>         Environment: Debian Squeeze using 0.5.2 libcloud extracted archive file.
>            Reporter: Hutson Betts
>              Labels: patch
>             Fix For: 0.5.2, 0.6.0
>
>         Attachments: opennebula.network.error.py.patch
>
>   Original Estimate: 1h
>  Remaining Estimate: 1h
>
> An issue exists in the way the OpenNebula driver pulls the network IP address for a compute node. It causes the driver to fail every time.
> Function Call:
> 	cloudProvider.connection.list_nodes()
> Exception Output:
> 	Traceback (most recent call last):
> 	  File "test.py", line 65, in <module>
> 	    nodes[cloudProvider.host] = cloudProvider.connection.list_nodes()
> 	  File "/var/lib/service-manager/service-management-system/lib/apache-libcloud-0.5.2/libcloud/compute/drivers/opennebula.py", line 113, in list_nodes
> 	    return self._to_nodes(self.connection.request('/compute').object)
> 	  File "/var/lib/service-manager/service-management-system/lib/apache-libcloud-0.5.2/libcloud/compute/drivers/opennebula.py", line 188, in _to_nodes
> 	    computes.append(self._to_node(compute))
> 	  File "/var/lib/service-manager/service-management-system/lib/apache-libcloud-0.5.2/libcloud/compute/drivers/opennebula.py", line 200, in _to_node
> 	    networks.append(element.attrib["ip"])
> 	KeyError: 'ip'
> Cause:
> 	for element in compute.findall("NIC"):
>             networks.append(element.attrib["ip"])
> OpenNebula/OCCI Compute Definition
> 	<COMPUTE href="http://www.opennebula.org/compute/32">
> 		<ID>32</ID>
> 		...
> 		<NIC>
> 		    <NETWORK href="http://www.opennebula.org/network/12"/>
> 		    <MAC>00:ff:72:31:23:17</MAC>
> 		    <IP>192.168.0.12</IP>
> 		    ...
> 		</NIC>
> 		...
> 	</COMPUTE>
> Conclusion:
> 	IP address information is not an attribute. Rather it's a child element of the NIC.
> Patch:
> 	With patch, the NIC information is returned correctly:
> 		<Node: uuid=894yf9823fh9, name=one-34, state=4, public_ip=['10.2.0.5', '10.2.2.3'], provider=OpenNebula ...>

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[dev] [jira] [Commented] (LIBCLOUD-117) OpenNebula Compute Network Description

Posted by "Tomaz Muraus (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/LIBCLOUD-117?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13125705#comment-13125705 ] 

Tomaz Muraus commented on LIBCLOUD-117:
---------------------------------------

Yes, I think the first step would be to create three new classes:

- OpenNebulaBaseNodeDriver (common functionality)
- OpenNebula13NodeDriver (or whatever the version is)
- OpenNebula30NodeDriver (inherits from base, provided 3.0 specific stuff)

After we have that we should also modify OpenNebulaNodeDriver constructor method. Modified construct method should take "version" as the last argument and then instantiate a correct class (basically it will act as a factory method).

This last class is also not so important and I can finish it when the first three classes are sorted out.

Let me know if you have any questions or need help.
                
> OpenNebula Compute Network Description
> --------------------------------------
>
>                 Key: LIBCLOUD-117
>                 URL: https://issues.apache.org/jira/browse/LIBCLOUD-117
>             Project: Libcloud
>          Issue Type: Bug
>          Components: Compute
>    Affects Versions: 0.5.2, 0.6.0
>         Environment: Debian Squeeze using 0.5.2 libcloud extracted archive file.
>            Reporter: Hutson Betts
>              Labels: patch
>             Fix For: 0.6.0
>
>         Attachments: opennebula.network.error.py.patch
>
>   Original Estimate: 1h
>  Remaining Estimate: 1h
>
> An issue exists in the way the OpenNebula driver pulls the network IP address for a compute node. It causes the driver to fail every time.
> Function Call:
> 	cloudProvider.connection.list_nodes()
> Exception Output:
> 	Traceback (most recent call last):
> 	  File "test.py", line 65, in <module>
> 	    nodes[cloudProvider.host] = cloudProvider.connection.list_nodes()
> 	  File "/var/lib/service-manager/service-management-system/lib/apache-libcloud-0.5.2/libcloud/compute/drivers/opennebula.py", line 113, in list_nodes
> 	    return self._to_nodes(self.connection.request('/compute').object)
> 	  File "/var/lib/service-manager/service-management-system/lib/apache-libcloud-0.5.2/libcloud/compute/drivers/opennebula.py", line 188, in _to_nodes
> 	    computes.append(self._to_node(compute))
> 	  File "/var/lib/service-manager/service-management-system/lib/apache-libcloud-0.5.2/libcloud/compute/drivers/opennebula.py", line 200, in _to_node
> 	    networks.append(element.attrib["ip"])
> 	KeyError: 'ip'
> Cause:
> 	for element in compute.findall("NIC"):
>             networks.append(element.attrib["ip"])
> OpenNebula/OCCI Compute Definition
> 	<COMPUTE href="http://www.opennebula.org/compute/32">
> 		<ID>32</ID>
> 		...
> 		<NIC>
> 		    <NETWORK href="http://www.opennebula.org/network/12"/>
> 		    <MAC>00:ff:72:31:23:17</MAC>
> 		    <IP>192.168.0.12</IP>
> 		    ...
> 		</NIC>
> 		...
> 	</COMPUTE>
> Conclusion:
> 	IP address information is not an attribute. Rather it's a child element of the NIC.
> Patch:
> 	With patch, the NIC information is returned correctly:
> 		<Node: uuid=894yf9823fh9, name=one-34, state=4, public_ip=['10.2.0.5', '10.2.2.3'], provider=OpenNebula ...>

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[dev] [jira] [Resolved] (LIBCLOUD-117) OpenNebula Compute Network Description

Posted by "Tomaz Muraus (Resolved) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/LIBCLOUD-117?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Tomaz Muraus resolved LIBCLOUD-117.
-----------------------------------

       Resolution: Fixed
    Fix Version/s:     (was: 0.5.2)
    
> OpenNebula Compute Network Description
> --------------------------------------
>
>                 Key: LIBCLOUD-117
>                 URL: https://issues.apache.org/jira/browse/LIBCLOUD-117
>             Project: Libcloud
>          Issue Type: Bug
>          Components: Compute
>    Affects Versions: 0.5.2, 0.6.0
>         Environment: Debian Squeeze using 0.5.2 libcloud extracted archive file.
>            Reporter: Hutson Betts
>              Labels: patch
>             Fix For: 0.6.0
>
>         Attachments: opennebula.network.error.py.patch
>
>   Original Estimate: 1h
>  Remaining Estimate: 1h
>
> An issue exists in the way the OpenNebula driver pulls the network IP address for a compute node. It causes the driver to fail every time.
> Function Call:
> 	cloudProvider.connection.list_nodes()
> Exception Output:
> 	Traceback (most recent call last):
> 	  File "test.py", line 65, in <module>
> 	    nodes[cloudProvider.host] = cloudProvider.connection.list_nodes()
> 	  File "/var/lib/service-manager/service-management-system/lib/apache-libcloud-0.5.2/libcloud/compute/drivers/opennebula.py", line 113, in list_nodes
> 	    return self._to_nodes(self.connection.request('/compute').object)
> 	  File "/var/lib/service-manager/service-management-system/lib/apache-libcloud-0.5.2/libcloud/compute/drivers/opennebula.py", line 188, in _to_nodes
> 	    computes.append(self._to_node(compute))
> 	  File "/var/lib/service-manager/service-management-system/lib/apache-libcloud-0.5.2/libcloud/compute/drivers/opennebula.py", line 200, in _to_node
> 	    networks.append(element.attrib["ip"])
> 	KeyError: 'ip'
> Cause:
> 	for element in compute.findall("NIC"):
>             networks.append(element.attrib["ip"])
> OpenNebula/OCCI Compute Definition
> 	<COMPUTE href="http://www.opennebula.org/compute/32">
> 		<ID>32</ID>
> 		...
> 		<NIC>
> 		    <NETWORK href="http://www.opennebula.org/network/12"/>
> 		    <MAC>00:ff:72:31:23:17</MAC>
> 		    <IP>192.168.0.12</IP>
> 		    ...
> 		</NIC>
> 		...
> 	</COMPUTE>
> Conclusion:
> 	IP address information is not an attribute. Rather it's a child element of the NIC.
> Patch:
> 	With patch, the NIC information is returned correctly:
> 		<Node: uuid=894yf9823fh9, name=one-34, state=4, public_ip=['10.2.0.5', '10.2.2.3'], provider=OpenNebula ...>

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[dev] [jira] [Issue Comment Edited] (LIBCLOUD-117) OpenNebula Compute Network Description

Posted by "Tomaz Muraus (Issue Comment Edited) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/LIBCLOUD-117?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13125252#comment-13125252 ] 

Tomaz Muraus edited comment on LIBCLOUD-117 at 10/11/11 6:27 PM:
-----------------------------------------------------------------

I checked our test fixtures and it looks like "IP" is an attribute there, not a separate tag.

Which version of the OpenNebula API are you hitting?

In any case, I have commited a patch which should fix it - r1182002 - http://svn.apache.org/viewvc/libcloud/trunk/libcloud/compute/drivers/opennebula.py?view=diff&r1=1182001&r2=1182002&pathrev=1182002 (prefer "ip" attribute, if not specified, fall back to "IP" tag).

Thanks.
                
      was (Author: kami):
    I checked our test fixtures and it looks like "IP" is an attribute there, not a separate tag.

Which version of the OpenNebula API are you hitting?

In any case, I have commited a patch which should fix it - [r1182002|http://svn.apache.org/viewvc/libcloud/trunk/libcloud/compute/drivers/opennebula.py?view=diff&r1=1182001&r2=1182002&pathrev=1182002] (prefer "ip" attribute, if not specified, fall back to "IP" tag).

Thanks.
                  
> OpenNebula Compute Network Description
> --------------------------------------
>
>                 Key: LIBCLOUD-117
>                 URL: https://issues.apache.org/jira/browse/LIBCLOUD-117
>             Project: Libcloud
>          Issue Type: Bug
>          Components: Compute
>    Affects Versions: 0.5.2, 0.6.0
>         Environment: Debian Squeeze using 0.5.2 libcloud extracted archive file.
>            Reporter: Hutson Betts
>              Labels: patch
>             Fix For: 0.5.2, 0.6.0
>
>         Attachments: opennebula.network.error.py.patch
>
>   Original Estimate: 1h
>  Remaining Estimate: 1h
>
> An issue exists in the way the OpenNebula driver pulls the network IP address for a compute node. It causes the driver to fail every time.
> Function Call:
> 	cloudProvider.connection.list_nodes()
> Exception Output:
> 	Traceback (most recent call last):
> 	  File "test.py", line 65, in <module>
> 	    nodes[cloudProvider.host] = cloudProvider.connection.list_nodes()
> 	  File "/var/lib/service-manager/service-management-system/lib/apache-libcloud-0.5.2/libcloud/compute/drivers/opennebula.py", line 113, in list_nodes
> 	    return self._to_nodes(self.connection.request('/compute').object)
> 	  File "/var/lib/service-manager/service-management-system/lib/apache-libcloud-0.5.2/libcloud/compute/drivers/opennebula.py", line 188, in _to_nodes
> 	    computes.append(self._to_node(compute))
> 	  File "/var/lib/service-manager/service-management-system/lib/apache-libcloud-0.5.2/libcloud/compute/drivers/opennebula.py", line 200, in _to_node
> 	    networks.append(element.attrib["ip"])
> 	KeyError: 'ip'
> Cause:
> 	for element in compute.findall("NIC"):
>             networks.append(element.attrib["ip"])
> OpenNebula/OCCI Compute Definition
> 	<COMPUTE href="http://www.opennebula.org/compute/32">
> 		<ID>32</ID>
> 		...
> 		<NIC>
> 		    <NETWORK href="http://www.opennebula.org/network/12"/>
> 		    <MAC>00:ff:72:31:23:17</MAC>
> 		    <IP>192.168.0.12</IP>
> 		    ...
> 		</NIC>
> 		...
> 	</COMPUTE>
> Conclusion:
> 	IP address information is not an attribute. Rather it's a child element of the NIC.
> Patch:
> 	With patch, the NIC information is returned correctly:
> 		<Node: uuid=894yf9823fh9, name=one-34, state=4, public_ip=['10.2.0.5', '10.2.2.3'], provider=OpenNebula ...>

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[dev] [jira] [Commented] (LIBCLOUD-117) OpenNebula Compute Network Description

Posted by "Hutson Betts (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/LIBCLOUD-117?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13125303#comment-13125303 ] 

Hutson Betts commented on LIBCLOUD-117:
---------------------------------------

Well, if it's simply renaming all class names to reflect the version of the API, I can create a new ticket associated with that task, and start work on it.

As for this ticket. Your commit resolves the issue for now. 
                
> OpenNebula Compute Network Description
> --------------------------------------
>
>                 Key: LIBCLOUD-117
>                 URL: https://issues.apache.org/jira/browse/LIBCLOUD-117
>             Project: Libcloud
>          Issue Type: Bug
>          Components: Compute
>    Affects Versions: 0.5.2, 0.6.0
>         Environment: Debian Squeeze using 0.5.2 libcloud extracted archive file.
>            Reporter: Hutson Betts
>              Labels: patch
>             Fix For: 0.5.2, 0.6.0
>
>         Attachments: opennebula.network.error.py.patch
>
>   Original Estimate: 1h
>  Remaining Estimate: 1h
>
> An issue exists in the way the OpenNebula driver pulls the network IP address for a compute node. It causes the driver to fail every time.
> Function Call:
> 	cloudProvider.connection.list_nodes()
> Exception Output:
> 	Traceback (most recent call last):
> 	  File "test.py", line 65, in <module>
> 	    nodes[cloudProvider.host] = cloudProvider.connection.list_nodes()
> 	  File "/var/lib/service-manager/service-management-system/lib/apache-libcloud-0.5.2/libcloud/compute/drivers/opennebula.py", line 113, in list_nodes
> 	    return self._to_nodes(self.connection.request('/compute').object)
> 	  File "/var/lib/service-manager/service-management-system/lib/apache-libcloud-0.5.2/libcloud/compute/drivers/opennebula.py", line 188, in _to_nodes
> 	    computes.append(self._to_node(compute))
> 	  File "/var/lib/service-manager/service-management-system/lib/apache-libcloud-0.5.2/libcloud/compute/drivers/opennebula.py", line 200, in _to_node
> 	    networks.append(element.attrib["ip"])
> 	KeyError: 'ip'
> Cause:
> 	for element in compute.findall("NIC"):
>             networks.append(element.attrib["ip"])
> OpenNebula/OCCI Compute Definition
> 	<COMPUTE href="http://www.opennebula.org/compute/32">
> 		<ID>32</ID>
> 		...
> 		<NIC>
> 		    <NETWORK href="http://www.opennebula.org/network/12"/>
> 		    <MAC>00:ff:72:31:23:17</MAC>
> 		    <IP>192.168.0.12</IP>
> 		    ...
> 		</NIC>
> 		...
> 	</COMPUTE>
> Conclusion:
> 	IP address information is not an attribute. Rather it's a child element of the NIC.
> Patch:
> 	With patch, the NIC information is returned correctly:
> 		<Node: uuid=894yf9823fh9, name=one-34, state=4, public_ip=['10.2.0.5', '10.2.2.3'], provider=OpenNebula ...>

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[dev] [jira] [Closed] (LIBCLOUD-117) OpenNebula Compute Network Description

Posted by "Tomaz Muraus (Closed) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/LIBCLOUD-117?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Tomaz Muraus closed LIBCLOUD-117.
---------------------------------

    
> OpenNebula Compute Network Description
> --------------------------------------
>
>                 Key: LIBCLOUD-117
>                 URL: https://issues.apache.org/jira/browse/LIBCLOUD-117
>             Project: Libcloud
>          Issue Type: Bug
>          Components: Compute
>    Affects Versions: 0.5.2, 0.6.0
>         Environment: Debian Squeeze using 0.5.2 libcloud extracted archive file.
>            Reporter: Hutson Betts
>              Labels: patch
>             Fix For: 0.6.0
>
>         Attachments: opennebula.network.error.py.patch
>
>   Original Estimate: 1h
>  Remaining Estimate: 1h
>
> An issue exists in the way the OpenNebula driver pulls the network IP address for a compute node. It causes the driver to fail every time.
> Function Call:
> 	cloudProvider.connection.list_nodes()
> Exception Output:
> 	Traceback (most recent call last):
> 	  File "test.py", line 65, in <module>
> 	    nodes[cloudProvider.host] = cloudProvider.connection.list_nodes()
> 	  File "/var/lib/service-manager/service-management-system/lib/apache-libcloud-0.5.2/libcloud/compute/drivers/opennebula.py", line 113, in list_nodes
> 	    return self._to_nodes(self.connection.request('/compute').object)
> 	  File "/var/lib/service-manager/service-management-system/lib/apache-libcloud-0.5.2/libcloud/compute/drivers/opennebula.py", line 188, in _to_nodes
> 	    computes.append(self._to_node(compute))
> 	  File "/var/lib/service-manager/service-management-system/lib/apache-libcloud-0.5.2/libcloud/compute/drivers/opennebula.py", line 200, in _to_node
> 	    networks.append(element.attrib["ip"])
> 	KeyError: 'ip'
> Cause:
> 	for element in compute.findall("NIC"):
>             networks.append(element.attrib["ip"])
> OpenNebula/OCCI Compute Definition
> 	<COMPUTE href="http://www.opennebula.org/compute/32">
> 		<ID>32</ID>
> 		...
> 		<NIC>
> 		    <NETWORK href="http://www.opennebula.org/network/12"/>
> 		    <MAC>00:ff:72:31:23:17</MAC>
> 		    <IP>192.168.0.12</IP>
> 		    ...
> 		</NIC>
> 		...
> 	</COMPUTE>
> Conclusion:
> 	IP address information is not an attribute. Rather it's a child element of the NIC.
> Patch:
> 	With patch, the NIC information is returned correctly:
> 		<Node: uuid=894yf9823fh9, name=one-34, state=4, public_ip=['10.2.0.5', '10.2.2.3'], provider=OpenNebula ...>

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[dev] [jira] [Commented] (LIBCLOUD-117) OpenNebula Compute Network Description

Posted by "Tomaz Muraus (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/LIBCLOUD-117?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13125252#comment-13125252 ] 

Tomaz Muraus commented on LIBCLOUD-117:
---------------------------------------

I checked our test fixtures and it looks like "IP" is an attribute there, not a separate tag.

Which version of the OpenNebula API are you hitting?

In any case, I have commited a patch which should fix it - [r1182002|http://svn.apache.org/viewvc/libcloud/trunk/libcloud/compute/drivers/opennebula.py?view=diff&r1=1182001&r2=1182002&pathrev=1182002] (prefer "ip" attribute, if not specified, fall back to "IP" tag).

Thanks.
                
> OpenNebula Compute Network Description
> --------------------------------------
>
>                 Key: LIBCLOUD-117
>                 URL: https://issues.apache.org/jira/browse/LIBCLOUD-117
>             Project: Libcloud
>          Issue Type: Bug
>          Components: Compute
>    Affects Versions: 0.5.2, 0.6.0
>         Environment: Debian Squeeze using 0.5.2 libcloud extracted archive file.
>            Reporter: Hutson Betts
>              Labels: patch
>             Fix For: 0.5.2, 0.6.0
>
>         Attachments: opennebula.network.error.py.patch
>
>   Original Estimate: 1h
>  Remaining Estimate: 1h
>
> An issue exists in the way the OpenNebula driver pulls the network IP address for a compute node. It causes the driver to fail every time.
> Function Call:
> 	cloudProvider.connection.list_nodes()
> Exception Output:
> 	Traceback (most recent call last):
> 	  File "test.py", line 65, in <module>
> 	    nodes[cloudProvider.host] = cloudProvider.connection.list_nodes()
> 	  File "/var/lib/service-manager/service-management-system/lib/apache-libcloud-0.5.2/libcloud/compute/drivers/opennebula.py", line 113, in list_nodes
> 	    return self._to_nodes(self.connection.request('/compute').object)
> 	  File "/var/lib/service-manager/service-management-system/lib/apache-libcloud-0.5.2/libcloud/compute/drivers/opennebula.py", line 188, in _to_nodes
> 	    computes.append(self._to_node(compute))
> 	  File "/var/lib/service-manager/service-management-system/lib/apache-libcloud-0.5.2/libcloud/compute/drivers/opennebula.py", line 200, in _to_node
> 	    networks.append(element.attrib["ip"])
> 	KeyError: 'ip'
> Cause:
> 	for element in compute.findall("NIC"):
>             networks.append(element.attrib["ip"])
> OpenNebula/OCCI Compute Definition
> 	<COMPUTE href="http://www.opennebula.org/compute/32">
> 		<ID>32</ID>
> 		...
> 		<NIC>
> 		    <NETWORK href="http://www.opennebula.org/network/12"/>
> 		    <MAC>00:ff:72:31:23:17</MAC>
> 		    <IP>192.168.0.12</IP>
> 		    ...
> 		</NIC>
> 		...
> 	</COMPUTE>
> Conclusion:
> 	IP address information is not an attribute. Rather it's a child element of the NIC.
> Patch:
> 	With patch, the NIC information is returned correctly:
> 		<Node: uuid=894yf9823fh9, name=one-34, state=4, public_ip=['10.2.0.5', '10.2.2.3'], provider=OpenNebula ...>

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira