Disconnect iSCSI Luns from Host
Opened this issue · 2 comments
I've noticed that when I delete a workload that had an iSCSI Flexvolume mounted, it leaves the target and LUN connected on the host. Should it be automatically disconnecting that target after a workload has been removed?
I'm facing the same issue, it's expected to be disconnect in order allow further operations by the SAN (destroy the volume for example)
FlexVolumes itself has been kind of deprecated ... is this project still supported?
Currently the code leaves the target & lun connected incase it is being used by another container on the host. You could submit a PR to disconnect it in the unmount and make it optional in the storage class.
Why doesn't code disconnect
It has been a bit of time since I originally wrote this code, but if I remember correct due to the nature of flexvolume the information containing refcounts of how many workloads are using the drive where not plumbed if you needed passwords. See https://github.com/kubernetes/community/blob/master/contributors/devel/sig-storage/flexvolume.md#unmount-device
FlexProvisioner
The FlexProvisioner written against the Microsoft iSCSI target server does a forceful disconnect of drives during the delete. See
Deprecated
As far as deprecated. FlexVolume is an hosted plugin in kubernetes codebase. Kubernetes is currently trying to move all the plugins outside of the tree. FlexVolume will exist for the time being to support existing users. Linux development for iSCSI CSI drivers for kubernetes is at https://github.com/kubernetes-csi/csi-driver-iscsi