Description of problem: Provision a PV with vsphere cloud provider, then run oc describe pv, found the output contains a string '%v', Version-Release number of selected component (if applicable): openshift v3.8.18 kubernetes v1.8.1+0d5291c How reproducible: Always Steps to Reproduce: 1. Create StorageClass without a StoragePolicyName. 2. Create PVC 3. oc describe pv Actual results: oc describe pv Name: pvc-8b71b882-de49-11e7-942f-0050569fcae9 Labels: <none> Annotations: kubernetes.io/createdby=vsphere-volume-dynamic-provisioner pv.kubernetes.io/bound-by-controller=yes pv.kubernetes.io/provisioned-by=kubernetes.io/vsphere-volume StorageClass: vsphere Status: Bound Claim: jhou/c1 Reclaim Policy: Delete Access Modes: RWO Capacity: 1Gi Message: Source: Type: vSphereVolume (a Persistent Disk resource in vSphere) VolumePath: StoragePolicyName: %v FSType: [datastore1] kubevols/kubernetes-dynamic-pvc-8b71b882-de49-11e7-942f-0050569fcae9.vmdk %!(EXTRA string=ext4, string=)Events: <none> Expected results: String '%v' does not appear in the output. PV Dump: apiVersion: v1 kind: PersistentVolume metadata: annotations: kubernetes.io/createdby: vsphere-volume-dynamic-provisioner pv.kubernetes.io/bound-by-controller: "yes" pv.kubernetes.io/provisioned-by: kubernetes.io/vsphere-volume creationTimestamp: 2017-12-11T11:29:17Z name: pvc-8b71b882-de49-11e7-942f-0050569fcae9 resourceVersion: "696372" selfLink: /api/v1/persistentvolumes/pvc-8b71b882-de49-11e7-942f-0050569fcae9 uid: 85cf1729-de66-11e7-942f-0050569fcae9 spec: accessModes: - ReadWriteOnce capacity: storage: 1Gi claimRef: apiVersion: v1 kind: PersistentVolumeClaim name: c1 namespace: jhou resourceVersion: "696363" uid: 8b71b882-de49-11e7-942f-0050569fcae9 mountOptions: - ro persistentVolumeReclaimPolicy: Delete storageClassName: vsphere vsphereVolume: fsType: ext4 volumePath: '[datastore1] kubevols/kubernetes-dynamic-pvc-8b71b882-de49-11e7-942f-0050569fcae9.vmdk' status: phase: Bound PVC Dump: { "kind": "PersistentVolumeClaim", "apiVersion": "v1", "metadata": { "name": "c1", "annotations": { "volume.beta.kubernetes.io/storage-class": "vsphere" } }, "spec": { "accessModes": [ "ReadWriteOnce" ], "resources": { "requests": { "storage": "1Gi" } } } } StorageClass Dump (if StorageClass used by PV/PVC): kind: StorageClass apiVersion: storage.k8s.io/v1beta1 metadata: name: vsphere provisioner: kubernetes.io/vsphere-volume mountOptions: - "ro" Additional info:
It's already fixed upstream: https://github.com/kubernetes/kubernetes/pull/57202 It's so trivial fix that I dare to port it back to 1.10 and 1.9: https://github.com/openshift/origin/pull/18810
1.9 PR: https://github.com/openshift/origin/pull/18853
Verified in v3.9.7 # oc describe pv pvc-a2506afa-25df-11e8-a981-0050569f5abb Name: pvc-a2506afa-25df-11e8-a981-0050569f5abb Labels: <none> Annotations: kubernetes.io/createdby=vsphere-volume-dynamic-provisioner pv.kubernetes.io/bound-by-controller=yes pv.kubernetes.io/provisioned-by=kubernetes.io/vsphere-volume StorageClass: vspheredefault Status: Bound Claim: jhou/vspherec Reclaim Policy: Delete Access Modes: RWO VolumeMode: Filesystem Capacity: 1Gi Message: Source: Type: vSphereVolume (a Persistent Disk resource in vSphere) VolumePath: [datastore1] kubevols/kubernetes-dynamic-pvc-a2506afa-25df-11e8-a981-0050569f5abb.vmdk FSType: ext4 StoragePolicyName: Events: <none>
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHBA-2018:0489