On Jul 30, 2012, at 3:35 PM, Kevin L. Mitchell <kevin.mitch...@rackspace.com> 
wrote:

> On Mon, 2012-07-30 at 14:25 -0500, Chris Behrens wrote:
>> You may still have to reset the instance's task_state to NULL in the
>> DB (instances table) to delete ones already in this state.
> 
> No, I fixed the state problem with soft_delete(); as long as he updates,
> delete should work fine.
> 
> That said, be aware that there is a "reset-state" command to novaclient,
> so that you can do Chris's recommended reset without having to muck
> around with the database directly.
> -- 
> Kevin L. Mitchell <kevin.mitch...@rackspace.com>



From the python-novaclient tests, it looks like  "nova reset-state <instance>" 
puts an instance into the error state or (with the --active) flag into the 
active state:

    def test_reset_state(self):
        self.run_command('reset-state sample-server')
        self.assert_called('POST', '/servers/1234/action',
                           {'os-resetState': {'state': 'error'}})
        self.run_command('reset-state sample-server --active')
        self.assert_called('POST', '/servers/1234/action',
                           {'os-resetState': {'state': 'active'}})


What's the use case for resetting an instance to the error state? Is the idea 
to do:

nova reset-state <instance>
nova delete <instance>



Take care,

Lorin
--
Lorin Hochstein
Lead Architect - Cloud Services
Nimbis Services, Inc.
www.nimbisservices.com





Attachment: smime.p7s
Description: S/MIME cryptographic signature

_______________________________________________
Mailing list: https://launchpad.net/~openstack
Post to     : openstack@lists.launchpad.net
Unsubscribe : https://launchpad.net/~openstack
More help   : https://help.launchpad.net/ListHelp

Reply via email to