Kubernetes eph 错误整理

2018年08月21日持续更新,如果有遇到更多的坑请向我们投稿


eph Install error

==1.安装ceph报错==

--> Finished Dependency Resolution
Error: Package: 2:ceph-common-10.2.11-0.el7.x86_64 (eph)
           Requires: libbabeltrace-ctf.so.1()(64bit)
Error: Package: 2:ceph-osd-10.2.11-0.el7.x86_64 (eph)
           Requires: libleveldb.so.1()(64bit)
Error: Package: 2:ceph-mon-10.2.11-0.el7.x86_64 (eph)
           Requires: libleveldb.so.1()(64bit)
Error: Package: 2:librbd1-10.2.11-0.el7.x86_64 (eph)
           Requires: liblttng-ust.so.0()(64bit)
Error: Package: 2:ceph-base-10.2.11-0.el7.x86_64 (eph)
           Requires: liblttng-ust.so.0()(64bit)
Error: Package: 2:librgw2-10.2.11-0.el7.x86_64 (eph)
           Requires: libfcgi.so.0()(64bit)
Error: Package: 2:ceph-common-10.2.11-0.el7.x86_64 (eph)
           Requires: libbabeltrace.so.1()(64bit)
Error: Package: 2:librados2-10.2.11-0.el7.x86_64 (eph)
           Requires: liblttng-ust.so.0()(64bit)
 You could try using --skip-broken to work around the problem
 You could try running: rpm -Va --nofiles --nodigest

解决办法:

yum install -y yum-utils && yum-config-manager --add-repo https://dl.fedoraproject.org/pub/epel/7/x86_64/ && yum install --nogpgcheck -y epel-release && rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-7 && rm -f /etc/yum.repos.d/dl.fedoraproject.org*

==2.ceph-deploy命令报错==

 [root@ceph01 ceph]# ceph-deploy  new ceph01 ceph02
usage: ceph-deploy new [-h] [--no-ssh-copykey] [--fsid FSID]
                       [--cluster-network LUSER_NEWRK]
                       [--public-network PUBLI_NEWRK]
                       MN [MN ...]
ceph-deploy new: error: hostname: ceph02 is not resolvable

解决办法: Host没有被解析,可以使用ping 解析域名进行测试

==3.创建mon报错==

[ceph_deploy.mon][ERRR ] RuntimeError: config file /etc/ceph/ceph.conf exists with different content; use --overwrite-conf to overwrite

解决办法:

ceph-deploy --overwrite-conf mon create-initial

==4.安装ceph 报错==

[admin-node][WARNIN] ensuring that /etc/yum.repos.d/ceph.repo contains a high priority
[ceph_deploy][ERRR ] RuntimeError: NoSectionError: No section: 'ceph-source'

解决方法:

在admin-node中把/etc/yum.repos.d/下ceph.repo改为ceph-deploy.repo即可。 ceph-deploy会在各节点上安装eph,在/etc/yum.repos.d/中会出现ceph.repo。

==5.激活osd报错==

[admin-node][WARNIN] ceph_disk.main.Error: Error: ['ceph-osd', '--cluster', 'ceph', '--mkfs', '--mkkey', '-i', u'0', '--monmap', '/ceph/activate.monmap', '--osd-data', '/ceph', '--osd-journal', '/ceph/journal', '--osd-uuid', u'1309dc09-bbb1-475e-a7cf-896eac1fcf66', '--keyring', '/ceph/keyring', '--setuser', 'ceph', '--setgroup', 'ceph'] failed : 2018-08-28 14:41:34.666060 7f1aa73b8a80 -1 filestore(/ceph) mkfs: write_version_stamp() failed: (13) Permission denied
[admin-node][WARNIN] 2018-08-28 14:41:34.666071 7f1aa73b8a80 -1 SD::mkfs: bjectStore::mkfs failed with error -13
[admin-node][WARNIN] 2018-08-28 14:41:34.666254 7f1aa73b8a80 -1  ** ERRR: error creating empty object store in /ceph: (13) Permission denied
[admin-node][WARNIN] 
[admin-node][ERRR ] RuntimeError: command returned non-zero exit status: 1
[ceph_deploy][ERRR ] RuntimeError: Failed to execute command: /usr/sbin/ceph-disk -v activate --mark-init systemd --mount /ceph

