Skip to content
This repository has been archived by the owner on Sep 7, 2022. It is now read-only.

Cannot complete the operation because the file or folder [Datastore1] kubevols/kubernetes-dynamic-pvc-xxxxx.vmdk already exists. #504

Open
dkirrane opened this issue Sep 6, 2018 · 3 comments

Comments

@dkirrane
Copy link

dkirrane commented Sep 6, 2018

Is this a BUG REPORT or FEATURE REQUEST?:
/kind bug

What happened:
vSphere Web Client Recent Tasks filling up with these errors

Task Name Status
Reconfigure virtual machine Failed to add disk 'scsi0:2'
Create virtual Disk Cannot complete the operation because the file or folder [Datastore1] kubevols/kubernetes-dynamic-pvc-ca5f601a-a7a6-11e8-85c4-00505680e70a.vmdk already exists.

What you expected to happen:
No errors

How to reproduce it (as minimally and precisely as possible):

Anything else we need to know?:
vCenter Version 6.5.0 Build 8024368
Datastore Type VMFS 5
K8s Worker node on VMware ESXi, 5.5.0, 6480324
K8s Worker node is CentOS 7.4

Environment:

  • Kubernetes version (use kubectl version):
kubectl version
Client Version: version.Info{Major:"1", Minor:"10", GitVersion:"v1.10.3", GitCommit:"2bba0127d85d5a46ab4b778548be28623b32d0b0", GitTreeState:"clean", BuildDate:"2018-05-21T09:17:39Z", GoVersion:"go1.9.3", Compiler:"gc", Platform:"linux/amd64"}
Server Version: version.Info{Major:"1", Minor:"10", GitVersion:"v1.10.3", GitCommit:"2bba0127d85d5a46ab4b778548be28623b32d0b0", GitTreeState:"clean", BuildDate:"2018-05-21T09:05:37Z", GoVersion:"go1.9.3", Compiler:"gc", Platform:"linux/amd64"}
  • Cloud provider or hardware configuration:
    VCP configured with kubelet, kube-apiserver, kube-controller-manager VCP flags and vsphere.conf
vCenter Version 6.5.0 Build 8024368
Datastore Type VMFS 5
K8s Worker node on VMware ESXi, 5.5.0, 6480324
K8s Worker node is CentOS 7.4
  • OS (e.g. from /etc/os-release):
NAME="CentOS Linux"
VERSION="7 (Core)"
ID="centos"
ID_LIKE="rhel fedora"
VERSION_ID="7"
PRETTY_NAME="CentOS Linux 7 (Core)"
ANSI_COLOR="0;31"
CPE_NAME="cpe:/o:centos:centos:7"
HOME_URL="https://www.centos.org/"
BUG_REPORT_URL="https://bugs.centos.org/"

CENTOS_MANTISBT_PROJECT="CentOS-7"
CENTOS_MANTISBT_PROJECT_VERSION="7"
REDHAT_SUPPORT_PRODUCT="centos"
REDHAT_SUPPORT_PRODUCT_VERSION="7"
  • Kernel (e.g. uname -a):
    Linux master1-lima169 3.10.0-693.el7.x86_64 #1 SMP Tue Aug 22 21:09:27 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
  • Install tools:
    kubeadm version: &version.Info{Major:"1", Minor:"10", GitVersion:"v1.10.3", GitCommit:"2bba0127d85d5a46ab4b778548be28623b32d0b0", GitTreeState:"clean", BuildDate:"2018-05-21T09:05:37Z", GoVersion:"go1.9.3", Compiler:"gc", Platform:"linux/amd64"}
  • Others:
@divyenpatel
Copy link

@dkirrane Can you share YAMLs you are using to create Storage Class, PVC and PV?
Are you using storagepolicyName in the StorageClass to provision PV?

@gcabrerap
Copy link

Hello, we have the same problem.
A very simple StorageClass was created:

kind: StorageClass
apiVersion: storage.k8s.io/v1beta1
metadata:
  name: slow
provisioner: kubernetes.io/vsphere-volume
parameters:
    diskformat: thin
    fstype:     ext3

And a PVC with simple data was created:

kind: PersistentVolumeClaim
apiVersion: v1
metadata:
  name: tester
spec:
  accessModes:
    - ReadWriteOnce
  volumeMode: Filesystem
  resources:
    requests:
      storage: 1Gi
  storageClassName: slow

And when reviewing the PVC delivers the following comment:

# kubectl describe pvc tester
Name:          tester
Namespace:     default
StorageClass:  slow
Status:        Pending
Volume:
Labels:        <none>
Annotations:   volume.beta.kubernetes.io/storage-provisioner=kubernetes.io/vsphere-volume
Finalizers:    [kubernetes.io/pvc-protection]
Capacity:
Access Modes:
Events:
  Type     Reason              Age   From                         Message
  ----     ------              ----  ----                         -------
  Warning  ProvisioningFailed  7s    persistentvolume-controller  Failed to provision volume with StorageClass "slow": No se puede completar la operación porque el archivo o la carpeta [DATASTORE-01] kubevols/k8scl-dynamic-pvc-d90c343d-bdb9-11e8-9cb4-0050569e2253.vmdk ya existen.

The Volume in the DataStore is created at the moment of executing the pvc, but for some reason it reflects that it is already created.

@nelsonyaccuzzi
Copy link

I have a similar problem with my kubespray deployment, and I resolve it by creating a kube-dummyDisk.vmdk in the kubevols folder. Try this

vmkfstools -c 5G –diskformat thin vmfs/volumes/<your datastore>/kubevols/kube-dummyDisk.vmdk

I think this have to do with some wrong permission privileges during the deployment of the cluster.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants