Open jmdots opened 6 years ago
Facing same issue. No idea how to debug.
Need to see what is going on with ceph mon container, do you have logs to share?
@jmdots the above osd bootstrap failure was due to mon failure. As observed, osd tried to determine mon health, but at that time, mon also failed, so that caused the trouble.
Same issue. Not enough logs to debug from the kubectl logs
I am running minikube on ubuntu.Problem is that ceph is trying to find those directories which are obviously missing.I tried to create manually and did not work.Minikube dashboard says it all anyway.
/etc/ceph /var/lib
++ MDS_KEYRING=/var/lib/ceph/mds/ceph-mds-minikube/keyring ++ ADMIN_KEYRING=/etc/ceph/ceph.client.admin.keyring ++ MON_KEYRING=/etc/ceph/ceph.mon.keyring ++ RGW_KEYRING=/var/lib/ceph/radosgw/minikube/keyring ++ MGR_KEYRING=/var/lib/ceph/mgr/ceph-minikube/keyring ++ MDS_BOOTSTRAP_KEYRING=/var/lib/ceph/bootstrap-mds/ceph.keyring ++ RGW_BOOTSTRAP_KEYRING=/var/lib/ceph/bootstrap-rgw/ceph.keyring ++ OSD_BOOTSTRAP_KEYRING=/var/lib/ceph/bootstrap-osd/ceph.keyring ++ OSD_PATH_BASE=/var/lib/ceph/osd/ceph
Is it possible to create those missing keyrings with cephx and copy them to those missind directories? Cephx Config Reference
How can I run ceph-authtool with minikube?
2.Add the keys to the related keyrings. First for client.admin, then for monitors, and then other related services, such as OSD, RADOS Gateway, or MDS
4.Create a new keyring and import keys from the admin and monitors' keyrings there. Then use them to start the monitors:
ceph-authtool --create-keyring /tmp/tmpuuhxm3/keyring \ --import-keyring /var/lib/ceph/bootstrap-mon/ceph-osceph-03.keyring
ceph-authtool /tmp/tmpuuhxm3/keyring \ --import-keyring /etc/ceph/ceph.client.admin.keyring
Example Procedure of Manual Ceph Installation
kubectl get po -n ceph
NAME READY STATUS RESTARTS AGE ceph-mds-696bd98bdb-gh2zf 0/1 Pending 0 41m ceph-mds-keyring-generator-z6lmk 0/1 Completed 0 41m ceph-mgr-56f45bb99c-55kvl 0/1 CrashLoopBackOff 11 41m ceph-mgr-keyring-generator-rvlz4 0/1 Completed 0 41m ceph-mon-check-74d98c5b95-72dq6 1/1 Running 0 41m ceph-mon-keyring-generator-tzmtt 0/1 Completed 0 41m ceph-mon-rgkvd 2/3 CrashLoopBackOff 11 41m ceph-namespace-client-key-generator-f7tln 0/1 Completed 0 41m ceph-osd-dev-sdd-pzqck 0/1 Init:CrashLoopBackOff 12 41m ceph-osd-dev-sde-9vlsm 0/1 Init:CrashLoopBackOff 12 41m ceph-osd-keyring-generator-4m7mj 0/1 Completed 0 41m ceph-rbd-provisioner-b58659dc9-f6kgq 1/1 Running 0 41m ceph-rbd-provisioner-b58659dc9-vhsrb 1/1 Running 0 41m ceph-rgw-5bd9dd66c5-kzxcj 0/1 Pending 0 41m ceph-rgw-keyring-generator-wtl9j 0/1 Completed 0 41m ceph-storage-keys-generator-k6z5v 0/1 Completed 0 41m
kubectl describe -n ceph po ceph-osd-dev-sdd-pzqck
Mounts: /common_functions.sh from ceph-bin (ro) /dev from devices (rw) /etc/ceph/ceph.client.admin.keyring from ceph-client-admin-keyring (ro) /etc/ceph/ceph.conf from ceph-etc (ro) /etc/ceph/ceph.mon.keyring from ceph-mon-keyring (ro) /osd_activate_journal.sh from ceph-bin (ro) /osd_disk_activate.sh from ceph-bin (ro) /osd_disk_prepare.sh from ceph-bin (ro) /osd_disks.sh from ceph-bin (ro) /run from pod-run (rw) /run/udev from run-udev (rw) /start_osd.sh from ceph-bin (ro) /var/lib/ceph from pod-var-lib-ceph (rw) /var/lib/ceph/bootstrap-mds/ceph.keyring from ceph-bootstrap-mds-keyring (ro) /var/lib/ceph/bootstrap-osd/ceph.keyring from ceph-bootstrap-osd-keyring (ro) /var/lib/ceph/bootstrap-rgw/ceph.keyring from ceph-bootstrap-rgw-keyring (ro) /var/run/secrets/kubernetes.io/serviceaccount from default-token-jcxvx (ro) /variables_entrypoint.sh from ceph-bin (ro)
Warning FailedMount 41m (x3 over 41m) kubelet, minikube MountVolume.SetUp failed for volume "ceph-mon-keyring" : secrets "ceph-mon-keyring" not found Warning FailedMount 41m (x3 over 41m) kubelet, minikube MountVolume.SetUp failed for volume "ceph-bootstrap-mds-keyring" : secrets "ceph-bootstrap-mds-keyring" not found Warning FailedMount 41m (x4 over 41m) kubelet, minikube MountVolume.SetUp failed for volume "ceph-client-admin-keyring" : secrets "ceph-client-admin-keyring" not found Warning FailedMount 41m (x4 over 41m) kubelet, minikube MountVolume.SetUp failed for volume "ceph-bootstrap-osd-keyring" : secrets "ceph-bootstrap-osd-keyring" not found Warning FailedMount 41m (x4 over 41m) kubelet, minikube MountVolume.SetUp failed for volume "ceph-bootstrap-rgw-keyring" : secrets "ceph-bootstrap-rgw-keyring" not found Normal Pulled 36m (x5 over 38m) kubelet, minikube Container image "docker.io/ceph/daemon:tag-build-master-luminous-ubuntu-16.04" already present on machine Warning BackOff 1m (x165 over 38m) kubelet, minikube Back-off restarting failed container
minikube dashboard-> select namespace ceph->pods
MountVolume.SetUp failed for volume "ceph-bootstrap-rgw-keyring" : secrets "ceph-bootstrap-rgw-keyring" not found Back-off restarting failed container
minikube dashboard-> select namespace ceph->pods->actions-> view/edit YAML
{ "name": "ceph-mon-keyring", "readOnly": true, "mountPath": "/etc/ceph/ceph.mon.keyring", "subPath": "ceph.mon.keyring" },
{ "name": "ceph-bootstrap-osd-keyring", "readOnly": true, "mountPath": "/var/lib/ceph/bootstrap-osd/ceph.keyring", "subPath": "ceph.keyring" },
`kubectl get secrets -n ceph NAME TYPE DATA AGE ceph-bootstrap-mds-keyring Opaque 1 1h ceph-bootstrap-mgr-keyring Opaque 1 1h ceph-bootstrap-osd-keyring Opaque 1 1h ceph-bootstrap-rgw-keyring Opaque 1 1h ceph-client-admin-keyring Opaque 1 1h ceph-keystone-user-rgw Opaque 7 1h ceph-mon-keyring Opaque 1 1h default-token-jcxvx kubernetes.io/service-account-token 3 1h pvc-ceph-client-key kubernetes.io/rbd 1 1h pvc-ceph-conf-combined-storageclass kubernetes.io/rbd 1 1h
kubectl
-n ceph edit secrets/ceph-bootstrap-osd-keyring
Is this a request for help?: Yes
Is this a BUG REPORT or FEATURE REQUEST? (choose one): Bug?
Version of Helm and Kubernetes:
Which chart:
ceph
What happened:
The OSD container fails on this line:
https://github.com/ceph/ceph-helm/blob/fc3cddac3b34ea9d97a77fe80ed77cd2280b42f2/ceph/ceph/templates/bin/_osd_disk_prepare.sh.tpl#L19
What you expected to happen:
Success
How to reproduce it (as minimally and precisely as possible):
Anything else we need to know:
MON is also failing, but it appears to be failing due to a lack of storage.