{"action":"created","issue":{"url":"https://api.github.com/repos/kubernetes/kubernetes/issues/20146","labels_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/20146/labels{/name}","comments_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/20146/comments","events_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/20146/events","html_url":"https://github.com/kubernetes/kubernetes/issues/20146","id":128740367,"number":20146,"title":"Kubernetes uses Openstack cloud provider","user":{"login":"drngsl","id":15996585,"avatar_url":"https://avatars.githubusercontent.com/u/15996585?v=3","gravatar_id":"","url":"https://api.github.com/users/drngsl","html_url":"https://github.com/drngsl","followers_url":"https://api.github.com/users/drngsl/followers","following_url":"https://api.github.com/users/drngsl/following{/other_user}","gists_url":"https://api.github.com/users/drngsl/gists{/gist_id}","starred_url":"https://api.github.com/users/drngsl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/drngsl/subscriptions","organizations_url":"https://api.github.com/users/drngsl/orgs","repos_url":"https://api.github.com/users/drngsl/repos","events_url":"https://api.github.com/users/drngsl/events{/privacy}","received_events_url":"https://api.github.com/users/drngsl/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":9,"created_at":"2016-01-26T06:50:29Z","updated_at":"2016-01-29T17:11:53Z","closed_at":null,"body":"Hi!\r\nI want to use openstack to provide storage for kubernetes pod, but when I run kubelet --cloud-provider=openstack --cloud-config=/etc/cloud.conf. It causes some errors.\r\n\r\nkubernetes version:\r\nClient Version: version.Info{Major:\"1\", Minor:\"0\", GitVersion:\"v1.0.6\", GitCommit:\"388061f00f0d9e4d641f9ed4971c775e1654579d\", GitTreeState:\"clean\"}\r\nServer Version: version.Info{Major:\"1\", Minor:\"0\", GitVersion:\"v1.0.6\", GitCommit:\"388061f00f0d9e4d641f9ed4971c775e1654579d\", GitTreeState:\"clean\"}\r\n\r\n/etc/cloud.conf\r\n[Global]\r\nauth-url=https://162.3.132.50:443/identity/v2.0\r\nusername=username\r\npassword=password\r\nregion=RegionOne1\r\ntenant-id=a1fa87b6b770496e929685fd5f1e0e18\r\n\r\nAnd Errors like this:\r\nI0126 06:32:54.408314   31559 server.go:273] Using root directory: /var/lib/kubelet\r\nI0126 06:32:54.408556   31559 manager.go:127] cAdvisor running in container: \"/user/0.user/7.session\"\r\nI0126 06:32:54.408994   31559 fs.go:93] Filesystem partitions: map[/dev/disk/by-label/cloudimg-rootfs:{mountpoint:/ major:253 minor:1}]\r\nI0126 06:32:54.611071   31559 manager.go:158] Machine: {NumCores:1 CpuFrequency:2499998 MemoryCapacity:2099146752 MachineID:1fae653b5915a5674b404ebe55356ffe SystemUUID:08B94B58-03E6-4DC8-AF72-6676A4C73DAF BootID:19caa194-ce92-4e3c-b7df-947007ac685b Filesystems:[{Device:/dev/disk/by-label/cloudimg-rootfs Capacity:20062785536}] DiskMap:map[253:0:{Name:vda Major:253 Minor:0 Size:21474836480 Scheduler:none}] NetworkDevices:[{Name:eth0 MacAddress:fa:16:3e:e7:f5:b3 Speed:0 Mtu:1400} {Name:flannel0 MacAddress: Speed:10 Mtu:1372}] Topology:[{Id:0 Memory:2099146752 Cores:[{Id:0 Threads:[0] Caches:[{Size:32768 Type:Data Level:1} {Size:32768 Type:Instruction Level:1} {Size:4194304 Type:Unified Level:2}]}] Caches:[]}] CloudProvider:Unknown InstanceType:Unknown}\r\nI0126 06:32:54.612693   31559 manager.go:164] Version: {KernelVersion:3.13.0-49-generic ContainerOsVersion:Ubuntu 14.04.2 LTS DockerVersion:1.6.0 CadvisorVersion:0.16.0}\r\nI0126 06:32:54.644869   31559 server.go:292] Successfully initialized cloud provider: \"openstack\" from the config file: \"/etc/cloud.conf\"\r\nI0126 06:32:55.603302   31559 server.go:413] Using self-signed cert (/var/run/kubernetes/kubelet.crt, /var/run/kubernetes/kubelet.key)\r\nI0126 06:32:55.603472   31559 docker.go:295] Connecting to docker on unix:///var/run/docker.sock\r\nI0126 06:32:55.604560   31559 openstack.go:160] openstack.Instances() called\r\npanic: runtime error: invalid memory address or nil pointer dereference\r\n[signal 0xb code=0x1 addr=0x0 pc=0x53c6e2]\r\n.......\r\n\r\nAssuming that kubelet restart  successfully, if i'd like to create a pod like examples/mysql-cinder-pd/mysql.yaml, can I run cmd 'kubectl create -f examples/mysql-cinder-pd/mysql.yaml' directly? or I need to use shell script cluster/kubectl.sh?"},"comment":{"url":"https://api.github.com/repos/kubernetes/kubernetes/issues/comments/176867352","html_url":"https://github.com/kubernetes/kubernetes/issues/20146#issuecomment-176867352","issue_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/20146","id":176867352,"user":{"login":"loshkovskyi","id":9531056,"avatar_url":"https://avatars.githubusercontent.com/u/9531056?v=3","gravatar_id":"","url":"https://api.github.com/users/loshkovskyi","html_url":"https://github.com/loshkovskyi","followers_url":"https://api.github.com/users/loshkovskyi/followers","following_url":"https://api.github.com/users/loshkovskyi/following{/other_user}","gists_url":"https://api.github.com/users/loshkovskyi/gists{/gist_id}","starred_url":"https://api.github.com/users/loshkovskyi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/loshkovskyi/subscriptions","organizations_url":"https://api.github.com/users/loshkovskyi/orgs","repos_url":"https://api.github.com/users/loshkovskyi/repos","events_url":"https://api.github.com/users/loshkovskyi/events{/privacy}","received_events_url":"https://api.github.com/users/loshkovskyi/received_events","type":"User","site_admin":false},"created_at":"2016-01-29T17:11:53Z","updated_at":"2016-01-29T17:11:53Z","body":"@drngsl, today I'm not able to reproduce the issue on my environment any more. We've switched to using API keys instead of passwords in Keystone. So using the same environment as before, I'm no longer able to catch the panic error. This leads me to a thought that the error had something to do with the password. I had some special symbols in the password (like a dollar sign), whereas the API keys use only letters and digits. I'll see if I come up with an idea of how to test this.\r\n\r\nSo now, I'm able to connect to Cinder without errors (I cut output a little bit for readability):\r\n```\r\n# cat /etc/issue\r\nUbuntu 14.04.3 LTS\r\n\r\n# kubectl version\r\nClient Version: version.Info{Major:\"1\", Minor:\"0\", GitVersion:\"v1.0.3\", GitCommit:\"61c6ac5f350253a4dc002aee97b7db7ff01ee4ca\", GitTreeState:\"clean\"}\r\nServer Version: version.Info{Major:\"1\", Minor:\"0\", GitVersion:\"v1.0.3\", GitCommit:\"61c6ac5f350253a4dc002aee97b7db7ff01ee4ca\", GitTreeState:\"clean\"}\r\n\r\n# /opt/bin/kubelet --address=0.0.0.0 \\\r\n                   --port=10250 \\\r\n                   --hostname-override=kube-test1 \\\r\n                   --api-servers=http://kube-test1:8080 \\\r\n                   --logtostderr=true \\\r\n                   --cluster-dns=192.168.3.10 \\\r\n                   --cluster-domain=cluster.local \\\r\n                   --cloud-provider=openstack \\\r\n                   --cloud-config=/etc/cloud.conf \\\r\n                   --v=4\r\n\r\nI0129 16:25:19.943279   16025 server.go:524] Using self-signed cert (/var/run/kubernetes/kubelet.crt, /var/run/kubernetes/kubelet.key)\r\nW0129 16:25:19.943447   16025 server.go:585] Could not load kubeconfig file /var/lib/kubelet/kubeconfig: stat /var/lib/kubelet/kubeconfig: no such file or directory. Trying auth path instead.\r\nW0129 16:25:19.943481   16025 server.go:547] Could not load kubernetes auth path /var/lib/kubelet/kubernetes_auth: stat /var/lib/kubelet/kubernetes_auth: no such file or directory. Continuing with defaults.\r\nI0129 16:25:22.206404   16025 server.go:468] Successfully initialized cloud provider: \"openstack\" from the config file: \"/etc/cloud.conf\"\r\nI0129 16:25:22.282398   16025 fs.go:108] Filesystem partitions: map[/dev/disk/by-uuid/f27e46f8-dd81-4edb-86b0-2ec0696d26dd:{mountpoint:/ major:253 minor:1 fsType: blockSize:0}]\r\nI0129 16:25:22.307949   16025 server.go:485] Using root directory: /var/lib/kubelet\r\nI0129 16:25:22.308210   16025 openstack.go:164] openstack.Instances() called\r\nI0129 16:25:25.295486   16025 openstack.go:201] Found 25 compute flavors\r\nI0129 16:25:25.295658   16025 openstack.go:202] Claiming to support Instances\r\nI0129 16:25:25.295737   16025 server.go:718] cloud provider determined current node name to be kube-test1\r\nI0129 16:25:25.295845   16025 server.go:728] Sending events to api server.\r\nI0129 16:25:25.295991   16025 server.go:808] Watching apiserver\r\nI0129 16:25:25.302668   16025 config.go:254] Setting pods for source api\r\n...\r\n```\r\n\r\nAnd I've tested the OpenStack cloud provider works fine with the current latest version of Kubernetes:\r\n```\r\n# kubectl version\r\nClient Version: version.Info{Major:\"1\", Minor:\"1\", GitVersion:\"v1.1.7\", GitCommit:\"e4e6878293a339e4087dae684647c9e53f1cf9f0\", GitTreeState:\"clean\"}\r\nServer Version: version.Info{Major:\"1\", Minor:\"1\", GitVersion:\"v1.1.7\", GitCommit:\"e4e6878293a339e4087dae684647c9e53f1cf9f0\", GitTreeState:\"clean\"}\r\n```\r\n\r\nAlthough, there shouldn't be any problems with the version: the plugin was last time updated in October:\r\n```\r\ngit log --stat kubernetes/pkg/cloudprovider/providers/openstack/openstack.go\r\n```\r\n\r\nCould you verify the password you use?\r\nAlso, please pay attention to this option:\r\n```\r\n--hostname-override=kube-test1\r\n```\r\nThis hostname should match the hostname of your machine and the name your machine has in Nova, which you can check with:\r\n```\r\nopenstack server list\r\n```\r\nIt's crucial for the hostnames to match because plugin compares them to determine to which host your Cinder volumes should be attached.\r\n\r\nIf they don't match, you may start getting such errors in your `kubelet` logs:\r\n```\r\nE0129 16:28:16.408227   16098 kubelet.go:866] Unable to construct api.Node object for kubelet: failed to get external ID from cloud provider: Failed to find object\r\n```"}}