- 向 cinder-api 發送 delete 請求
- 客戶(能夠是 OpenStack 最終用戶,也能夠是其餘程序)向 cinder-api 發送請求:「請 delete 指定的 volume。」
- 這裏咱們將 delete volume 「vol-1」。進入 GUI 操做菜單 Project -> Volumes -> Volumes。
|
|
- cinder-api 將接收到 delete volume 的請求。查看c-api日誌文件:
|
|
Jun 20 19:30:25 controller devstack@c-api.service[31309]:
INFO cinder.api.openstack.wsgi
[None req-03b18f0a-eee4-4855-ad8c-a0dfc4fa068f admin admin]
DELETE http://172.16.1.17/volume/v3/51743f081cb7477f9a1f4ccdf6490d8e/
volumes/f0a54ac7-5423-4794-8883-d753f6a903cd
|
|
Jun 20 19:30:25 controller devstack@c-api.service[31309]:
INFO cinder.api.v3.volumes
[None req-03b18f0a-eee4-4855-ad8c-a0dfc4fa068f admin admin]
Delete volume with id: f0a54ac7-5423-4794-8883-d753f6a903cd
|
|
- cinder-api 發送消息
- cinder-api 發送消息 delete 消息。cinder-api 沒有打印發送消息的日誌,只能經過源代碼查看 /opt/stack/cinder/cinder/volume/api.py,方法爲 delete。
|
|
- cinder-volume delete volume
- cinder-volume 執行 lvremove 命令 delete volume
|
|
Jun 20 19:30:27 controller cinder-volume[304]:
DEBUG oslo_concurrency.processutils
[None req-03b18f0a-eee4-4855-ad8c-a0dfc4fa068f admin None]
CMD "sudo cinder-rootwrap /etc/cinder/rootwrap.conf lvremove --config activation { retry_deactivation = 1}
-f stack-volumes-lvmdriver-1/volume-f0a54ac7-5423-4794-8883-d753f6a903cd" returned: 0 in 1.107s
{{(pid=460) execute /usr/local/lib/python2.7/dist-packages/oslo_concurrency/processutils.py:409
|
|
Jun 20 19:30:27 controller cinder-volume[304]: I
NFO cinder.volume.drivers.lvm
[None req-03b18f0a-eee4-4855-ad8c-a0dfc4fa068f admin None]
Successfully deleted volume: f0a54ac7-5423-4794-8883-d753f6a903cd
|
|