nova s​​ervice-list中有一些服务down了,但是服务状态是active

There are some services down in nova service-list, but the service status is active

我用的是ha-node1里面的nova service-list,这里有一些服务下来,你可以看到ha-node3,都down了:

[root@ha-node1 ~]# nova service-list 
+----+------------------+----------+----------+---------+-------+----------------------------+-----------------+
| Id | Binary           | Host     | Zone     | Status  | State | Updated_at                 | Disabled Reason |
+----+------------------+----------+----------+---------+-------+----------------------------+-----------------+
| 2  | nova-consoleauth | ha-node3 | internal | enabled | down  | 2017-07-27T07:17:34.000000 | -               |
| 5  | nova-conductor   | ha-node3 | internal | enabled | down  | 2017-07-27T07:17:33.000000 | -               |
| 7  | nova-cert        | ha-node3 | internal | enabled | down  | 2017-07-27T07:17:34.000000 | -               |
| 15 | nova-scheduler   | ha-node3 | internal | enabled | down  | 2017-07-27T07:17:33.000000 | -               |
| 22 | nova-cert        | ha-node1 | internal | enabled | up    | 2017-07-27T07:28:30.000000 | -               |
| 29 | nova-conductor   | ha-node1 | internal | enabled | up    | 2017-07-27T07:28:31.000000 | -               |
| 32 | nova-consoleauth | ha-node1 | internal | enabled | up    | 2017-07-27T07:28:23.000000 | -               |
| 33 | nova-consoleauth | ha-node2 | internal | enabled | up    | 2017-07-27T07:28:33.000000 | -               |
| 36 | nova-scheduler   | ha-node1 | internal | enabled | up    | 2017-07-27T07:28:30.000000 | -               |
| 40 | nova-conductor   | ha-node2 | internal | enabled | up    | 2017-07-27T07:28:32.000000 | -               |
| 44 | nova-cert        | ha-node2 | internal | enabled | up    | 2017-07-27T07:28:39.000000 | -               |
| 46 | nova-scheduler   | ha-node2 | internal | enabled | up    | 2017-07-27T07:28:33.000000 | -               |
+----+------------------+----------+----------+---------+-------+----------------------------+-----------------+

但是在ha-node3中,4个服务都处于活动状态(运行):

 openstack-nova-consoleauth.service - OpenStack Nova VNC console auth Server
   Loaded: loaded (/usr/lib/systemd/system/openstack-nova-consoleauth.service; enabled; vendor preset: disabled)
   Active: active (running) since Thu 2017-07-27 10:37:26 CST; 23s ago
 Main PID: 42710 (nova-consoleaut)
   CGroup: /system.slice/openstack-nova-consoleauth.service
           └─42710 /usr/bin/python2 /usr/bin/nova-consoleauth

Jul 27 10:37:20 ha-node3 systemd[1]: Starting OpenStack Nova VNC console auth Server...
Jul 27 10:37:26 ha-node3 nova-consoleauth[42710]: Option "verbose" from group "DEFAULT" is deprecated for removal.  Its value may be silently ignored in the future.
Jul 27 10:37:26 ha-node3 nova-consoleauth[42710]: Option "rpc_backend" from group "DEFAULT" is deprecated for removal.  Its value may be silently ignored in the future.
Jul 27 10:37:26 ha-node3 systemd[1]: Started OpenStack Nova VNC console auth Server.

● openstack-nova-scheduler.service - OpenStack Nova Scheduler Server
   Loaded: loaded (/usr/lib/systemd/system/openstack-nova-scheduler.service; enabled; vendor preset: disabled)
   Active: active (running) since Thu 2017-07-27 10:37:28 CST; 21s ago
 Main PID: 42711 (nova-scheduler)
   CGroup: /system.slice/openstack-nova-scheduler.service
           └─42711 /usr/bin/python2 /usr/bin/nova-scheduler

Jul 27 10:37:20 ha-node3 systemd[1]: Starting OpenStack Nova Scheduler Server...
Jul 27 10:37:26 ha-node3 nova-scheduler[42711]: Option "verbose" from group "DEFAULT" is deprecated for removal.  Its value may be silently ignored in the future.
Jul 27 10:37:26 ha-node3 nova-scheduler[42711]: Option "rpc_backend" from group "DEFAULT" is deprecated for removal.  Its value may be silently ignored in the future.
Jul 27 10:37:28 ha-node3 systemd[1]: Started OpenStack Nova Scheduler Server.

