<div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr">Hi all,</div><div dir="ltr">I would need your help.</div><div dir="ltr">As per the subject, I'm trying to create a PersistentVolumeClaim using Cinder as backend  on a K8S cluster I deployed via Magnum, but I'm not able to.</div><div dir="ltr"><br></div><div dir="ltr">I think I'm hitting one or two issues (not sure if the second depends on the first).</div><div dir="ltr">Here is the story.</div><div dir="ltr"><br></div><div dir="ltr"><b>>Background<<br></b><div>I managed to deploy a K8S cluster using Magnum and I can also create POD or any other K8S "entity" except persisten volumes and/or claims.</div><div><br></div><div><font face="monospace, monospace">Configuration:</font></div><div><font face="monospace, monospace">kolla-ansible: 7.0.1</font></div><div><font face="monospace, monospace">OS Release: Rocky</font></div><div><font face="monospace, monospace">Base Distro: CentOS</font></div><div><br></div><div>I applied the WA as per <a href="https://review.openstack.org/#/c/638400/">https://review.openstack.org/#/c/638400/</a> (a previous issue I found) so K8S cluster is working fine.</div><div><br></div><div><br></div><div><b>> PROBLEM <</b></div><div>I've created the following storageClass:</div><div><div><font face="monospace, monospace">kind: StorageClass</font></div><div><font face="monospace, monospace">apiVersion: <a href="http://storage.k8s.io/v1">storage.k8s.io/v1</a></font></div><div><font face="monospace, monospace">metadata:</font></div><div><font face="monospace, monospace">  name: standard</font></div><div><font face="monospace, monospace">provisioner: <a href="http://kubernetes.io/cinder">kubernetes.io/cinder</a></font></div><div><font face="monospace, monospace">parameters:</font></div><div><font face="monospace, monospace">  type: fast</font></div><div><font face="monospace, monospace">  availability: nova</font></div></div><div><br></div><div>NOTE: I'm trying to use Cinder as backend. </div><div>NOTE2: I tried with an hostPath and I have no issue.</div><div><br></div><div>I then tried to create a PersistentVolumeClaim linking the above StorageClass.</div><div><br></div><div><div><font face="monospace, monospace">kind: PersistentVolumeClaim</font></div><div><font face="monospace, monospace">apiVersion: v1</font></div><div><font face="monospace, monospace">metadata:</font></div><div><font face="monospace, monospace">  name: cinder-claim</font></div><div><font face="monospace, monospace">spec:</font></div><div><font face="monospace, monospace">  accessModes:</font></div><div><font face="monospace, monospace">  - ReadWriteOnce</font></div><div><font face="monospace, monospace">  resources:</font></div><div><font face="monospace, monospace">    requests:</font></div><div><font face="monospace, monospace">      storage: 1Gi</font></div><div><font face="monospace, monospace">  storageClassName: standard2</font></div></div><div> </div><div>It stays in "Pending" state forever.</div><div><br></div><div>I had a look at the "kube-controller-manager.service" log and found the following:</div><div><br></div><div><div><font face="monospace, monospace">--------</font></div><div><font face="monospace, monospace">Mar 08 14:25:21 kube-cluster-march-ppqfakx76wsm-master-0.novalocal runc[3013]: I0308 14:25:21.017065       1 event.go:221] Event(v1.ObjectReference{Kind:"PersistentVolumeClaim", Namespace:"default", Name:"cinder-claim", UID:"ea41e0ac-41ad-11e9-8ffc-fa163e9b393f", APIVersion:"v1", ResourceVersion:"112059", FieldPath:""}): type: 'Warning' reason: 'ProvisioningFailed' Failed to provision volume with StorageClass "standard2": OpenStack cloud provider was not initialized properly : stat /etc/kubernetes/cloud-config: no such file or directory</font></div></div><div><font face="monospace, monospace">--------</font></div><div><br></div><div><b>>>> ISSUE 1 <<<</b></div><div>It seems like that service expects the cloud provider configuration to be in the "cloud-config" file which does not exist.</div><div><br></div><div>As <u>workaround</u>, I created that file and copied the content of "kube_openstack_config" which is:</div><div><br></div><div><div><font face="monospace, monospace">[Global]</font></div><div><font face="monospace, monospace">auth-url=<a href="http://10.1.7.201:5000/v3">http://10.1.7.201:5000/v3</a></font></div><div><font face="monospace, monospace">user-id=eed8ce6dd9734268810f3c23ca91cb19</font></div><div><font face="monospace, monospace">password=M3rE6Wx9sTB94BQD2m</font></div><div><font face="monospace, monospace">trust-id=</font></div><div><font face="monospace, monospace">ca-file=/etc/kubernetes/ca-bundle.crt</font></div><div><font face="monospace, monospace">region=RegionOne</font></div><div><font face="monospace, monospace">[LoadBalancer]</font></div><div><font face="monospace, monospace">use-octavia=False</font></div><div><font face="monospace, monospace">subnet-id=8c9e0448-2d40-449f-a971-e3acde193678</font></div><div><font face="monospace, monospace">create-monitor=yes</font></div><div><font face="monospace, monospace">monitor-delay=1m</font></div><div><font face="monospace, monospace">monitor-timeout=30s</font></div><div><font face="monospace, monospace">monitor-max-retries=3</font></div><div><font face="monospace, monospace">[BlockStorage]</font></div><div><font face="monospace, monospace">bs-version=v2</font></div></div><div><br></div><div><br></div><div><b>>>> ISSUE 2 <<<</b></div><div>Checking again the log of the "kube-controller-manager.service" service I can see this time:</div><div><br></div><div><font face="monospace, monospace">Mar 08 14:29:21 kube-cluster-march-ppqfakx76wsm-master-0.novalocal runc[3013]: I0308 14:29:21.403038       1 event.go:221] Event(v1.ObjectReference{Kind:"PersistentVolumeClaim", Namespace:"default", Name:"cinder-claim", UID:"ea41e0ac-41ad-11e9-8ffc-fa163e9b393f", APIVersion:"v1", ResourceVersion:"112059", FieldPath:""}): type: 'Warning' reason: 'ProvisioningFailed' Failed to provision volume with StorageClass "standard2": unable to initialize cinder client for region: RegionOne, err: unable to initialize cinder v2 client for region RegionOne: No suitable endpoint could be found in the service catalog.<br></font></div><div><br></div><div><br></div><div><br></div><div>From Openstack I see:</div><div><br></div><div><div><font face="monospace, monospace">root@hce03:~# openstack endpoint list | grep keystone</font></div><div><font face="monospace, monospace">| 011e5905a4a04e348b3fd1d3d1a1ab09 | RegionOne | keystone     | identity        | True    | public    | <a href="http://10.1.7.201:5000">http://10.1.7.201:5000</a>                    |</font></div><div><font face="monospace, monospace">| 0fb51c8e0edb45839162a1afe412f9f7 | RegionOne | keystone     | identity        | True    | internal  | <a href="http://10.1.7.200:5000">http://10.1.7.200:5000</a>                    |</font></div><div><font face="monospace, monospace">| 34c269a31260459fbd2c0967fda55b1d | RegionOne | keystone     | identity        | True    | admin     | <a href="http://10.1.7.200:35357">http://10.1.7.200:35357</a>                   |</font></div><div><font face="monospace, monospace">root@hce03:~# openstack endpoint list | grep cinder</font></div><div><font face="monospace, monospace">| 55b109ed383c4705b71c589bdb0da697 | RegionOne | cinderv3     | volumev3        | True    | admin     | <a href="http://10.1.7.200:8776/v3/%(tenant_id)s">http://10.1.7.200:8776/v3/%(tenant_id)s</a>   |</font></div><div><font face="monospace, monospace">| 6386e4f41af94c25ac8c305c7dbc1af4 | RegionOne | cinderv3     | volumev3        | True    | public    | <a href="http://10.1.7.201:8776/v3/%(tenant_id)s">http://10.1.7.201:8776/v3/%(tenant_id)s</a>   |</font></div><div><font face="monospace, monospace">| 78e706cd0cd74a42b43adc051100b0bc | RegionOne | cinderv2     | volumev2        | True    | admin     | <a href="http://10.1.7.200:8776/v2/%(tenant_id)s">http://10.1.7.200:8776/v2/%(tenant_id)s</a>   |</font></div><div><font face="monospace, monospace">| 83a7da1e426f4aa4b5cac3f4a564f480 | RegionOne | cinderv3     | volumev3        | True    | internal  | <a href="http://10.1.7.200:8776/v3/%(tenant_id)s">http://10.1.7.200:8776/v3/%(tenant_id)s</a>   |</font></div><div><font face="monospace, monospace">| a322b3442a62418098554d23ae6a1061 | RegionOne | cinder       | volume          | True    | public    | <a href="http://10.1.7.201:8776/v1/%(tenant_id)s">http://10.1.7.201:8776/v1/%(tenant_id)s</a>   |</font></div><div><font face="monospace, monospace">| c82a65eb60cc49348397085233882ba1 | RegionOne | cinder       | volume          | True    | internal  | <a href="http://10.1.7.200:8776/v1/%(tenant_id)s">http://10.1.7.200:8776/v1/%(tenant_id)s</a>   |</font></div><div><font face="monospace, monospace">| cf2e6d9cb6b640ea876c9f5fe16123d3 | RegionOne | cinderv2     | volumev2        | True    | public    | <a href="http://10.1.7.201:8776/v2/%(tenant_id)s">http://10.1.7.201:8776/v2/%(tenant_id)s</a>   |</font></div><div><font face="monospace, monospace">| e71733a7dbb94a69a44d03ee14389eb5 | RegionOne | cinderv2     | volumev2        | True    | internal  | <a href="http://10.1.7.200:8776/v2/%(tenant_id)s">http://10.1.7.200:8776/v2/%(tenant_id)s</a>   |</font></div><div><font face="monospace, monospace">| e9add20fea3c4d57b2a752832455f6f1 | RegionOne | cinder       | volume          | True    | admin     | <a href="http://10.1.7.200:8776/v1/%(tenant_id)s">http://10.1.7.200:8776/v1/%(tenant_id)s</a>   |</font></div></div><div><br></div><div>From the Kube Master I checked whether or not the auth_url, as per the cloud-config is reachable, and it is:</div><div><br></div><div><div><font face="monospace, monospace">[root@kube-cluster-march-ppqfakx76wsm-master-0 kubernetes]# curl <a href="http://10.1.7.201:5000/v3">http://10.1.7.201:5000/v3</a></font></div><div><font face="monospace, monospace">{"version": {"status": "stable", "updated": "2018-10-15T00:00:00Z", "media-types": [{"base": "application/json", "type": "application/vnd.openstack.identity-v3+json"}], "id": "v3.11", "links": [{"href": "<a href="http://10.1.7.201:5000/v3/">http://10.1.7.201:5000/v3/</a>", "rel": "self"}]}}</font></div></div><div><br></div><div>I also tried to change the block storage version from "v2" to "v1" or "v3". Again the same error.</div><div><br></div><div>May I ask some support on this ?</div><div><br></div><div>Many thanks!</div><div><br></div><div>BR</div><div>/Giuseppe</div><div><br></div><div><br></div></div></div></div></div></div></div></div></div></div></div></div>