监控守护进程 运行 但不在法定人数中

Monitor daemon running but not in quorum

我目前正在测试 OS 和 ceph 集群的版本升级。起始信息: 该集群目前在 Centos 7 和 Ceph 版本 Nautilus 上。我正在尝试将 OS 更改为 ubuntu 20.04 并使用 Octopus 更改版本。我先从升级 mon1 开始。我会把做过的事情按顺序记下来。

首先我停止了监控服务 - systemctl stop ceph-mon@mon1

然后我从集群中删除了监视器 - ceph mon remove mon1

然后在 mon1 上安装 ubuntu 20.04。更新了系统并配置了ufw。

已安装 ceph 章鱼包。

已将 ceph.client.admin.keyring 和 ceph.conf 复制到 mon1 /etc/ceph/

已将 ceph.mon.keyring 复制到 mon1 的临时文件夹并将所有权更改为 ceph:ceph

得到 monmap ceph mon getmap -o ${MONMAP} - 问题是我在移除监视器后做了这个。

创建了 /var/lib/ceph/mon/ceph-mon1 文件夹并将所有权更改为 ceph:ceph

为监视器创建了文件系统 - sudo -u ceph ceph-mon --mkfs -i mon1 --monmap /folder/monmap --keyring /folder/ceph.mon.keyring

在注意到删除监视器后我得到了 monmap 后,我手动添加了它 - ceph mon add mon1 <ip> --fsid <fsid>

手动启动并使用 ceph -s 检查集群状态后,我可以看到 mon1 已列出但不在法定人数中。监控守护进程在上述 mon1 节点上运行良好。我在日志中注意到 mon1 卡在“探测”状态,而在其他监视器日志上有一个输出,例如 mon1 (rank 2) addr [v2:<ip>:3300/0,v1:<ip>:6789/0] is down (out of quorum) ,正如我所说的监视器守护进程在 mon1 上是 运行 ,没有任何可见错误卡在探测状态。

我想知道它是否是由 os&版本更改引起的,所以我首先尝试通过在 /var/lib/ceph/ 中创建相应的文件夹来配置管理器、mds 和 radosgw 守护程序。 ..和复制钥匙圈。所有这些服务都运行良好,我能够访问我的存储桶,能够打开 Octopus 版本仪表板,并且元数据服务器在 ceph -s 中被列为活动状态。所以很明显我的问题只是监视器配置。

经过一些检查后,在 red hat ceph 文档中发现了这个:

If the Ceph Monitor is in the probing state longer than expected, it cannot find the other Ceph Monitors. This problem can be caused by networking issues, or the Ceph Monitor can have an outdated Ceph Monitor map (monmap) and be trying to reach the other Ceph Monitors on incorrect IP addresses. Alternatively, if the monmap is up-to-date, Ceph Monitor’s clock might not be synchronized.

监视器上没有网络错误,我可以连接到集群中的所有其他机器。时钟是同步的。如果这个问题是由monmap情况引起的,我该如何解决?

Ok 因此,直接从 centos7-Nautilus 到 ubuntu20.04-Octopus 不是 possible for monitor services only,显然问题是关于 hos不同操作系统的名称解析。其余服务没问题。有更长的方法可以毫无问题地执行此操作,并且是正确的解决方案。首先将 os 从 centos7 更改为 ubuntu18.04 并安装 ceph-nautilus 软件包并将机器添加到集群(完全没有问题)。然后更新和升级系统并应用“do-release-upgrade”。奇迹般有效。我想eblock提到的是这个。