OpenStack Terminate Instances #275

Closed
retr0h opened this Issue Jul 25, 2011 · 0 comments

Comments

Projects
None yet
2 participants

retr0h commented Jul 25, 2011

I am attempting to stop a running instance via:

image = self.connection.get_all_images(image_ids=[image_id])[0]
reservation = image.run()
instance = reservation.instances[0] 
instance.stop()

And receive the following error:

Traceback (most recent call last):
  File "/Users/jdewey/.virtualenvs/poolpyrty/lib/python2.6/site-packages/nose/case.py", 
line 187, in runTest
    self.test(*self.arg)
  File "/Users/jdewey/git/poolpyrty/tests/cloud_tests.py", line 40, in test_creates_an_instance
    instances = c.run_instances()
  File "/Users/jdewey/git/poolpyrty/poolpyrty/cloud.py", line 38, in run_instances
    instance.stop()
  File "/Users/jdewey/.virtualenvs/poolpyrty/lib/python2.6/site-packages/boto/ec2/instance.py", line 212, in stop
    self._update(rs[0])
IndexError: list index out of range

It looks as though the response differs from the AWS spec:

http://docs.amazonwebservices.com/AWSEC2/2009-08-15/APIReference/index.html?ApiReference-query-TerminateInstances.html

I am seeing the following:

boto: DEBUG: <?xml version="1.0" ?><TerminateInstancesResponse xmlns="http://ec2.amazona
ws.com/doc/2009-11-30/"><requestId>LVXA0Z5-T26XOJDTRMXW</requestId><return>true</return>
</TerminateInstancesResponse>

OpenStack tends to do this throughout their EC2 API (sad). Not sure if this is something you are interesting in fixing in boto, but thought I would report it.

@ghost ghost assigned garnaat Jul 25, 2011

@garnaat garnaat closed this in 4283ab4 Jul 25, 2011

msabramo pushed a commit to msabramo/boto that referenced this issue Nov 28, 2012

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment