帮助
[root@station140 tmp(keystone_admin)]# keystone help | grep service service-create Add service to Service Catalog. service-delete Delete service from Service Catalog. service-get Display service from Service Catalog. service-list List all services in Service Catalog.
[root@station140 tmp(keystone_admin)]# keystone service-list +----------------------------------+------------+--------------+--------------------------------+ | id | name | type | description | +----------------------------------+------------+--------------+--------------------------------+ | 4db88c4e3efe4f188b6f08756d28c407 | ceilometer | metering | Openstack Metering Service | | e4ce5457b38e4a50a929af9b2b02b81c | cinder | volume | Cinder Service | | ab1e6db2a7b54a459f928075263a8b0f | cinder_v2 | volumev2 | Cinder Service v2 | | f025dc6a95db40f586b6975b154465b9 | glance | image | Openstack Image Service | | 04a34fae776c4573a4d26ccca9407ec9 | keystone | identity | OpenStack Identity Service | | 39f89e436d4942a1b2349e02cfddbed2 | neutron | network | Neutron Networking Service | | 60796518d55347f981ce319121c5e6bf | nova | compute | Openstack Compute Service | | 7867dcf1ec1647efa2287344c2f00775 | nova_ec2 | ec2 | EC2 Service | | 743203738a074f5bac198be5e52977d8 | swift | object-store | Openstack Object-Store Service | | 8b7b18fc6b7c4f169b10282252c0571c | swift_s3 | s3 | Openstack S3 Service | +----------------------------------+------------+--------------+--------------------------------+
[root@station140 tmp(keystone_admin)]# nova help | grep service [--service-type <service-type>] [--service-name <service-name>] [--volume-service-name <volume-service-name>] authenticate services. host-list List all hosts by service. service-disable Disable the service. service-enable Enable the service. service-list Show a list of all running services. Filter by host & --service-type <service-type> --service-name <service-name> --volume-service-name <volume-service-name>
[root@station140 tmp(keystone_admin)]# nova host-list +----------------------+-------------+----------+ | host_name | service | zone | +----------------------+-------------+----------+ | station140.cloud.com | consoleauth | internal | | station140.cloud.com | scheduler | internal | | station140.cloud.com | conductor | internal | | station140.cloud.com | compute | nova | | station140.cloud.com | cert | internal | +----------------------+-------------+----------+注: 当前使用 all in one 模式, 所以只返回一个 host_name 结果
列出主机上的服务状态
[root@station140 tmp(keystone_admin)]# nova service-list +------------------+----------------------+----------+---------+-------+----------------------------+-----------------+ | Binary | Host | Zone | Status | State | Updated_at | Disabled Reason | +------------------+----------------------+----------+---------+-------+----------------------------+-----------------+ | nova-consoleauth | station140.cloud.com | internal | enabled | up | 2014-02-14T08:40:37.000000 | None | | nova-scheduler | station140.cloud.com | internal | enabled | up | 2014-02-14T08:40:37.000000 | None | | nova-conductor | station140.cloud.com | internal | enabled | up | 2014-02-14T08:40:38.000000 | None | | nova-compute | station140.cloud.com | nova | enabled | up | 2014-02-14T08:40:29.000000 | None | | nova-cert | station140.cloud.com | internal | enabled | up | 2014-02-14T08:40:33.000000 | None | +------------------+----------------------+----------+---------+-------+----------------------------+-----------------+
关闭某个服务:
nova service-disable localhost.localdomain nova-compute --reason 'trial log' <- just test
nova service-enable localhost.localdomain nova-compute