运行时错误:NoSectionError:没有部分:'ceph-source'

运行时错误:NoSectionError:没有部分:'ceph-source'

当我使用ceph-deploy将 ceph 安装到每个节点时:

ceph-deploy install node0 node1 node2 

我收到以下错误:

[node1][WARNIN] check_obsoletes has been enabled for Yum priorities plugin
[node1][INFO  ] Running command: rpm --import https://download.ceph.com/keys/release.asc
[node1][INFO  ] Running command: rpm -Uvh --replacepkgs https://download.ceph.com/rpm-jewel/el7/noarch/ceph-release-1-0.el7.noarch.rpm
[node1][DEBUG ] Retrieving https://download.ceph.com/rpm-jewel/el7/noarch/ceph-release-1-0.el7.noarch.rpm
[node1][DEBUG ] Preparing...                          ########################################
[node1][DEBUG ] Updating / installing...
[node1][WARNIN] warning: /etc/yum.repos.d/ceph.repo created as /etc/yum.repos.d/ceph.repo.rpmnew
[node1][DEBUG ] ceph-release-1-1.el7                  ########################################
[node1][WARNIN] ensuring that /etc/yum.repos.d/ceph.repo contains a high priority
[ceph_deploy][ERROR ] RuntimeError: NoSectionError: No section: 'ceph-source'

编辑

我尝试删除 ceph-release:

yum remove ceph-release

但没用。

答案1

从错误中,您应该知道文件中没有 ceph-source 部分ceph.conf

尝试将以下代码添加到ceph.conf

[ceph-source]
name=Ceph source packages
baseurl=http://mirrors.aliyun.com/ceph/rpm-infernalis/el7/SRPMS
enabled=1
gpgcheck=1
type=rpm-md
gpgkey=http://mirrors.aliyun.com/ceph/keys/release.asc
priority=1

答案2

我在 CentOS 7 上安装 ceph 时发生了这种情况。

我按照 Ceph Bug Tracker 上的解决方案进行操作: http://tracker.ceph.com/issues/12694

只需在每个节点中移动 ceph yum 存储库,如下所示:

sudo mv /etc/yum.repos.d/ceph.repo /etc/yum.repos.d/ceph-deploy.repo

然后重试安装节点。

相关内容