使用命令cinder-manage service remove
2019-02-27 本文已影响2人
余亚飞
使用cinder service-list可以查到cinder的服务状态和信息,有时会有一些不用的状态是down,以前是通过修改数据库删除这些down掉的服务。
社区中增加了命令, 可以删除那些down掉的服务。
cinder-manage service remove <binary> <host>
示例:
# cinder service-list
+------------------+-------------------+------+---------+-------+----------------------------+-----------------+
| Binary | Host | Zone | Status | State | Updated_at | Disabled Reason |
+------------------+-------------------+------+---------+-------+----------------------------+-----------------+
| cinder-scheduler | 2c510cg | nova | enabled | down | 2017-05-18T05:48:49.000000 | - |
| cinder-scheduler | cinder | nova | enabled | up | 2017-05-18T08:20:13.000000 | - |
| cinder-volume | 2c510cg@ZTE_FCSAN | nova | enabled | down | 2017-05-12T07:39:40.000000 | - |
| cinder-volume | 2c510cg@lvm | nova | enabled | down | 2017-05-08T00:57:57.000000 | - |
| cinder-volume | cinder@ZTE_FCSAN | nova | enabled | down | 2017-05-18T05:48:42.000000 | - |
| cinder-volume | cinder@lvm | nova | enabled | up | 2017-05-18T08:20:06.000000 | - |
+------------------+-------------------+------+---------+-------+----------------------------+-----------------+
# cinder-manage service remove cinder-volume 2c510cg@ZTE_FCSAN
# cinder-manage service remove cinder-volume 2c510cg@lvm
# cinder service-list
+------------------+------------------+------+---------+-------+----------------------------+-----------------+
| Binary | Host | Zone | Status | State | Updated_at | Disabled Reason |
+------------------+------------------+------+---------+-------+----------------------------+-----------------+
| cinder-scheduler | 2c510cg | nova | enabled | down | 2017-05-18T05:48:49.000000 | - |
| cinder-scheduler | cinder | nova | enabled | up | 2017-05-18T08:20:53.000000 | - |
| cinder-volume | cinder@ZTE_FCSAN | nova | enabled | down | 2017-05-18T05:48:42.000000 | - |
| cinder-volume | cinder@lvm | nova | enabled | up | 2017-05-18T08:20:56.000000 | - |
+------------------+------------------+------+---------+-------+----------------------------+-----------------+
余亚飞,云计算软件工程师,参与OpenStack开源项目,主要从事于存储服务和镜像服务的开发和维护。