deltacloud-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Michal Fojtik (JIRA)" <>
Subject [jira] [Commented] (DTACLOUD-328) Instance state is not updated properly when stopping an openstack instance
Date Tue, 25 Sep 2012 14:40:07 GMT


Michal Fojtik commented on DTACLOUD-328:

After conversation with OpenStack guys:

* The native OpenStack API is quite weak in reporting proper status after operations
* OpenStack lack explicit way how to query progress of async operations (DELETE and STOP are
async operations)
* Generally the progress can only be queried implicitly by polling the resource state
* In some cases there is 'Task' associated to the action which we can query for the 'state'
and report that as a instance state
* Even that is not 100% consistent.

So what we can do here:

* Wait until they fix it (but maybe it will not be fixed as most of them consider this as
a normal behaviour)
* Fix it on Deltacloud API side using state tracking (basically store the state to local database
after action)
* Document this as a OpenStack behaviour and let client to query the instance after operation.

I'm not like any of these three options, so if someone has better idea... ;-)
> Instance state is not updated properly when stopping an openstack instance
> --------------------------------------------------------------------------
>                 Key: DTACLOUD-328
>                 URL:
>             Project: DeltaCloud
>          Issue Type: Bug
>         Environment: deltacloud from git repo (last commit 4d019838dec68c4ce50e1311129932cebf185577)
> + applied manually marios's patch:
> rubygem-deltacloud-client-0.5.0-3.fc17.noarch
>            Reporter: Jan Provaznik
>            Assignee: Michal Fojtik
> when I try to stop running openstack instance, instance's state should be set to 'stopped'
after successful call, but the state is not updated at all:
> irb(main):004:0> i.send('stop!')
> => [{:method_name=>"stopped?", :type=>:state, :state=>"STOPPED"}, {:method_name=>"running?",
:type=>:state, :state=>"RUNNING"}, {:method_name=>"pending?", :type=>:state, :state=>"PENDING"},
{:method_name=>"shutting_down?", :type=>:state, :state=>"SHUTTING_DOWN"}, {:type=>:text,
:method_name=>"name", :value=>"os1-6-openstack-import"}, {:type=>:text, :method_name=>"owner_id",
:value=>"jprovazn"}, {:type=>:link, :method_name=>"image", :id=>"1dc5da85-81f3-4077-abc8-f6e9bed9f3f6"},
{:type=>:text, :method_name=>"image_id", :value=>"1dc5da85-81f3-4077-abc8-f6e9bed9f3f6"},
{:type=>:link, :method_name=>"realm", :id=>"default"}, {:type=>:text, :method_name=>"realm_id",
:value=>"default"}, {:type=>:text, :method_name=>"state", :value=>"RUNNING"},
{:type=>:link, :method_name=>"hardware_profile", :id=>"2"}, {:type=>:text, :method_name=>"hardware_profile_id",
:value=>"2"}, {:type=>:collection, :method_name=>"public_addresses", :values=>[]},
{:type=>:collection, :method_name=>"private_addresses", :values=>[{:address=>"",
:type=>"ipv4"}, {:address=>"", :type=>"ipv4"}]}, {:type=>:text, :method_name=>"storage_volumes",
:value=>""}, {:type=>:collection, :method_name=>"authentication", :values=>{:key=>"os1-6_openstack-import_1348570306_key_59713380"}},
{:type=>:action_link, :method_name=>"reboot!", :id=>"00cd5dfd-6788-4fd5-94a1-d83462445c18",
:rel=>"reboot", :method=>"post"}, {:type=>:action_link, :method_name=>"stop!",
:id=>"00cd5dfd-6788-4fd5-94a1-d83462445c18", :href=>"http://localhost:3002/api/instances/00cd5dfd-6788-4fd5-94a1-d83462445c18/stop",
:rel=>"stop", :method=>"post"}, {:type=>:action_link, :method_name=>"create_image!",
:id=>"00cd5dfd-6788-4fd5-94a1-d83462445c18", :href=>"http://localhost:3002/api/create_image;instance_id=00cd5dfd-6788-4fd5-94a1-d83462445c18",
:rel=>"create_image", :method=>"post"}]
> irb(main):005:0> i.state
> => "RUNNING"

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see:

View raw message