如果我们将任何服务器放在/etc/ntp.conf 中,命令 ceph status 不会响应
我在centos 7上有3个ceph节点和这个/etc/ntp.conf:
driftfile /vat/lib/ntp/drift
restrict 0.0.0.0 mask 0.0.0.0
server 0.ua.pool.ntp.org iburst
server 1.ua.pool.ntp.org iburst
server 2.ua.pool.ntp.org iburst
server 3.ua.pool.ntp.org iburst
includefile /etc/ntp/crypto/pw
keys /etc/ntp/keys
disable monitor
和这个/etc/rc.local:
touch /var/lock/subsys/local
/sbin/iptables-restore < /etc/sysconfig/iptables
/sbin/ntpd -gq
/sbin/hwclock --systohc
systemctl enable ntpd.service
systemctl start ntpd.service
如果我在/etc/ntp.conf 中评论服务器:
#server 0.ua.pool.ntp.org iburst
#server 1.ua.pool.ntp.org iburst
#server 2.ua.pool.ntp.org iburst
#server 3.ua.pool.ntp.org iburst
然后 ceph 成为响应。但是有了这个答案:
health HEALTH_WARN
clock skew detected on mon.node2, mon.node3
Monitor clock skew detected
...
systemctl status ntpd.service 显示服务处于事件状态并正在运行。
如果我们将服务器放在 ntp.conf 中,我真的无法理解为什么 ceph 会变得不负责任。
请帮我。
最佳答案
我不知道为什么,但是由于 ntpd -gq
中的命令而发生了这种情况.此命令从您在 ntp.conf 中编写的服务器更新您的数据时间,然后停止。
我无法弄清楚为什么 ceph 在执行此命令后会失败,但是当我将其更改为:
ntpdate 0.ua.pool.ntp.org
Ceph 变成了工作。
关于centos - ntp 运行时 Ceph 状态不响应,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35177485/