Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1530225

Summary: [vSphere] Cloud provider broken, service account "vSphere-cloud-provider" does not exist
Product: OpenShift Container Platform Reporter: Jianwei Hou <jhou>
Component: StorageAssignee: Hemant Kumar <hekumar>
Status: CLOSED CURRENTRELEASE QA Contact: Jianwei Hou <jhou>
Severity: high Docs Contact:
Priority: high    
Version: 3.9.0CC: aos-bugs, aos-storage-staff, hekumar, smunilla, xtian
Target Milestone: ---Keywords: TestBlocker
Target Release: 3.9.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: v3.9.0-0.20.0 Doc Type: Bug Fix
Doc Text:
Cause: The cloud provider name being used by vsphere was invalid. Consequence: vSphere cloudprovider and provisioning of volumes was broken. Fix: Change cloudprovider name for vSphere to be inline with expected spec. Result: vSphere cloudprovider and provisioning of volumes work.
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-06-18 18:13:14 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Jianwei Hou 2018-01-02 10:16:37 UTC
Description of problem:

After upgraded to 3.9, atomic-openshift-master-controllers reported an error:

```
Jan  2 16:09:07 ocp38 atomic-openshift-master-controllers: F0102 16:09:07.169092   27717 client_builder.go:273] ServiceAccount "vSphere-cloud-provider" is invalid: metadata.name: Invalid value: "vSphere-cloud-provider": a DNS-1123 subdomain must consist of lower case alphanumeric characters, '-' or '.', and must start and end with an alphanumeric character (e.g. 'example.com', regex used for validation is '[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*')
```

Just a minute ago it was functional in 3.8.


Version-Release number of selected component (if applicable):
openshift v3.9.0-0.9.0
kubernetes v1.8.1+0d5291c
etcd 3.2.8

How reproducible:
Always

Steps to Reproduce:
1.  Configure OCP 3.9, enable vSphere cloud provider
2. Create StorageClass and PVC
3. Check atomic-openshift-master-controllers log

Actual results:
2. PV can not be provisioned
3. Log:

```
Jan  2 17:57:45 ocp38 atomic-openshift-master-api: I0102 17:57:45.233890   38287 wrap.go:42] GET /api/v1/namespaces/kube-system/serviceaccounts/vSphere-cloud-provider: (3.872489129s) 404 [[openshift/v1.8.1+0d5291c (linux/amd64) kubernetes/0d5291c/controller-manager] 10.66.146.129:59634]
Jan  2 17:57:45 ocp38 atomic-openshift-master-controllers: F0102 17:57:45.505886   40790 client_builder.go:273] ServiceAccount "vSphere-cloud-provider" is invalid: metadata.name: Invalid value: "vSphere-cloud-provider": a DNS-1123 subdomain must consist of lower case alphanumeric characters, '-' or '.', and must start and end with an alphanumeric character (e.g. 'example.com', regex used for validation is '[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*')
```

There is no such service account "vSphere-cloud-provider".
# oc get serviceaccounts -n kube-system 
NAME                         SECRETS   AGE
attachdetach-controller      2         12d
builder                      2         12d
certificate-controller       2         12d
cronjob-controller           2         12d
daemon-set-controller        2         12d
default                      2         12d
deployer                     2         12d
deployment-controller        2         12d
disruption-controller        2         12d
endpoint-controller          2         12d
generic-garbage-collector    2         12d
job-controller               2         12d
namespace-controller         2         12d
node-controller              2         12d
persistent-volume-binder     2         12d
pod-garbage-collector        2         12d
replicaset-controller        2         12d
replication-controller       2         12d
resourcequota-controller     2         12d
service-account-controller   2         12d
service-controller           2         12d
statefulset-controller       2         12d



Expected results:
vSphere cloud provider is functional.

Additional info:

Comment 1 Hemant Kumar 2018-01-02 14:20:20 UTC
This has been fixed in upstream - https://github.com/kubernetes/kubernetes/pull/57286 we need to backport the fix.

Comment 2 Hemant Kumar 2018-01-02 15:44:42 UTC
https://github.com/openshift/origin/pull/17961

Comment 3 Hemant Kumar 2018-01-15 18:26:19 UTC
The fix has been merged and is part of version v3.9.0-0.19.0. please check.

Comment 4 Xiaoli Tian 2018-01-16 06:50:59 UTC
This has been merged in OCP since v3.9.0-0.17.0, move it to ON_QA to test on latest OCP 3.9 build.

Comment 5 Jianwei Hou 2018-01-16 10:35:56 UTC
Verified this is fixed in v3.9.0-0.20.0