- 向 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 |
|