● openstack-nova-conductor.service - OpenStack Nova Conductor Server
   Loaded: loaded (/usr/lib/systemd/system/openstack-nova-conductor.service; enabled; vendor preset: disabled)
   Active: active (running) since Thu 2017-07-27 10:37:27 CST; 23s ago
 Main PID: 42712 (nova-conductor)
   CGroup: /system.slice/openstack-nova-conductor.service
           ├─42712 /usr/bin/python2 /usr/bin/nova-conductor
           ├─42762 /usr/bin/python2 /usr/bin/nova-conductor
           ├─42763 /usr/bin/python2 /usr/bin/nova-conductor
           ├─42765 /usr/bin/python2 /usr/bin/nova-conductor
           └─42776 /usr/bin/python2 /usr/bin/nova-conductor

Jul 27 10:37:20 ha-node3 systemd[1]: Starting OpenStack Nova Conductor Server...
Jul 27 10:37:26 ha-node3 nova-conductor[42712]: Option "verbose" from group "DEFAULT" is deprecated for removal.  Its value may be silently ignored in the future.
Jul 27 10:37:26 ha-node3 nova-conductor[42712]: Option "rpc_backend" from group "DEFAULT" is deprecated for removal.  Its value may be silently ignored in the future.
Jul 27 10:37:27 ha-node3 systemd[1]: Started OpenStack Nova Conductor Server.

● openstack-nova-novncproxy.service - OpenStack Nova NoVNC Proxy Server
   Loaded: loaded (/usr/lib/systemd/system/openstack-nova-novncproxy.service; enabled; vendor preset: disabled)
   Active: active (running) since Thu 2017-07-27 10:37:20 CST; 29s ago
 Main PID: 42713 (nova-novncproxy)
   CGroup: /system.slice/openstack-nova-novncproxy.service
           └─42713 /usr/bin/python2 /usr/bin/nova-novncproxy --web /usr/share/novnc/

为什么他们在 nova service-list 下?

最后发现ha-node3的日期比ha-node1和ha-node2晚了10分钟:

在 ha-node3 中:

[root@ha-node3 images]# date
Thu Jul 27 15:22:57 CST 2017
[root@ha-node3 images]# date
Thu Jul 27 15:23:16 CST 2017

在 ha-node2 或 ha-node1 中:

[root@ha-node2 ~]# date
Thu Jul 27 15:34:03 CST 2017

所以我在ha-node3中使用了ntpdate cn.pool.ntp.org,然后就正常工作了:

[root@ha-node1 ~]# nova service-list 
+----+------------------+----------+----------+---------+-------+----------------------------+-----------------+
| Id | Binary           | Host     | Zone     | Status  | State | Updated_at                 | Disabled Reason |
+----+------------------+----------+----------+---------+-------+----------------------------+-----------------+
| 2  | nova-consoleauth | ha-node3 | internal | enabled | up    | 2017-07-27T07:36:31.000000 | -               |
| 5  | nova-conductor   | ha-node3 | internal | enabled | up    | 2017-07-27T07:36:30.000000 | -               |
| 7  | nova-cert        | ha-node3 | internal | enabled | up    | 2017-07-27T07:36:31.000000 | -               |
| 15 | nova-scheduler   | ha-node3 | internal | enabled | up    | 2017-07-27T07:36:30.000000 | -               |
| 22 | nova-cert        | ha-node1 | internal | enabled | up    | 2017-07-27T07:36:20.000000 | -               |
| 29 | nova-conductor   | ha-node1 | internal | enabled | up    | 2017-07-27T07:36:21.000000 | -               |
| 32 | nova-consoleauth | ha-node1 | internal | enabled | up    | 2017-07-27T07:36:23.000000 | -               |
| 33 | nova-consoleauth | ha-node2 | internal | enabled | up    | 2017-07-27T07:36:24.000000 | -               |
| 36 | nova-scheduler   | ha-node1 | internal | enabled | up    | 2017-07-27T07:36:20.000000 | -               |
| 40 | nova-conductor   | ha-node2 | internal | enabled | up    | 2017-07-27T07:36:22.000000 | -               |
| 44 | nova-cert        | ha-node2 | internal | enabled | up    | 2017-07-27T07:36:30.000000 | -               |
| 46 | nova-scheduler   | ha-node2 | internal | enabled | up    | 2017-07-27T07:36:24.000000 | -               |
+----+------------------+----------+----------+---------+-------+----------------------------+-----------------+