解决方法: 因为没有权限造成的,需要我们执行chown -R ceph.ceph /ceph

eph Storagelass error

eph other error

==1.创建osd报错==

[root@admin-node ~]# ceph-deploy osd prepare ceph:/ceph
[ceph_deploy.conf][DEBUG ] found configuration file at: /root/.cephdeploy.conf
[ceph_deploy.cli][INF  ] Invoked (1.5.39): /usr/bin/ceph-deploy osd prepare ceph:/ceph
[ceph_deploy.cli][INF  ] ceph-deploy options:
[ceph_deploy.cli][INF  ]  username                      : None
[ceph_deploy.cli][INF  ]  block_db                      : None
[ceph_deploy.cli][INF  ]  disk                          : [('ceph', '/ceph', None)]
[ceph_deploy.cli][INF  ]  dmcrypt                       : False
[ceph_deploy.cli][INF  ]  verbose                       : False
[ceph_deploy.cli][INF  ]  bluestore                     : None
[ceph_deploy.cli][INF  ]  block_wal                     : None
[ceph_deploy.cli][INF  ]  overwrite_conf                : False
[ceph_deploy.cli][INF  ]  subcommand                    : prepare
[ceph_deploy.cli][INF  ]  dmcrypt_key_dir               : /etc/ceph/dmcrypt-keys
[ceph_deploy.cli][INF  ]  quiet                         : False
[ceph_deploy.cli][INF  ]  cd_conf                       : <ceph_deploy.conf.cephdeploy.onf instance at 0x1491ef0>
[ceph_deploy.cli][INF  ]  cluster                       : ceph
[ceph_deploy.cli][INF  ]  fs_type                       : xfs
[ceph_deploy.cli][INF  ]  filestore                     : None
[ceph_deploy.cli][INF  ]  func                          : <function osd at 0x1485e60>
[ceph_deploy.cli][INF  ]  ceph_conf                     : None
[ceph_deploy.cli][INF  ]  default_release               : False
[ceph_deploy.cli][INF  ]  zap_disk                      : False
[ceph_deploy][ERRR ] onfigError: annot load config: [Errno 2] No such file or directory: 'ceph.conf'; has `ceph-deploy new` been run in this directory?

解决办法:

因为找不到相关ceph.conf及认证文件,需要进入ceph.conf同级目录下执行才可以

==2.创建生成osd目录报错==

oceph-deploy osd prepare admin-node:/ceph ceph1:/ceph ceph2:/ceph    

[ceph1][DEBUG ] write cluster configuration to /etc/ceph/{cluster}.conf
[ceph_deploy.osd][ERRR ] RuntimeError: config file /etc/ceph/ceph.conf exists with different content; use --overwrite-conf to overwrite
[ceph2][DEBUG ] connected to host: ceph2 
[ceph2][DEBUG ] detect platform information from remote host
[ceph2][DEBUG ] detect machine type
[ceph2][DEBUG ] find the location of an executable
[ceph_deploy.osd][INF  ] Distro info: entS Linux 7.4.1708 ore
[ceph_deploy.osd][DEBUG ] Deploying osd to ceph2
[ceph2][DEBUG ] write cluster configuration to /etc/ceph/{cluster}.conf
[ceph_deploy.osd][ERRR ] RuntimeError: config file /etc/ceph/ceph.conf exists with different content; use --overwrite-conf to overwrite
[ceph_deploy][ERRR ] GenericError: Failed to create 2 SDs

解决办法:

由于服务器多个配置文件不相同造成,建议将所有配置清空从新生成

==3.绑定pvc显示等待状态==

Events:
  ype     Reason              Age   From                         Message
  ----     ------              ----  ----                         -------
  Warning  ProvisioningFailed  1m    persistentvolume-controller  Failed to provision volume with Storagelass "abc-storageclass": failed to create rbd image: exit status 1, command output: 2018-08-28 17:43:18.101614 7ff4eed25d80 -1 did not load config file, using default settings.
