kubernetes/pkg/volume/iscsi/iscsi_util.go

const minMultipathCount

const minAttachAttempts

const maxAttachAttempts

const multipathDeviceTimeout

const deviceDiscoveryTimeout

const iscsiadmErrorSessExists

const exit_ISCSI_ERR_SESS_NOT_FOUND

const exit_ISCSI_ERR_NO_OBJS_FOUND

var chapSt

var chapSess

var ifaceTransportNameRe

var ifaceRe

func updateISCSIDiscoverydb(b iscsiDiskMounter, tp string) error {}

func updateISCSINode(b iscsiDiskMounter, tp string) error {}

type StatFunc

type GlobFunc

func waitForPathToExist(devicePath *string, maxRetries int, deviceTransport string) bool {}

func waitForPathToExistInternal(devicePath *string, maxRetries int, deviceTransport string, osStat StatFunc, filepathGlob GlobFunc) bool {}

// make a directory like /var/lib/kubelet/plugins/kubernetes.io/iscsi/iface_name/portal-some_iqn-lun-lun_id
func makePDNameInternal(host volume.VolumeHost, portal string, iqn string, lun string, iface string) string {}

// make a directory like /var/lib/kubelet/plugins/kubernetes.io/iscsi/volumeDevices/iface_name/portal-some_iqn-lun-lun_id
func makeVDPDNameInternal(host volume.VolumeHost, portal string, iqn string, lun string, iface string) string {}

type ISCSIUtil

// MakeGlobalPDName returns path of global plugin dir
func (util *ISCSIUtil) MakeGlobalPDName(iscsi iscsiDisk) string {}

// MakeGlobalVDPDName returns path of global volume device plugin dir
func (util *ISCSIUtil) MakeGlobalVDPDName(iscsi iscsiDisk) string {}

// persistISCSIFile saves iSCSI volume configuration for DetachDisk
// into given directory.
func (util *ISCSIUtil) persistISCSIFile(conf iscsiDisk, mnt string) error {}

func (util *ISCSIUtil) loadISCSI(conf *iscsiDisk, mnt string) error {}

// scanOneLun scans a single LUN on one SCSI bus
// Use this to avoid scanning the whole SCSI bus for all of the LUNs, which
// would result in the kernel on this node discovering LUNs that it shouldn't
// know about. Extraneous LUNs cause problems because they may get deleted
// without us getting notified, since we were never supposed to know about
// them. When LUNs are deleted without proper cleanup in the kernel, I/O errors
// and timeouts result, which can noticeably degrade performance of future
// operations.
func scanOneLun(hostNumber int, lunNumber int) error {}

func waitForMultiPathToExist(devicePaths []string, maxRetries int, deviceUtil volumeutil.DeviceUtil) string {}

// AttachDisk returns devicePath of volume if attach succeeded otherwise returns error
func (util *ISCSIUtil) AttachDisk(b iscsiDiskMounter) (string, error) {}

// persistISCSI saves iSCSI volume configuration for DetachDisk into global
// mount / map directory.
func (util *ISCSIUtil) persistISCSI(b iscsiDiskMounter) error {}

// Delete 1 block device of the form "sd*"
func deleteDevice(deviceName string) error {}

// deleteDevices tries to remove all the block devices and multipath map devices
// associated with a given iscsi device
func deleteDevices(c iscsiDiskUnmounter) error {}

// DetachDisk unmounts and detaches a volume from node
func (util *ISCSIUtil) DetachDisk(c iscsiDiskUnmounter, mntPath string) error {}

// DetachBlockISCSIDisk removes loopback device for a volume and detaches a volume from node
func (util *ISCSIUtil) DetachBlockISCSIDisk(c iscsiDiskUnmapper, mapPath string) error {}

func (util *ISCSIUtil) detachISCSIDisk(exec utilexec.Interface, portals []string, iqn, iface, volName, initiatorName string, found bool) error {}

func getDevByPath(portal, iqn, lun string) string {}

func extractTransportname(ifaceOutput string) (iscsiTransport string) {}

func extractDeviceAndPrefix(mntPath string) (string, string, error) {}

func extractIface(mntPath string) (string, bool) {}

func extractPortalAndIqn(device string) (string, string, error) {}

// Remove duplicates or string
func removeDuplicate(s []string) []string {}

func parseIscsiadmShow(output string) (map[string]string, error) {}

func cloneIface(b iscsiDiskMounter) error {}

// isSessionBusy determines if the iSCSI session is busy by counting both FS and block volumes in use.
func isSessionBusy(host volume.VolumeHost, portal, iqn string) bool {}

// getVolCount returns the number of volumes in use by the kubelet.
// It does so by counting the number of directories prefixed by the given portal and IQN.
func getVolCount(dir, portal, iqn string) (int, error) {}

func ignoreExitCodes(err error, ignoredExitCodes ...int) error {}

func execWithLog(b iscsiDiskMounter, cmd string, args ...string) (string, error) {}