longhorn: Failed to get arg root-dir: Cannot get kubelet root dir, no related proc for root-fir detection, error out
Im seeing following error on openshift 3.11 (i.e. k8s 1.11)
oc logs -f longhorn-driver-deployer-59bd589d86-84k24
time="2019-03-23T14:28:33Z" level=debug msg="Driver csi will be used after automatic detection"
--
| time="2019-03-23T14:28:33Z" level=debug msg="Deploying CSI driver"
| time="2019-03-23T14:28:33Z" level=debug msg="kubelet arg detection pod discover-kubelet-root-dir in phase: Pending"
| time="2019-03-23T14:28:34Z" level=debug msg="kubelet arg detection pod discover-kubelet-root-dir in phase: Pending"
| time="2019-03-23T14:28:36Z" level=debug msg="kubelet arg detection pod discover-kubelet-root-dir in phase: Pending"
| time="2019-03-23T14:28:37Z" level=debug msg="kubelet arg detection pod discover-kubelet-root-dir in phase: Pending"
| time="2019-03-23T14:28:38Z" level=debug msg="kubelet arg detection pod discover-kubelet-root-dir in phase: Pending"
| time="2019-03-23T14:28:40Z" level=debug msg="kubelet arg detection pod discover-kubelet-root-dir in phase: Pending"
| time="2019-03-23T14:28:41Z" level=debug msg="kubelet arg detection pod discover-kubelet-root-dir in phase: Pending"
| time="2019-03-23T14:28:42Z" level=debug msg="kubelet arg detection pod discover-kubelet-root-dir in phase: Pending"
| time="2019-03-23T14:28:43Z" level=debug msg="kubelet arg detection pod discover-kubelet-root-dir in phase: Pending"
| time="2019-03-23T14:28:45Z" level=debug msg="kubelet arg detection pod discover-kubelet-root-dir in phase: Pending"
| time="2019-03-23T14:28:46Z" level=debug msg="kubelet arg detection pod discover-kubelet-root-dir in phase: Pending"
| time="2019-03-23T14:28:48Z" level=error msg="Failed to get arg root-dir: Cannot get kubelet root dir, no related proc for root-fir detection, error out"
| time="2019-03-23T14:28:48Z" level=fatal msg="Error deploying driver: Failed to get arg root-dir: Cannot get kubelet root dir, no related proc for root-fir detection, error out"
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Comments: 37 (13 by maintainers)
I found out that kubelet seems unable to communicate with CSI plugin at all, except for creation or attaching. So I took a second look at the document you provided and noticed this:
So it seems OpenShift didn’t change
kubeletroot-dir in the end, but it changed the mountpoint-dir to/var/lib/origin/openshift.local.volumes/pods/, which is really unusual. That’s why I always wondering why the root-dir of kubelet is/var/lib/origin/openshift.local.volumes/. In the end, it’s not. It’s only the path for mount. Kubelet root dir is still/var/lib/kubelet/for OpenShift. So the plugins should be installed in/var/lib/kubelet/plugins/io.rancher.longhorn/csi.sockbut mountpoint-dir should be/var/lib/origin/openshift.local.volumes/pods/.Current Longhorn doesn’t provide an option to update the mountpoint-dir, which is
<root-dir>/pods. We can add that option later to support OpenShift.There is probably a workaround:
root-dirto/var/lib/kubelet. Still using CSI.mount --bind /var/lib/origin/openshift.local.volumes/pods /var/lib/kubelet/podsThis may work.
Or you can try using Flexvolume driver. Just set the driver to
flexvolumeand don’t set other options to see if it works.What’s the kubelet command line for OpenShift? I’d like to see that for reference.
I also have this issue with longhorn
0.4.1on DigitalOcean cluster1.13.5.do. Any idea how to fix this?