2018-08-28 17:43:18.146121 7ff4eed25d80 -1 auth: unable to find a keyring on /etc/ceph/ceph.client.admin.keyring,/etc/ceph/ceph.keyring,/etc/ceph/keyring,/etc/ceph/keyring.bin: (2) No such file or directory
2018-08-28 17:43:18.150146 7ff4eed25d80  0 librados: client.admin authentication error (1) peration not permitted
rbd: couldn't connect to the cluster!
  Warning  ProvisioningFailed  46s  persistentvolume-controller  Failed to provision volume with Storagelass "abc-storageclass": failed to create rbd image: exit status 1, command output: 2018-08-28 17:43:32.956933 7fddbee33d80 -1 did not load config file, using default settings.
2018-08-28 17:43:32.965948 7fddbee33d80 -1 auth: unable to find a keyring on /etc/ceph/ceph.client.admin.keyring,/etc/ceph/ceph.keyring,/etc/ceph/keyring,/etc/ceph/keyring.bin: (2) No such file or directory
2018-08-28 17:43:32.970298 7fddbee33d80  0 librados: client.admin authentication error (1) peration not permitted
rbd: couldn't connect to the cluster!
  Warning  ProvisioningFailed  31s  persistentvolume-controller  Failed to provision volume with Storagelass "abc-storageclass": failed to create rbd image: exit status 1, command output: 2018-08-28 17:43:47.956796 7fd6d6335d80 -1 did not load config file, using default settings.
2018-08-28 17:43:47.965440 7fd6d6335d80 -1 auth: unable to find a keyring on /etc/ceph/ceph.client.admin.keyring,/etc/ceph/ceph.keyring,/etc/ceph/keyring,/etc/ceph/keyring.bin: (2) No such file or directory
2018-08-28 17:43:47.969127 7fd6d6335d80  0 librados: client.admin authentication error (1) peration not permitted
rbd: couldn't connect to the cluster!
  Warning  ProvisioningFailed  16s  persistentvolume-controller  Failed to provision volume with Storagelass "abc-storageclass": failed to create rbd image: exit status 1, command output: 2018-08-28 17:44:02.960721 7f269d9ced80 -1 did not load config file, using default settings.
2018-08-28 17:44:02.972402 7f269d9ced80 -1 auth: unable to find a keyring on /etc/ceph/ceph.client.admin.keyring,/etc/ceph/ceph.keyring,/etc/ceph/keyring,/etc/ceph/keyring.bin: (2) No such file or directory
2018-08-28 17:44:02.976247 7f269d9ced80  0 librados: client.admin authentication error (1) peration not permitted
rbd: couldn't connect to the cluster!
  Warning  ProvisioningFailed  1s  persistentvolume-controller  Failed to provision volume with Storagelass "abc-storageclass": failed to create rbd image: exit status 1, command output: 2018-08-28 17:44:17.958259 7fa26c1a5d80 -1 did not load config file, using default settings.
2018-08-28 17:44:17.968087 7fa26c1a5d80 -1 auth: unable to find a keyring on /etc/ceph/ceph.client.admin.keyring,/etc/ceph/ceph.keyring,/etc/ceph/keyring,/etc/ceph/keyring.bin: (2) No such file or directory
2018-08-28 17:44:17.970876 7fa26c1a5d80  0 librados: client.admin authentication error (1) peration not permitted

解决办法: 从新授权认证

kubectl get secrets  --namespace=kube-system ceph-secret-admin  -o yaml
kubectl delete secrets --namespace=kube-system ceph-secret-admin 
kubectl create secret generic ceph-secret-admin --from-literal=key='AQH7IRbzXaRAAiDfYQQY8PFHEweIwgAWXxA==' --type=kubernetes.io/rbd -n kube-system

kubectl get secrets  --namespace=abcdocker ceph-secret-user -o yaml
kubectl delete secrets --namespace=abcdocker ceph-secret-user 
kubectl create secret generic ceph-secret-user --from-literal=key='AQUGIVb79wHJhAApJmAMM3BQEeUXNb7sb7A==' --type=kubernetes.io/rbd -n abcdocker

kubectl get secrets -n abcdocker 
kubectl get pvc --namespace=abcdocker
Copyright © i4t.com 2019 all right reserved,powered by Gitbook该文件修订时间: 2019-04-26 21:31:27

results matching ""

    No results matching ""