]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commit
Add admin only action for force detach
authorclayg <clay.gerrard@gmail.com>
Thu, 25 Oct 2012 09:55:13 +0000 (02:55 -0700)
committerClay Gerrard <clay.gerrard@gmail.com>
Wed, 7 Nov 2012 18:09:48 +0000 (12:09 -0600)
commit956731973ee872d38eebacfb519ed62d6767a319
tree723c6779dd03856e568d8a5226d922a11ce3b850
parent92f6aca556530f27ec090b87e295c319770b0748
Add admin only action for force detach

This action calls the same methods nova would after it successfully
detaches a volume.  By exposing it to the administrator it makes it's
easier to repair un-syncronized state between services.  Generally when
the host is no longer attached, but the volume state is wrong.

Future work: The Iscsi based drivers don't seem to use
initialize_connection and terminate_connection to create the export for
the volume.  This would be more useful with drivers that do that.

I added the force parameter to terminate_connection for drivers that may
want to differintiate between a normal terminate and the force detach.

Future Nova work:  Nova will want an admin action to update the bdm
tables - today it's a bit of nova-manage shell work.

Change-Id: Icc1cff0f50a5ace9ebdae62c85524ee8d6ec23e0
19 files changed:
cinder/api/openstack/volume/contrib/admin_actions.py
cinder/tests/api/openstack/volume/contrib/test_admin_actions.py
cinder/tests/fake_driver.py
cinder/tests/fake_flags.py
cinder/tests/policy.json
cinder/volume/api.py
cinder/volume/driver.py
cinder/volume/drivers/rbd.py
cinder/volume/drivers/sheepdog.py
cinder/volume/iscsi.py
cinder/volume/manager.py
cinder/volume/netapp.py
cinder/volume/nfs.py
cinder/volume/san/hp_lefthand.py
cinder/volume/storwize_svc.py
cinder/volume/windows.py
cinder/volume/xensm.py
cinder/volume/xiv.py
cinder/volume/zadara.py