kubernetes / cloud-provider-openstack

Apache License 2.0
619 stars 610 forks source link

[cinder-csi-plugin] i/o timeout, restarting registration container #2315

Closed mathgonzlez closed 1 year ago

mathgonzlez commented 1 year ago

/kind bug What happened: Hi, i deploy a k8s cluster 2.16 and 2.17 in ovirt hypervisor and try to use cinder as backend through an external openstack cluster (all in my lan) but my csi-cinder-nodeplugins is restarting for ever and my volume creation stuck on pending:

csi-cinder-controllerplugin-64b5578777-d4g9t 6/6 Running 0 11h csi-cinder-nodeplugin-7dmvw 2/3 CrashLoopBackOff 123 (60s ago) 11h csi-cinder-nodeplugin-8jd7j 2/3 CrashLoopBackOff 123 (55s ago) 11h csi-cinder-nodeplugin-whl7f 3/3 Running 0 7s

I0804 15:41:29.807551 1 main.go:166] Version: v2.6.3 I0804 15:41:29.807624 1 main.go:167] Running node-driver-registrar in mode=registration I0804 15:41:29.810561 1 node_register.go:53] Starting Registration Server at: /registration/cinder.csi.openstack.org-reg.sock I0804 15:41:29.810939 1 node_register.go:62] Registration Server started at: /registration/cinder.csi.openstack.org-reg.sock I0804 15:41:29.811113 1 node_register.go:92] Skipping HTTP server because endpoint is set to: "" I0804 15:41:31.793968 1 main.go:102] Received GetInfo call: &InfoRequest{} I0804 15:41:31.794666 1 main.go:109] "Kubelet registration probe created" path="/var/lib/kubelet/plugins/cinder.csi.openstack.org/registration" I0804 15:42:01.968835 1 main.go:120] Received NotifyRegistrationStatus call: &RegistrationStatus{PluginRegistered:false,Error:RegisterPlugin error -- plugin registration failed with err: rpc error: code = Internal desc = [NodeGetInfo] unable to retrieve instance id of node error fetching http://169.254.169.254/openstack/latest/meta_data.json: Get "http://169.254.169.254/openstack/latest/meta_data.json": dial tcp 169.254.169.254:80: i/o timeout,} E0804 15:42:01.968881 1 main.go:122] Registration process failed with error: RegisterPlugin error -- plugin registration failed with err: rpc error: code = Internal desc = [NodeGetInfo] unable to retrieve instance id of node error fetching http://169.254.169.254/openstack/latest/meta_data.json: Get "http://169.254.169.254/openstack/latest/meta_data.json": dial tcp 169.254.169.254:80: i/o timeout, restarting registration container.

Its mandatory to have the k8s hosted inside of my openstack?

What you expected to happen: k8s can create cinder volumes for pods

How to reproduce it: Deploy openstack (rdo or kolla-ansible), install and configure csi-cinder-plugin

Anything else we need to know?: cloud.conf [Global] username = admin password = ***** domain-name = Default auth-url = http://CONTROLLERFQDN:5000/v3/ tenant-id = 9fed2c4203b34515af1ace66337c99c0 region = RegionOne

My k8s nodes can reach the fqdn and can curl the keystone endpoint.

Environment:

Thanks!

dulek commented 1 year ago

Yeah, it is mandatory that K8s runs on OpenStack, this is the cloud-provider-openstack. The CSI node service needs to register itself and for that it uses the OpenStack metadata service. Can you tell us more about your use case? Where does your K8s run? How would you expect the Cinder volumes to be attached to the nodes if they're not OpenStack VMs?

mathgonzlez commented 1 year ago

Yeah, it is mandatory that K8s runs on OpenStack, this is the cloud-provider-openstack. The CSI node service needs to register itself and for that it uses the OpenStack metadata service. Can you tell us more about your use case? Where does your K8s run? How would you expect the Cinder volumes to be attached to the nodes if they're not OpenStack VMs?

Hi dulek, thanks for reply. Sorry about my question because is a noob mistake. I create the cluster inside openstack and work flawessly.