Hello Gentlemen,
I am searching for some help to get OpenEBS set up on my Rancher Cluster. My goal is to get automatic provisioning with the OpenEBS Dynamic Local PV provisioner with hostpath running.
My setup is a single node cluster on a root server from Netcup. I use a single node Rancher Server installation on the same server with non-default ports mapped for http/https.
In my tries, the Kubernetes clusters which I am trying to install OpenEBS on were freshly provisioned with the respective Rancher Server version of my installation.
First try with Rancher 2.3.0:
- Here installation of OpenEBS with default configuration options already failed. As 2.2.8 is currently mentioned as stable and I am a newbie regarding Kubernetes and Rancher I switched to 2.28 because of this.
Second try with Rancher 2.2.8
- Installation of OpenEBS seems to work. The pods are all up and running according to the description on the OpenEBS website. And the default storage classes for openebs were also installed.
I now have tried two things:
-
Enable Grafana/Promotheus Monitoring on my Rancher cluster by “Enable Persistent Storage for Grafana/Promotheus” using “openebs-hostpath” the pods simply do not come up and I cannot see any output in the logs. I can see the relevant pvc’s but the pv’s are not created.
-
In order to debug the stuff I followed the example from the openebs website
https://docs.openebs.io/docs/next/uglocalpv.html
and used the chart on this page to spin up a percona database with the “openebs-hostpath” storage class. The pod is also not coming up. When using
kc describe pod percona-5f878cbbd5-c4dnj
I get the output attached below. One further note, I am using RancherOS as operating system and before installing things I activated iscsi according to the description on the openebs page:
sudo ros s enable open-iscsi
sudo ros s up open-iscsi
ros config set rancher.services.user-volumes.volumes [/home:/home,/opt:/opt,/var/lib/kubelet:/var/lib/kubelet,/etc/kubernetes:/etc/kubernetes,/var/openebs]
system-docker rm all-volumes
reboot
One further note: When starting the deployment according to the log below, I can see that openebs successfully create a folder for the host volume given with this path:
/var/openebs/local/pvc-caec8f21-edd6-11e9-89d7-56ade17ea74b
even so the log below mentions that it cannot create the path.
MountVolume.NewMounter initialization failed for volume “pvc-caec8f21-edd6-11e9-89d7-56ade17ea74b” : path “/var/openebs/local/pvc-caec8f21-edd6-11e9-89d7-56ade17ea74b” does not exist
However, the folder is empty, I would assume to have some file representing the volume in there. Can someone help me to get this openebs stuff running? I have no idea how to narrow down the issue further
Thanks a lot for your help!
Best regards,
Christoph
Name: percona-5f878cbbd5-c4dnj
Namespace: default
Priority: 0
Node: v220191010512198810/185.163.117.11
Start Time: Sun, 13 Oct 2019 18:30:45 +0200
Labels: name=percona
pod-template-hash=5f878cbbd5
Annotations:
Status: Pending
IP:
IPs:
Controlled By: ReplicaSet/percona-5f878cbbd5
Containers:
percona:
Container ID:
Image: percona
Image ID:
Port: 3306/TCP
Host Port: 0/TCP
Args:
–ignore-db-dir
lost+found
State: Waiting
Reason: ContainerCreating
Ready: False
Restart Count: 0
Limits:
cpu: 500m
Requests:
cpu: 500m
Environment:
MYSQL_ROOT_PASSWORD: k8sDem0
Mounts:
/var/lib/mysql from demo-vol1 (rw)
/var/run/secrets/kubernetes.io/serviceaccount from default-token-f9789 (ro)
Conditions:
Type Status
Initialized True
Ready False
ContainersReady False
PodScheduled True
Volumes:
demo-vol1:
Type: PersistentVolumeClaim (a reference to a PersistentVolumeClaim in the same namespace)
ClaimName: demo-vol1-claim
ReadOnly: false
default-token-f9789:
Type: Secret (a volume populated by a Secret)
SecretName: default-token-f9789
Optional: false
QoS Class: Burstable
Node-Selectors:
Tolerations: ak=av:NoSchedule
node.kubernetes.io/not-ready:NoExecute for 300s
node.kubernetes.io/unreachable:NoExecute for 300s
Events:
Type Reason Age From Message
Warning FailedScheduling 4m47s default-scheduler persistentvolumeclaim “demo-vol1-claim” not found
Normal Scheduled 4m41s default-scheduler Successfully assigned default/percona-5f878cbbd5-c4dnj to v220191010512198810
Warning FailedMount 31s (x10 over 4m41s) kubelet, v220191010512198810 MountVolume.NewMounter initialization failed for volume “pvc-caec8f21-edd6-11e9-89d7-56ade17ea74b” : path “/var/openebs/local/pvc-caec8f21-edd6-11e9-89d7-56ade17ea74b” does not exist
Warning FailedMount 22s (x2 over 2m38s) kubelet, v220191010512198810 Unable to mount volumes for pod “percona-5f878cbbd5-c4dnj_default(cadfbaad-edd6-11e9-89d7-56ade17ea74b)”: timeout expired waiting for volumes to attach or mount for pod “default”/“percona-5f878cbbd5-c4dnj”. list of unmounted volumes=[demo-vol1]. list of unattached volumes=[demo-vol1 default-token-f9789]