cinder need support REST API cinder service-delete

Registered by YaoZheng_ZTE

Currently, use cinder service-list can list all cinder volume backend.
[root@2C5_10_DELL05 glance(keystone_admin)]# cinder service-list
+------------------+-----------------------------------+------+----------+-------+----------------------------+-----------------+
| Binary | Host | Zone | Status | State | Updated_at | Disabled Reason |
+------------------+-----------------------------------+------+----------+-------+----------------------------+-----------------+
| cinder-scheduler | 2C5_10_DELL05 | nova | enabled | up | 2016-05-13T06:27:34.000000 | None |
| cinder-volume | 2C5-10_DELL01@KS3200ISCSIDriver-2 | nova | disabled | down | 2016-05-13T06:29:06.000000 | None |
| cinder-volume | 2C5-10_DELL01@lvm | nova | disabled | down | 2016-05-13T06:29:08.000000 | None |
| cinder-volume | 2C5_10_DELL05 | nova | enabled | down | 2016-05-06T03:02:08.000000 | None |
| cinder-volume | 2C5_10_DELL05@FJDXISCSIDriver-1 | nova | enabled | up | 2016-05-13T06:27:32.000000 | None |
| cinder-volume | 2C5_10_DELL05@FJDXISCSIDriver-2 | nova | enabled | up | 2016-05-13T06:27:33.000000 | None |
| cinder-volume | 2C5_10_DELL05@KS3200ISCSIDriver-1 | nova | enabled | up | 2016-05-13T06:27:32.000000 | None |
| cinder-volume | 2C5_10_DELL05@KS3200ISCSIDriver-2 | nova | disabled | up | 2016-05-13T06:27:33.000000 | None |
| cinder-volume | 2C5_10_DELL05@lvm | nova | enabled | up | 2016-05-13T06:27:35.000000 | None |
+------------------+-----------------------------------+------+----------+-------+----------------------------+-----------------+
If you are configured to remove a backend, but this service will remain in the database.
when the user run cinder service-list CLI command, he'll be able to see the service and
the service state is down. This will cause the user to trouble.
Therefore, we maybe need to provide a REST API that can delete the service that is not used.
Now, we only have a command "cinder-manage service remove" to delete the service, but users can not call through the REST API. So, I suggest we provide a REST API interface.

Blueprint information

Status:
Not started
Approver:
Sean McGinnis
Priority:
Low
Drafter:
YaoZheng_ZTE
Direction:
Needs approval
Assignee:
YaoZheng_ZTE
Definition:
Discussion
Series goal:
None
Implementation:
Unknown
Milestone target:
None

Related branches

Sprints

Whiteboard

So it does seem like a useful feature, though it would need some safe-guards, like checking that this doesn't leave any unreachable volumes in the database - you can provide a --force option to delete them too if you like.

Please submit a spec with more detail so the community can review and comment.

(?)

Work Items

This blueprint contains Public information 
Everyone can see this information.

Subscribers

No subscribers.