Documentation ¶
Index ¶
- Constants
- func GetISCSIDiskMounter(iscsiInfo *iscsiDisk, readOnly bool, fsType string, mountOptions []string, ...) *iscsiDiskMounter
- func GetISCSIDiskUnmounter(volumeId *utils.VolumeId) *iscsiDiskUnmounter
- func GetISCSIInfo(ctx context.Context, vid *utils.VolumeId, req *csi.NodePublishVolumeRequest, ...) (*iscsiDisk, error)
- func GetNodeISCSIInfo(vid *utils.VolumeId, req *csi.NodePublishVolumeRequest, targetIqn string, ...) (*iscsiDisk, error)
- func GetNodeList() ([]string, error)
- func GetNodeName(nodeID string) (string, error)
- func InitClusterInterface() error
- func NewZFSSANodeServer(zd *ZFSSADriver) *csi.NodeServer
- type ISCSIUtil
- func (util *ISCSIUtil) AttachDisk(ctx context.Context, b iscsiDiskMounter, devicePath string) (string, error)
- func (util *ISCSIUtil) ConnectDisk(ctx context.Context, b iscsiDiskMounter) (string, error)
- func (util *ISCSIUtil) DetachDisk(ctx context.Context, c iscsiDiskUnmounter, targetPath string) error
- func (util *ISCSIUtil) Rescan(ctx context.Context) (string, error)
- type IscsiAdmReturnValues
- type Mounter
- type NodeMounter
- type ZFSSADriver
- func (zd *ZFSSADriver) ControllerExpandVolume(ctx context.Context, req *csi.ControllerExpandVolumeRequest) (*csi.ControllerExpandVolumeResponse, error)
- func (zd *ZFSSADriver) ControllerGetCapabilities(ctx context.Context, req *csi.ControllerGetCapabilitiesRequest) (*csi.ControllerGetCapabilitiesResponse, error)
- func (zd *ZFSSADriver) ControllerPublishVolume(ctx context.Context, req *csi.ControllerPublishVolumeRequest) (*csi.ControllerPublishVolumeResponse, error)
- func (zd *ZFSSADriver) ControllerUnpublishVolume(ctx context.Context, req *csi.ControllerUnpublishVolumeRequest) (*csi.ControllerUnpublishVolumeResponse, error)
- func (zd *ZFSSADriver) CreateSnapshot(ctx context.Context, req *csi.CreateSnapshotRequest) (*csi.CreateSnapshotResponse, error)
- func (zd *ZFSSADriver) CreateVolume(ctx context.Context, req *csi.CreateVolumeRequest) (*csi.CreateVolumeResponse, error)
- func (zd *ZFSSADriver) DeleteSnapshot(ctx context.Context, req *csi.DeleteSnapshotRequest) (*csi.DeleteSnapshotResponse, error)
- func (zd *ZFSSADriver) DeleteVolume(ctx context.Context, req *csi.DeleteVolumeRequest) (*csi.DeleteVolumeResponse, error)
- func (zd *ZFSSADriver) GetCapacity(ctx context.Context, req *csi.GetCapacityRequest) (*csi.GetCapacityResponse, error)
- func (zd *ZFSSADriver) GetPasswordFromCred() (string, error)
- func (zd *ZFSSADriver) GetPluginCapabilities(ctx context.Context, req *csi.GetPluginCapabilitiesRequest) (*csi.GetPluginCapabilitiesResponse, error)
- func (zd *ZFSSADriver) GetPluginInfo(ctx context.Context, req *csi.GetPluginInfoRequest) (*csi.GetPluginInfoResponse, error)
- func (zd *ZFSSADriver) GetUsernameFromCred() (string, error)
- func (zd *ZFSSADriver) ListSnapshots(ctx context.Context, req *csi.ListSnapshotsRequest) (*csi.ListSnapshotsResponse, error)
- func (zd *ZFSSADriver) ListVolumes(ctx context.Context, req *csi.ListVolumesRequest) (*csi.ListVolumesResponse, error)
- func (zd *ZFSSADriver) NodeExpandVolume(ctx context.Context, req *csi.NodeExpandVolumeRequest) (*csi.NodeExpandVolumeResponse, error)
- func (zd *ZFSSADriver) NodeGetCapabilities(ctx context.Context, req *csi.NodeGetCapabilitiesRequest) (*csi.NodeGetCapabilitiesResponse, error)
- func (zd *ZFSSADriver) NodeGetInfo(ctx context.Context, req *csi.NodeGetInfoRequest) (*csi.NodeGetInfoResponse, error)
- func (zd *ZFSSADriver) NodeGetVolumeStats(ctx context.Context, req *csi.NodeGetVolumeStatsRequest) (*csi.NodeGetVolumeStatsResponse, error)
- func (zd *ZFSSADriver) NodePublishVolume(ctx context.Context, req *csi.NodePublishVolumeRequest) (*csi.NodePublishVolumeResponse, error)
- func (zd *ZFSSADriver) NodeStageBlockVolume(ctx context.Context, req *csi.NodeStageVolumeRequest) (*csi.NodeStageVolumeResponse, error)
- func (zd *ZFSSADriver) NodeStageVolume(ctx context.Context, req *csi.NodeStageVolumeRequest) (*csi.NodeStageVolumeResponse, error)
- func (zd *ZFSSADriver) NodeUnpublishVolume(ctx context.Context, req *csi.NodeUnpublishVolumeRequest) (*csi.NodeUnpublishVolumeResponse, error)
- func (zd *ZFSSADriver) NodeUnstageBlockVolume(ctx context.Context, req *csi.NodeUnstageVolumeRequest) (*csi.NodeUnstageVolumeResponse, error)
- func (zd *ZFSSADriver) NodeUnstageVolume(ctx context.Context, req *csi.NodeUnstageVolumeRequest) (*csi.NodeUnstageVolumeResponse, error)
- func (zd *ZFSSADriver) Probe(ctx context.Context, req *csi.ProbeRequest) (*csi.ProbeResponse, error)
- func (zd *ZFSSADriver) Run()
- func (zd *ZFSSADriver) ValidateVolumeCapabilities(ctx context.Context, req *csi.ValidateVolumeCapabilitiesRequest) (*csi.ValidateVolumeCapabilitiesResponse, error)
- type ZfssaBlockVolume
- type ZfssaCredentials
Constants ¶
const ( ISCSI_SUCCESS IscsiAdmReturnValues = 0 ISCSI_ERR_SESS_NOT_FOUND = 2 ISCSI_ERR_TRANS_TIMEOUT = 8 ISCSI_ERR_ISCSID_NOTCONN = 20 ISCSI_ERR_NO_OBJS_FOUND = 21 )
const ( // Default Log Level DefaultLogLevel = "3" DefaultCertPath = "/mnt/certs/zfssa.crt" DefaultCredPath = "/mnt/zfssa/zfssa.yaml" DefaultConfigPath = "/mnt/config/config.yaml" )
const ( // Helpful size constants Kib int64 = 1024 Mib int64 = Kib * 1024 Gib int64 = Mib * 1024 Gib100 int64 = Gib * 100 Tib int64 = Gib * 1024 Tib100 int64 = Tib * 100 DefaultVolumeSizeBytes int64 = 50 * Gib )
const ( UsernamePattern string = `^[a-zA-Z][a-zA-Z0-9_\-\.]*$` UsernameLength int = 255 )
Variables ¶
This section is empty.
Functions ¶
func GetISCSIDiskMounter ¶
func GetISCSIDiskUnmounter ¶
func GetISCSIInfo ¶
func GetNodeISCSIInfo ¶
func GetNodeList ¶
Returns the list of nodes in the form of a slice containing their name.
func GetNodeName ¶
Returns the node name based on the passed in node ID.
func NewZFSSANodeServer ¶
func NewZFSSANodeServer(zd *ZFSSADriver) *csi.NodeServer
Types ¶
type ISCSIUtil ¶
type ISCSIUtil struct{}
func (*ISCSIUtil) AttachDisk ¶
func (*ISCSIUtil) ConnectDisk ¶
func (*ISCSIUtil) DetachDisk ¶
type Mounter ¶
type Mounter interface { mount.Interface GetDeviceName(mountPath string) (string, int, error) MakeFile(pathname string) error ExistsPath(pathname string) (bool, error) }
Mounter is an interface for mount operations
type NodeMounter ¶
type NodeMounter struct {
mount.SafeFormatAndMount
}
func (*NodeMounter) ExistsPath ¶
func (mount *NodeMounter) ExistsPath(pathname string) (bool, error)
Check if a file exists
func (*NodeMounter) GetDeviceName ¶
func (m *NodeMounter) GetDeviceName(mountPath string) (string, int, error)
Retrieve a device name from a mount point (this is a compatibility interface)
func (*NodeMounter) MakeFile ¶
func (mounter *NodeMounter) MakeFile(pathname string) error
Make a file at the pathname
type ZFSSADriver ¶
type ZFSSADriver struct { NodeMounter Mounter // contains filtered or unexported fields }
func NewZFSSADriver ¶
func NewZFSSADriver(driverName, version string) (*ZFSSADriver, error)
Creates and returns a new ZFSSA driver structure.
func (*ZFSSADriver) ControllerExpandVolume ¶
func (zd *ZFSSADriver) ControllerExpandVolume(ctx context.Context, req *csi.ControllerExpandVolumeRequest) ( *csi.ControllerExpandVolumeResponse, error)
func (*ZFSSADriver) ControllerGetCapabilities ¶
func (zd *ZFSSADriver) ControllerGetCapabilities(ctx context.Context, req *csi.ControllerGetCapabilitiesRequest) ( *csi.ControllerGetCapabilitiesResponse, error)
func (*ZFSSADriver) ControllerPublishVolume ¶
func (zd *ZFSSADriver) ControllerPublishVolume(ctx context.Context, req *csi.ControllerPublishVolumeRequest) ( *csi.ControllerPublishVolumeResponse, error)
func (*ZFSSADriver) ControllerUnpublishVolume ¶
func (zd *ZFSSADriver) ControllerUnpublishVolume(ctx context.Context, req *csi.ControllerUnpublishVolumeRequest) ( *csi.ControllerUnpublishVolumeResponse, error)
func (*ZFSSADriver) CreateSnapshot ¶
func (zd *ZFSSADriver) CreateSnapshot(ctx context.Context, req *csi.CreateSnapshotRequest) ( *csi.CreateSnapshotResponse, error)
func (*ZFSSADriver) CreateVolume ¶
func (zd *ZFSSADriver) CreateVolume(ctx context.Context, req *csi.CreateVolumeRequest) ( *csi.CreateVolumeResponse, error)
func (*ZFSSADriver) DeleteSnapshot ¶
func (zd *ZFSSADriver) DeleteSnapshot(ctx context.Context, req *csi.DeleteSnapshotRequest) ( *csi.DeleteSnapshotResponse, error)
func (*ZFSSADriver) DeleteVolume ¶
func (zd *ZFSSADriver) DeleteVolume(ctx context.Context, req *csi.DeleteVolumeRequest) ( *csi.DeleteVolumeResponse, error)
func (*ZFSSADriver) GetCapacity ¶
func (zd *ZFSSADriver) GetCapacity(ctx context.Context, req *csi.GetCapacityRequest) ( *csi.GetCapacityResponse, error)
func (*ZFSSADriver) GetPasswordFromCred ¶
func (zd *ZFSSADriver) GetPasswordFromCred() (string, error)
Retrieves just the username from a credential file
func (*ZFSSADriver) GetPluginCapabilities ¶
func (zd *ZFSSADriver) GetPluginCapabilities(ctx context.Context, req *csi.GetPluginCapabilitiesRequest) ( *csi.GetPluginCapabilitiesResponse, error)
func (*ZFSSADriver) GetPluginInfo ¶
func (zd *ZFSSADriver) GetPluginInfo(ctx context.Context, req *csi.GetPluginInfoRequest) ( *csi.GetPluginInfoResponse, error)
func (*ZFSSADriver) GetUsernameFromCred ¶
func (zd *ZFSSADriver) GetUsernameFromCred() (string, error)
Retrieves just the username from a credential file (zd.config.CredLocation)
func (*ZFSSADriver) ListSnapshots ¶
func (zd *ZFSSADriver) ListSnapshots(ctx context.Context, req *csi.ListSnapshotsRequest) ( *csi.ListSnapshotsResponse, error)
func (*ZFSSADriver) ListVolumes ¶
func (zd *ZFSSADriver) ListVolumes(ctx context.Context, req *csi.ListVolumesRequest) ( *csi.ListVolumesResponse, error)
func (*ZFSSADriver) NodeExpandVolume ¶
func (zd *ZFSSADriver) NodeExpandVolume(ctx context.Context, req *csi.NodeExpandVolumeRequest) ( *csi.NodeExpandVolumeResponse, error)
func (*ZFSSADriver) NodeGetCapabilities ¶
func (zd *ZFSSADriver) NodeGetCapabilities(ctx context.Context, req *csi.NodeGetCapabilitiesRequest) ( *csi.NodeGetCapabilitiesResponse, error)
func (*ZFSSADriver) NodeGetInfo ¶
func (zd *ZFSSADriver) NodeGetInfo(ctx context.Context, req *csi.NodeGetInfoRequest) ( *csi.NodeGetInfoResponse, error)
func (*ZFSSADriver) NodeGetVolumeStats ¶
func (zd *ZFSSADriver) NodeGetVolumeStats(ctx context.Context, req *csi.NodeGetVolumeStatsRequest) ( *csi.NodeGetVolumeStatsResponse, error)
func (*ZFSSADriver) NodePublishVolume ¶
func (zd *ZFSSADriver) NodePublishVolume(ctx context.Context, req *csi.NodePublishVolumeRequest) ( *csi.NodePublishVolumeResponse, error)
func (*ZFSSADriver) NodeStageBlockVolume ¶
func (zd *ZFSSADriver) NodeStageBlockVolume(ctx context.Context, req *csi.NodeStageVolumeRequest) ( *csi.NodeStageVolumeResponse, error)
Nothing is done
func (*ZFSSADriver) NodeStageVolume ¶
func (zd *ZFSSADriver) NodeStageVolume(ctx context.Context, req *csi.NodeStageVolumeRequest) ( *csi.NodeStageVolumeResponse, error)
func (*ZFSSADriver) NodeUnpublishVolume ¶
func (zd *ZFSSADriver) NodeUnpublishVolume(ctx context.Context, req *csi.NodeUnpublishVolumeRequest) ( *csi.NodeUnpublishVolumeResponse, error)
func (*ZFSSADriver) NodeUnstageBlockVolume ¶
func (zd *ZFSSADriver) NodeUnstageBlockVolume(ctx context.Context, req *csi.NodeUnstageVolumeRequest) ( *csi.NodeUnstageVolumeResponse, error)
func (*ZFSSADriver) NodeUnstageVolume ¶
func (zd *ZFSSADriver) NodeUnstageVolume(ctx context.Context, req *csi.NodeUnstageVolumeRequest) ( *csi.NodeUnstageVolumeResponse, error)
func (*ZFSSADriver) Probe ¶
func (zd *ZFSSADriver) Probe(ctx context.Context, req *csi.ProbeRequest) ( *csi.ProbeResponse, error)
This is a readiness probe for the driver, it is for checking if proper drivers are loaded. Typical response to failure is a driver restart.
func (*ZFSSADriver) Run ¶
func (zd *ZFSSADriver) Run()
func (*ZFSSADriver) ValidateVolumeCapabilities ¶
func (zd *ZFSSADriver) ValidateVolumeCapabilities(ctx context.Context, req *csi.ValidateVolumeCapabilitiesRequest) ( *csi.ValidateVolumeCapabilitiesResponse, error)
type ZfssaBlockVolume ¶
type ZfssaCredentials ¶
The structured data in the ZFSSA credentials file