You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@libcloud.apache.org by "Rick Bross (JIRA)" <ji...@apache.org> on 2011/08/07 18:10:28 UTC

[dev] [jira] [Commented] (LIBCLOUD-105) "list_nodes" on Eucalytus forces a "500 Internal Server Error"

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

Rick Bross commented on LIBCLOUD-105:
-------------------------------------

Note that this issue only manifests itself if there is a single instance in the node list in the "Running" state.  This seems to point to an issue in the "shortcut" filter code in ec2.py:

        if len(nodes) == 1:
            params.update({
                'Filter.0.Name': 'instance-id',
                'Filter.0.Value.0': nodes[0].id
            })

> "list_nodes" on Eucalytus forces a "500 Internal Server Error"
> --------------------------------------------------------------
>
>                 Key: LIBCLOUD-105
>                 URL: https://issues.apache.org/jira/browse/LIBCLOUD-105
>             Project: Libcloud
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 0.5.2
>         Environment: Eucalyptus 1.6, Python 2.7.1, Ubuntu 11.04
>            Reporter: Rick Bross
>             Fix For: 0.5.2
>
>
> Note that in the debug log below, when calling "list_nodes" the "DescribeInstances" call is successful.  But "list_nodes" then goes on to do an additional (and unnecessary?) "DescribeAddresse" call which causes the error.
>  
> CODE:
> logfile = open('/home/user/lc.log', "a")
> enable_debug(logfile)	
> EC2_ACCESS_ID    = 'WKy3rMzOWPouVOxK1p3Ar1C2uRBwa2FBXnCw'
> EC2_SECRET_KEY    = 'QhVkQMPZXd6i6qVH8tkIEqGmdVGkk1cuzJEgg'
> EUCDriver     = get_driver(Provider.EUCALYPTUS)
> conn = EUCDriver(EC2_ACCESS_ID, secret=EC2_SECRET_KEY, host="192.168.0.170", secure=False, port=8773, path="/services/Eucalyptus")
> # This should iterate over driver types and create a generic list of nodes with required fields
> nodes = []
> nodes += conn.list_nodes()
> OUTPUT:
> ./cloud_list_instances_lc
> Traceback (most recent call last):
>   File "./cloud_list_instances_lc", line 77, in <module>
>     nodes += conn.list_nodes()
>   File "/usr/local/lib/python2.7/dist-packages/libcloud/compute/drivers/ec2.py", line 399, in list_nodes
>     nodes_elastic_ips_mappings = self.ex_describe_addresses(nodes)
>   File "/usr/local/lib/python2.7/dist-packages/libcloud/compute/drivers/ec2.py", line 718, in ex_describe_addresses
>     params=params.copy()).object
>   File "/usr/local/lib/python2.7/dist-packages/libcloud/common/base.py", line 397, in request
>     response = self.responseCls(self.connection.getresponse())
>   File "/usr/local/lib/python2.7/dist-packages/libcloud/common/base.py", line 48, in __init__
>     raise Exception(self.parse_error())
>   File "/usr/local/lib/python2.7/dist-packages/libcloud/compute/drivers/ec2.py", line 173, in parse_error
>     body=self.body, driver=EC2NodeDriver)
> libcloud.common.types.MalformedResponseError: <MalformedResponseException in <class 'libcloud.compute.drivers.ec2.EC2NodeDriver'> 'Failed to parse XML'>: 'Failure: 500 Internal Server Error\r\n'
> DEBUG LOG:
> # -------- begin 27979720 request ----------
> curl -i -X GET -H 'Host: 192.168.0.170' -H 'X-LC-Request-ID: 27979720' -H 'Content-Length: 0' -H 'User-Agent: libcloud/0.5.2 (Eucalyptus)' 'https://192.168.0.170:8773/services/Eucalyptus?SignatureVersion=2&AWSAccessKeyId=WKy3rMzOWPouVOxK1p3Ar1C2uRBwa2FBXnCw&Timestamp=2011-08-07T15%3A25%3A43Z&SignatureMethod=HmacSHA256&Version=2010-08-31&Signature=k1GaQ%2FFE0zFpqvaheoe%2Fty7uK6ZMBYMhQXvnF3xwQGA%3D&Action=DescribeInstances'
> # -------- begin 27979720:27694864 response ----------
> HTTP/1.1 200 OK
> Content-Length: 948
> Content-Type: application/xml; charset=UTF-8
> <DescribeInstancesResponse xmlns="http://ec2.amazonaws.com/doc/2010-08-31/"><requestId>e1fde092-47d6-4e3c-8fa2-02dd4d6d1236</requestId><reservationSet><item><reservationId>r-386506D4</reservationId><ownerId>admin</ownerId><groupSet><item><groupId>default</groupId></item><item><groupId>default</groupId></item></groupSet><instancesSet><item><instanceId>i-44DE06B7</instanceId><imageId>emi-7E900EF7</imageId><instanceState><code>16</code><name>running</name></instanceState><privateDnsName>172.19.1.2</privateDnsName><dnsName>192.168.0.172</dnsName><keyName/><amiLaunchIndex>0</amiLaunchIndex><productCodes/><instanceType>m1.small</instanceType><launchTime>2011-08-05T19:17:22.307Z</launchTime><placement><availabilityZone>cluster1</availabilityZone></placement><kernelId>eki-9FB013D3</kernelId><ramdiskId>eri-DCC714AF</ramdiskId><monitoring><state>false</state></monitoring></item></instancesSet></item></reservationSet></DescribeInstancesResponse>
> # -------- end 27979720:27694864 response ----------
> # -------- begin 28454992 request ----------
> curl -i -X GET -H 'Host: 192.168.0.170' -H 'X-LC-Request-ID: 28454992' -H 'Content-Length: 0' -H 'User-Agent: libcloud/0.5.2 (Eucalyptus)' 'https://192.168.0.170:8773/services/Eucalyptus?SignatureVersion=2&AWSAccessKeyId=WKy3rMzOWPouVOxK1p3Ar1C2uRBwa2FBXnCw&Timestamp=2011-08-07T15%3A25%3A43Z&Filter.0.Name=instance-id&SignatureMethod=HmacSHA256&Version=2010-08-31&Signature=1xHgKxs3rgOC0by1fV73wUyylcctLoxhB4yBvaKt%2BSU%3D&Action=DescribeAddresses&Filter.0.Value.0=i-44DE06B7'
> # -------- begin 28454992:27979720 response ----------
> HTTP/1.1 500 Internal Server Error
> Content-Type: text/plain; charset=UTF-8
> Failure: 500 Internal Server Error
> # -------- end 28454992:27979720 response ----------

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira