Debugging OpenStack CSI Plugin for Kubernetes
This section describes how to debug the OpenStack CSI plugin for Kubernetes.
To debug the OpenStack CSI plugin for Kubernetes, validate the following:
-
Connection to the OpenStack metadata service.
-
OpenStack credentials.
-
Cinder CSI label on the nodes.
Validating the Connection to the OpenStack Metadata Service
-
Validate the connection to the OpenStack metadata service using the following curl command.
ubuntu@cn2smi-controlplane1:~$ curl http://169.254.169.254/openstack 2012-08-10 2013-04-04 2013-10-17 2015-10-15 2016-06-30 2016-10-06 2017-02-22 latest
-
If the curl command fails to display any output, verify whether a proper route is there for 169.254.169.254.
Destination Gateway Genmask Flags Metric Ref Use Iface 0.0.0.0 172.16.181.1 0.0.0.0 UG 100 0 0 ens4 10.192.1.0 0.0.0.0 255.255.255.0 U 0 0 0 bond0.2400 169.254.169.254 172.16.180.1 255.255.255.255 UGH 100 0 0 ens3 169.254.169.254 172.16.181.1 255.255.255.255 UGH 100 0 0 ens4
Validating OpenStack Credentials
-
From the control plane node, debug the loaded OpenStack credentials using the following command.
kubectl get secrets -n kube-system cloud-config -o json | grep '"cloud.conf"' | cut -f 4 -d \" | base64 --decode
A sample output is shown below:
[Global] username=core password="Csco@123" auth-url=http://10.81.68.210:5000//v3 tenant-id=eb3c1fda05ab48faad1f94e015b84f63 domain-id=default [BlockStorage] bs-version=auto
Verify if the values specified in the following fields are accurate:
-
Username
-
Password
-
Auth URL
-
Tenant ID
-
Domain ID
The OpenStack CSI plugin will fail to connect, if the specified values are inaccurate.
-
Validating the Cinder CSI Label on the Nodes
The following label must be configured on the nodes with openstack CSI controller plugin and node-plugin pods.
"topology.cinder.csi.openstack.org/zone":"nova"
For verifying the labels on the primary control plane node, use the following command:
kubectl get nodes --show-labels