package iscsi

import "github.com/containerd/accelerated-container-image/pkg/iscsi"

Index

Functions

func CheckTgtBackingstore

func CheckTgtBackingstore(bsName string) error

CheckTgtBackingstore checks that tgt-admin supports overlaybd backing store.

func GetDevicesForTarget

func GetDevicesForTarget(targetIqn string, hostNumber, sessionID, channelID, targetID int) ([]string, error)

GetDevicesForTarget finds the device path with given target name.

NOTE: By default, both targetID and channelID are zero.

func GetISCSIHostSessionMapForTarget

func GetISCSIHostSessionMapForTarget(targetIqn string, portal string) (map[int][]int, error)

GetISCSIHostSessionMapForTarget returns all the scsi hosts logged into the target with given target name and portal.

NOTE: like result from iscsiadm -m node -T $targetName -p ${portal} --rescan For example, { 3: [3] }.

Types

type Errno

type Errno int
const (
	EOK              Errno = iota // command executed successfully.
	EGENERIC                      // generic error code.
	ESESSNOTFOUND                 // session could not be found.
	ENOMEM                        // could not allocate resource for operation.
	ETRANS                        // connect problem caused operation to fail.
	ELOGIN                        // generic iSCSI login failure.
	EIDBM                         // error accessing/managing iSCSI DB.
	EINVAL                        // invalid argument.
	ETRANSTIMEOUT                 // connection timer exired while trying to connect.
	EINTERNAL                     // generic internal iscsid/kernel failure.
	ELOGOUT                       // iSCSI logout failed.
	EPDUTIMEOUT                   // iSCSI PDU timedout.
	ETRANSNOTFOUND                // iSCSI transport module not loaded in kernel or iscsid.
	EACCESS                       // did not have proper OS permissions to access iscsid or execute iscsiadm command.
	ETRANSCAPS                    // transport module did not support operation.
	ESESSEXISTS                   // session is logged in.
	EINVALIDMGMTREQ               // invalid IPC MGMT request.
	EISNSUNAVAILABLE              // iSNS service is not supported.
	EISCSIDCOMMERR                // a read/write to iscsid failed.
	EFATALLOGIN                   // fatal iSCSI login error.
	EISCSIDNOTCONN                // could not connect to iscsid.
	ENOOBJSFOUND                  // no records/targets/sessions/portals found to execute operation on.
	ESYSFSLOOKUP                  // could not lookup object in sysfs.
	EHOSTNOTFOUND                 // could not lookup host.
	ELOGINAUTHFAILED              // login failed due to authorization failure.
	EISNSQUERY                    // iSNS query failure.
	EISNSREGFAILED                // iSNS registration/deregistration failed.
)

Errors

func (Errno) Error

func (e Errno) Error() string

Source Files

errors.go utils.go

Version
v0.4.0
Published
Dec 10, 2021
Platform
linux/amd64
Imports
9 packages
Last checked
5 minutes ago

Tools for package owners.