vmware-archive / kubernetes-archived

This repository is archived. Please file in-tree vSphere Cloud Provider issues at https://github.com/kubernetes/kubernetes/issues . CSI Driver for vSphere is available at https://github.com/kubernetes/cloud-provider-vsphere
Apache License 2.0
46 stars 31 forks source link

vSphere Cloud Provider currently support RWO access does that mean, recreating a pod on new vm cannot access previously used volume? #507

Closed GajaHebbar closed 6 years ago

GajaHebbar commented 6 years ago

Is this a BUG REPORT or FEATURE REQUEST?:

Uncomment only one, leave it on its own line:

/kind bug

I have a cluster with a master and 3 worker node, where I have created a pod(worker-1) which is say database image, and there is a pvc/sc attached to it. if for some reason the pod get killed and recreated on different vm(worker-2), can the pod which was created on worker-1 which accessed vloume and stored data be accessed by same pod on worker-2 when it gets recreated? :

What you expected to happen:

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

Anything else we need to know?:

Environment:

divyenpatel commented 6 years ago

@GajaHebbar

VCP supports RWO mode means, Volume is accessible to pods co-located on same worker Node VM. Volume cannot be attached to multiple Node VMs at the same time.

When POD is re-created on the new Node. Disk is detached from the previous node VM and gets attached to the new Node VM.

GajaHebbar commented 6 years ago

@divyenpatel Thank you for the clarification

GajaHebbar commented 6 years ago

@divyenpatel One quick question on vsphere.conf network network my network is as shown as above, and I want to use network 10-133-(84,85,86,87)-X

so in vsphere.conf network should be mentioned as bellow? Is that correct?

[Network] public-network = "Pune_Shared_Cluster1_Public_Network/10-133-(84,85,86,87)-X"

divyenpatel commented 6 years ago

@GajaHebbar We do not need to specify network folder with the network name.

Following should be good.

[Network]
public-network = "10-133-(84,85,86,87)-X"

See how it is used. https://github.com/kubernetes/kubernetes/blob/e3dbad3211831b770f98ea4d5e24235dc0e038e3/pkg/cloudprovider/providers/vsphere/vsphere.go#L647-L665

Can you verify Addresses set on the Node?

kubectl describe node node-name
.
.
Addresses:
  ExternalIP:  1.1.1.1
  InternalIP:  1.1.1.1
  Hostname:    kubernetes-master
.
.
GajaHebbar commented 6 years ago

Ok, so for any level of folder for network need not to be specified for public-network.

These are the addresses for 1 master and 2 worker node.

Addresses: ExternalIP: 10.133.85.191 InternalIP: 10.133.85.191 Hostname: flexmaster191

Addresses: ExternalIP: 10.133.85.192 InternalIP: 10.133.85.192 Hostname: flexworker1

Addresses: ExternalIP: 10.133.85.193 InternalIP: 10.133.85.193 Hostname: flexworker2

As per your information these look correct. Please confirm

divyenpatel commented 6 years ago

Yes looks correct to me. Node IP addresses (10.133.85.*) looks belonging to 10-133-(84,85,86,87)-X network.

GajaHebbar commented 6 years ago

Thank you

GajaHebbar commented 6 years ago

@divyenpatel So for now we don't have a support to RWM(ReadWriteMany) is that correct. In that case is this planned for future?

divyenpatel commented 6 years ago

@GajaHebbar Yes in current releases we do not have support for ReadWriteMany. We are working on adding this support in future releases.

Please subscribe the issue: https://github.com/vmware/kubernetes/issues/306 to get an update on this feature request.