Understand that. I think the current situation may be reasonable. If Cinder API calling will lead to un-expected status, and need force-detach to restore the volume status back to normal, that means it's some issue we need to fix in Cinder.
Best Regards Chaoyi Huang (joehuang) ________________________________ From: Duncan Thomas [duncan.tho...@gmail.com] Sent: 19 September 2016 21:28 To: OpenStack Development Mailing List Subject: Re: [openstack-dev] [cinder]tempest test case for force detach volume Writing a sensible test for this api is rather tricky, since it is intended to clean up one very specific error condition, and has few guarantees about the state it leaves the system in. It is provided as a tool to allow the system administrator to clean up certain faults and situations without needing to manually effort the database, however the conditions under which it is safe to use, and the cleanup actions that are required after calling it, vary between backends. The only test I can think of that is probably safe across all backends is to call reserve, create_export, reset then delete. (All directly against the cinder endpoint with no Nova involvement). There is a substantial danger in the thinking that this call is any sort of generic fixup - it will happily leave volumes attached behind the scenes, open to data corruption. On 18 Sep 2016 05:48, "joehuang" <joehu...@huawei.com<mailto:joehu...@huawei.com>> wrote: Hello, Ken, Thank you for your information, for APIs without tempest test cases, it's due to hard to build the test environment, or it's just for the API is not mature enough? I want to know why the tempest test cases were not added at the same time when the features were implemented. Best Regards Chaoyi Huang(joehuang) ________________________________________ From: Ken'ichi Ohmichi [ken1ohmi...@gmail.com<mailto:ken1ohmi...@gmail.com>] Sent: 15 September 2016 2:02 To: OpenStack Development Mailing List (not for usage questions) Subject: Re: [openstack-dev] [cinder]tempest test case for force detach volume Hi Chaoyi, That is a nice point. Now Tempest have tests for some volume v2 action APIs which doesn't contain os-force_detach. The available APIs of tempest are two: os-set_image_metadata and os-unset_image_metadata like https://github.com/openstack/tempest/blob/master/tempest/services/volume/v2/json/volumes_client.py#L27 That is less than I expected by comparing the API reference. The corresponding API tests' patches are welcome if interested in :-) Thanks Ken Ohmichi --- 2016-09-13 17:58 GMT-07:00 joehuang <joehu...@huawei.com<mailto:joehu...@huawei.com>>: > Hello, > > Is there ant tempest test case for "os-force_detach" action to force detach > a volume? I didn't find such a test case both in the repository > https://github.com/openstack/cinder/tree/master/cinder/tests/tempest > and https://github.com/openstack/tempest > > The API link is: > http://developer.openstack.org/api-ref-blockstorage-v2.html#forcedetachVolume > > Best Regards > Chaoyi Huang(joehuang) > > > __________________________________________________________________________ > OpenStack Development Mailing List (not for usage questions) > Unsubscribe: > openstack-dev-requ...@lists.openstack.org?subject:unsubscribe<http://openstack-dev-requ...@lists.openstack.org?subject:unsubscribe> > http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev > __________________________________________________________________________ OpenStack Development Mailing List (not for usage questions) Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe<http://openstack-dev-requ...@lists.openstack.org?subject:unsubscribe> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev __________________________________________________________________________ OpenStack Development Mailing List (not for usage questions) Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe<http://openstack-dev-requ...@lists.openstack.org?subject:unsubscribe> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
__________________________________________________________________________ OpenStack Development Mailing List (not for usage questions) Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev