linstor

package module
v0.35.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 9, 2021 License: Apache-2.0 Imports: 13 Imported by: 28

README

golinstor

This library aims to be a simple go interface for Linstor

Documentation

godocs

License

Apache-2.0

Documentation

Index

Constants

View Source
const ApiActivateRsc = "ActivateRsc"
View Source
const ApiAutoPlaceRsc = "AutoPlaceRsc"
View Source
const ApiCallAuthReq = (0x0FFFFFFFFFFFFFFE | MaskError)
View Source
const ApiCallParseError = (0x0FFFFFFFFFFFFFFD | MaskError)
View Source
const ApiCmdShutdown = "Shutdown"
View Source
const ApiControlCtrl = "ControlCtrl"

## Command APIs ###

View Source
const ApiCreateDevicePool = "CreateDevicePool"
View Source
const ApiCrtCryptPass = "CrtCryptPass"
View Source
const ApiCrtDbgCnsl = "CrtDbgCnsl"

## Debug APIs ###

View Source
const ApiCrtExosEnclosure = "CrtExosEnclosure"
View Source
const ApiCrtNetIf = "CrtNetIf"
View Source
const ApiCrtNode = "CrtNode"

## Create object APIs ###

View Source
const ApiCrtNodeConn = "CrtNodeConn"
View Source
const ApiCrtOfTargetNode = "CrtOfTargetNode"
View Source
const ApiCrtRsc = "CrtRsc"
View Source
const ApiCrtRscConn = "CrtRscConn"
View Source
const ApiCrtRscDfn = "CrtRscDfn"
View Source
const ApiCrtRscGrp = "CrtRscGrp"
View Source
const ApiCrtSnapshot = "CrtSnapshot"
View Source
const ApiCrtStorPool = "CrtStorPool"
View Source
const ApiCrtStorPoolDfn = "CrtStorPoolDfn"
View Source
const ApiCrtVlmConn = "CrtVlmConn"
View Source
const ApiCrtVlmDfn = "CrtVlmDfn"
View Source
const ApiCrtVlmGrp = "CrtVlmGrp"
View Source
const ApiCrtWatch = "CrtWatch"

## Event APIs ###

View Source
const ApiDeactivateRsc = "DeactivateRsc"
View Source
const ApiDelCtrlProp = "DelCtrlProp"
View Source
const ApiDelErrorReport = "DelErrorReport"
View Source
const ApiDelErrorReports = "DelErrorReports"
View Source
const ApiDelExosEnclosure = "DelExosEnclosure"
View Source
const ApiDelExtFile = "DeleteExtFile"
View Source
const ApiDelKvs = "DelKvs"
View Source
const ApiDelNetIf = "DelNetIf"
View Source
const ApiDelNode = "DelNode"

## Delete object APIs ###

View Source
const ApiDelNodeConn = "DelNodeConn"
View Source
const ApiDelRsc = "DelRsc"
View Source
const ApiDelRscConn = "DelRscConn"
View Source
const ApiDelRscDfn = "DelRscDfn"
View Source
const ApiDelRscGrp = "DelRscGrp"
View Source
const ApiDelSnapshot = "DelSnapshot"
View Source
const ApiDelStorPool = "DelStorPool"
View Source
const ApiDelStorPoolDfn = "DelStorPoolDfn"
View Source
const ApiDelVlmConn = "DelVlmConn"
View Source
const ApiDelVlmDfn = "DelVlmDfn"
View Source
const ApiDelVlmGrp = "DelVlmGrp"
View Source
const ApiDelWatch = "DelWatch"
View Source
const ApiDeployExtFile = "DeployExtFile"
View Source
const ApiDisableDrbdProxy = "DisableDrbdProxy"
View Source
const ApiDstrDbgCnsl = "DstrDbgCnsl"
View Source
const ApiEnableDrbdProxy = "EnableDrbdProxy"
View Source
const ApiEndOfImmediateAnswers = "EndOfImmediateAnswers"

Indicates that the immediate answers to the API call are complete

View Source
const ApiEnterCryptPass = "EnterCryptPass"

## Encryption APIs ###

View Source
const ApiEvent = "Event"
View Source
const ApiExosEnclosureEvents = "ExosEvents"
View Source
const ApiExosExec = "ExosExec"
View Source
const ApiExosMap = "ExosMap"
View Source
const ApiLostNode = "LostNode"
View Source
const ApiLostStorPool = "LostStorPool"
View Source
const ApiLstCtrlProps = "LstCtrlProps"
View Source
const ApiLstErrorReports = "LstErrorReports"
View Source
const ApiLstExosDflts = "LstExosDefaults"
View Source
const ApiLstExosEnclosures = "LstExosEnclosures"
View Source
const ApiLstExtFiles = "LstExtFiles"
View Source
const ApiLstKvs = "LstKvs"
View Source
const ApiLstNetIf = "LstNetIf"
View Source
const ApiLstNode = "LstNode"

## List object APIs ###

View Source
const ApiLstPhysStor = "LstPhysicalStorage"
View Source
const ApiLstPropsInfo = "LstPropsInfo"
View Source
const ApiLstRsc = "LstRsc"
View Source
const ApiLstRscConn = "LstRscConn"
View Source
const ApiLstRscDfn = "LstRscDfn"
View Source
const ApiLstRscGrp = "LstRscGrp"
View Source
const ApiLstSnapshotDfn = "LstSnapshotDfn"
View Source
const ApiLstSnapshotShippings = "LstSnapShips"
View Source
const ApiLstStorPool = "LstStorPool"
View Source
const ApiLstStorPoolDfn = "LstStorPoolDfn"
View Source
const ApiLstVlm = "LstVlm"
View Source
const ApiLstVlmDfn = "LstVlmDfn"
View Source
const ApiLstVlmGrp = "LstVlmGrp"
View Source
const ApiMakeRscAvail = "MakeRscAvail"
View Source
const ApiModCryptPass = "ModCryptPass"
View Source
const ApiModDrbdProxy = "ModifyDrbdProxy"
View Source
const ApiModExosDflts = "ModifyExosDefaults"
View Source
const ApiModExosEnclosure = "ModExosEnclosure"
View Source
const ApiModInf = "ModInf"
View Source
const ApiModKvs = "ModifyKvs"
View Source
const ApiModNetIf = "ModNetIf"
View Source
const ApiModNode = "ModNode"

## Modify object APIs ###

View Source
const ApiModNodeConn = "ModNodeConn"
View Source
const ApiModRsc = "ModRsc"
View Source
const ApiModRscConn = "ModRscConn"
View Source
const ApiModRscDfn = "ModRscDfn"
View Source
const ApiModRscGrp = "ModifyRscGrp"
View Source
const ApiModSnapshot = "ModSnapshot"
View Source
const ApiModStorPool = "ModStorPool"
View Source
const ApiModStorPoolDfn = "ModStorPoolDfn"
View Source
const ApiModVlm = "ModVlm"
View Source
const ApiModVlmConn = "ModVlmConn"
View Source
const ApiModVlmDfn = "ModVlmDfn"
View Source
const ApiModVlmGrp = "ModifyVlmGrp"
View Source
const ApiNodeEvict = "NodeEvict"
View Source
const ApiNodeReconnect = "NodeReconnect"
View Source
const ApiNodeRestore = "NodeRestore"
View Source
const ApiPing = "Ping"
View Source
const ApiPong = "Pong"
View Source
const ApiQryMaxVlmSize = "QryMaxVlmSize"

## Query APIs ###

View Source
const ApiReply = "Reply"

## Special answer message content types ### Textual MsgApiCallResponse responses

View Source
const ApiReqErrorReports = "ReqErrorReports"
View Source
const ApiReqRscConnList = "ReqRscConnList"
View Source
const ApiReqSosReport = "ReqSosReport"
View Source
const ApiRestoreSnapshot = "RestoreSnapshot"
View Source
const ApiRestoreVlmDfn = "RestoreVlmDfn"
View Source
const ApiRollbackSnapshot = "RollbackSnapshot"
View Source
const ApiRptSpc = "RptSpc"
View Source
const ApiRspMaxVlmSize = "RspMaxVlmSize"
View Source
const ApiSetCtrlProp = "SetCtrlProp"
View Source
const ApiSetExtFile = "SetExtFile"

## External files APIs ###

View Source
const ApiShipSnapshot = "ShipSnapshot"
View Source
const ApiSignIn = "SignIn"

## Authentication APIs ###

View Source
const ApiSpawnRscDfn = "SpawnRscDfn"
View Source
const ApiToggleDisk = "ToggleDisk"
View Source
const ApiUndeployExtFile = "UndeployExtFile"
View Source
const ApiVersion = "Version"
View Source
const ApiVsnInf = "VsnInf"
View Source
const Created = (1 | MaskSuccess)

## Codes 1-9: success ###

View Source
const DefaultNetif = "default"

## Default names ###

View Source
const Deleted = (2 | MaskSuccess)
View Source
const DfltAutoSnapshotKeep = "10"

## Default values ###

View Source
const DfltCtrlPortPlain = 3376
View Source
const DfltCtrlPortSsl = 3377

## Default ports ###

View Source
const DfltShippedSnapshotKeep = "10"
View Source
const DfltSnapshotShippingPrefix = "ship"
View Source
const DfltStltPortPlain = 3366
View Source
const DfltStltPortSsl = 3367
View Source
const FailAccDeniedCommand = (412 | MaskError)
View Source
const FailAccDeniedCtrlCfg = (411 | MaskError)
View Source
const FailAccDeniedExtFile = (422 | MaskError)
View Source
const FailAccDeniedFreeSpaceMgr = (417 | MaskError)
View Source
const FailAccDeniedKvs = (418 | MaskError)
View Source
const FailAccDeniedNode = (400 | MaskError)

## Codes 400-499: access denied failures ###

View Source
const FailAccDeniedNodeConn = (407 | MaskError)
View Source
const FailAccDeniedRsc = (402 | MaskError)
View Source
const FailAccDeniedRscConn = (408 | MaskError)
View Source
const FailAccDeniedRscDfn = (401 | MaskError)
View Source
const FailAccDeniedRscGrp = (419 | MaskError)
View Source
const FailAccDeniedSnapDfn = (421 | MaskError)
View Source
const FailAccDeniedSnapshot = (415 | MaskError)
View Source
const FailAccDeniedSnapshotDfn = (414 | MaskError)
View Source
const FailAccDeniedSnapshotVlmDfn = (416 | MaskError)
View Source
const FailAccDeniedStltConn = (410 | MaskError)
View Source
const FailAccDeniedStorPool = (406 | MaskError)
View Source
const FailAccDeniedStorPoolDfn = (405 | MaskError)
View Source
const FailAccDeniedVlm = (404 | MaskError)
View Source
const FailAccDeniedVlmConn = (409 | MaskError)
View Source
const FailAccDeniedVlmDfn = (403 | MaskError)
View Source
const FailAccDeniedVlmGrp = (420 | MaskError)
View Source
const FailAccDeniedWatch = (413 | MaskError)
View Source
const FailCryptInit = (982 | MaskError)
View Source
const FailExistsCryptPassphrase = (512 | MaskError)
View Source
const FailExistsExosEnclosure = (526 | MaskError)
View Source
const FailExistsExtName = (517 | MaskError)
View Source
const FailExistsNetIf = (505 | MaskError)
View Source
const FailExistsNode = (500 | MaskError)

## Codes 500-599: data already exists failures ###

View Source
const FailExistsNodeConn = (506 | MaskError)
View Source
const FailExistsNvmeInitiatorPerRscDfn = (519 | MaskError)
View Source
const FailExistsNvmeTargetPerRscDfn = (518 | MaskError)
View Source
const FailExistsOpenflexTargetPerRscDfn = (524 | MaskError)
View Source
const FailExistsRsc = (502 | MaskError)
View Source
const FailExistsRscConn = (507 | MaskError)
View Source
const FailExistsRscDfn = (501 | MaskError)
View Source
const FailExistsRscGrp = (522 | MaskError)
View Source
const FailExistsSnapshot = (516 | MaskError)
View Source
const FailExistsSnapshotDfn = (514 | MaskError)
View Source
const FailExistsSnapshotShipping = (525 | MaskError)
View Source
const FailExistsStltConn = (511 | MaskError)
View Source
const FailExistsStorPool = (510 | MaskError)
View Source
const FailExistsStorPoolDfn = (509 | MaskError)
View Source
const FailExistsVlm = (504 | MaskError)
View Source
const FailExistsVlmConn = (508 | MaskError)
View Source
const FailExistsVlmDfn = (503 | MaskError)
View Source
const FailExistsVlmGrp = (523 | MaskError)
View Source
const FailExistsWatch = (513 | MaskError)
View Source
const FailImplError = (999 | MaskError)
View Source
const FailInUse = (997 | MaskError)
View Source
const FailInsufficientPeerSlots = (993 | MaskError)
View Source
const FailInsufficientReplicaCount = (991 | MaskError)
View Source
const FailInvldConf = (230 | MaskError)
View Source
const FailInvldCryptPassphrase = (216 | MaskError)
View Source
const FailInvldDrbdProxyCompressionType = (222 | MaskError)
View Source
const FailInvldEncryptType = (217 | MaskError)
View Source
const FailInvldExtFile = (236 | MaskError)
View Source
const FailInvldExtFileName = (235 | MaskError)
View Source
const FailInvldExtName = (226 | MaskError)
View Source
const FailInvldFreeSpaceMgrName = (220 | MaskError)
View Source
const FailInvldKvsName = (223 | MaskError)
View Source
const FailInvldLayerKind = (224 | MaskError)
View Source
const FailInvldLayerStack = (225 | MaskError)
View Source
const FailInvldMinorNr = (207 | MaskError)
View Source
const FailInvldNetAddr = (210 | MaskError)
View Source
const FailInvldNetName = (209 | MaskError)
View Source
const FailInvldNetPort = (211 | MaskError)
View Source
const FailInvldNetType = (212 | MaskError)
View Source
const FailInvldNodeId = (204 | MaskError)
View Source
const FailInvldNodeName = (200 | MaskError)

## Codes 200-299: invalid * failures ###

View Source
const FailInvldNodeType = (201 | MaskError)
View Source
const FailInvldPlaceCount = (219 | MaskError)
View Source
const FailInvldProp = (213 | MaskError)
View Source
const FailInvldProvider = (227 | MaskError)
View Source
const FailInvldRscGrpName = (234 | MaskError)
View Source
const FailInvldRscName = (202 | MaskError)
View Source
const FailInvldRscPort = (203 | MaskError)
View Source
const FailInvldSnapshotName = (218 | MaskError)
View Source
const FailInvldSnapshotShippingSource = (231 | MaskError)
View Source
const FailInvldSnapshotShippingTarget = (232 | MaskError)
View Source
const FailInvldStorDriver = (221 | MaskError)
View Source
const FailInvldStorPoolName = (208 | MaskError)
View Source
const FailInvldTcpPort = (215 | MaskError)
View Source
const FailInvldTransportType = (214 | MaskError)
View Source
const FailInvldVlmCount = (229 | MaskError)
View Source
const FailInvldVlmNr = (205 | MaskError)
View Source
const FailInvldVlmSize = (206 | MaskError)
View Source
const FailInvldVlmSizes = (228 | MaskError)
View Source
const FailLinstorManagedSatelliteDidNotStartProperly = (987 | MaskError)
View Source
const FailLostStorPool = (521 | MaskError)
View Source
const FailMissingExtName = (606 | MaskError)
View Source
const FailMissingNetcom = (603 | MaskError)
View Source
const FailMissingNvmeTarget = (608 | MaskError)
View Source
const FailMissingOpenflexTarget = (610 | MaskError)
View Source
const FailMissingProps = (600 | MaskError)

## Codes 600-699: data missing failures ###

View Source
const FailMissingPropsNetcomPort = (602 | MaskError)
View Source
const FailMissingPropsNetcomType = (601 | MaskError)
View Source
const FailMissingPropsNetifName = (604 | MaskError)
View Source
const FailMissingStltConn = (605 | MaskError)
View Source
const FailNoStltConnDefined = (609 | MaskError)
View Source
const FailNodeHasUsedRsc = (233 | MaskError)
View Source
const FailNotConnected = (995 | MaskError)
View Source
const FailNotEnoughFreeSpace = (980 | MaskError)

## Other failures ###

View Source
const FailNotEnoughNodes = (996 | MaskError)
View Source
const FailNotFoundCryptKey = (312 | MaskError)
View Source
const FailNotFoundDfltStorPool = (311 | MaskError)
View Source
const FailNotFoundExosEnclosure = (319 | MaskError)
View Source
const FailNotFoundExtFile = (320 | MaskError)
View Source
const FailNotFoundKvs = (316 | MaskError)
View Source
const FailNotFoundNetIf = (305 | MaskError)
View Source
const FailNotFoundNode = (300 | MaskError)

## Codes 300-399: dependency not found failures ###

View Source
const FailNotFoundNodeConn = (306 | MaskError)
View Source
const FailNotFoundRsc = (302 | MaskError)
View Source
const FailNotFoundRscConn = (307 | MaskError)
View Source
const FailNotFoundRscDfn = (301 | MaskError)
View Source
const FailNotFoundRscGrp = (317 | MaskError)
View Source
const FailNotFoundSnapshot = (315 | MaskError)
View Source
const FailNotFoundSnapshotDfn = (313 | MaskError)
View Source
const FailNotFoundSnapshotVlmDfn = (314 | MaskError)
View Source
const FailNotFoundStorPool = (310 | MaskError)
View Source
const FailNotFoundStorPoolDfn = (309 | MaskError)
View Source
const FailNotFoundVlm = (304 | MaskError)
View Source
const FailNotFoundVlmConn = (308 | MaskError)
View Source
const FailNotFoundVlmDfn = (303 | MaskError)
View Source
const FailNotFoundVlmGrp = (318 | MaskError)
View Source
const FailOnlyOneActRscPerSharedStorPoolAllowed = (981 | MaskError)
View Source
const FailPoolExhaustedMinorNr = (801 | MaskError)
View Source
const FailPoolExhaustedNodeId = (803 | MaskError)
View Source
const FailPoolExhaustedRscLayerId = (804 | MaskError)
View Source
const FailPoolExhaustedSnapshotShippingTcpPort = (806 | MaskError)
View Source
const FailPoolExhaustedSpecialSatellteTcpPort = (805 | MaskError)
View Source
const FailPoolExhaustedTcpPort = (802 | MaskError)
View Source
const FailPoolExhaustedVlmNr = (800 | MaskError)

## Codes 800-899: number pools exhausted ###

View Source
const FailPreSelectScriptDidNotTerminate = (986 | MaskError)
View Source
const FailRscBusy = (992 | MaskError)
View Source
const FailSignIn = (10000 | MaskError)
View Source
const FailSignInMissingCredentials = (10001 | MaskError)
View Source
const FailSnapshotShippingInProgress = (984 | MaskError)
View Source
const FailSnapshotShippingNotSupported = (983 | MaskError)
View Source
const FailSnapshotsNotSupported = (994 | MaskError)
View Source
const FailSql = (100 | MaskError)

## Codes 100 - 199: sql failures ###

View Source
const FailSqlRollback = (101 | MaskError)
View Source
const FailStltDoesNotSupportLayer = (988 | MaskError)
View Source
const FailStltDoesNotSupportProvider = (989 | MaskError)
View Source
const FailStorPoolConfigurationError = (990 | MaskError)
View Source
const FailUndecidableAutoplacment = (985 | MaskError)
View Source
const FailUnknownError = (998 | MaskError)
View Source
const FailUuidKvs = (711 | MaskError)
View Source
const FailUuidNetIf = (705 | MaskError)
View Source
const FailUuidNode = (700 | MaskError)

## Codes 700-799: uuid mismatch failures ###

View Source
const FailUuidNodeConn = (706 | MaskError)
View Source
const FailUuidRsc = (702 | MaskError)
View Source
const FailUuidRscConn = (707 | MaskError)
View Source
const FailUuidRscDfn = (701 | MaskError)
View Source
const FailUuidStorPool = (710 | MaskError)
View Source
const FailUuidStorPoolDfn = (709 | MaskError)
View Source
const FailUuidVlm = (704 | MaskError)
View Source
const FailUuidVlmConn = (708 | MaskError)
View Source
const FailUuidVlmDfn = (703 | MaskError)
View Source
const FlagClean = "CLEAN"

## Flag string values ###

View Source
const FlagDelete = "DELETE"
View Source
const FlagDiskAddRequested = "DISK_ADD_REQUESTED"
View Source
const FlagDiskAdding = "DISK_ADDING"
View Source
const FlagDiskRemoveRequested = "DISK_REMOVE_REQUESTED"
View Source
const FlagDiskRemoving = "DISK_REMOVING"
View Source
const FlagDiskless = "DISKLESS"
View Source
const FlagDrbdDiskless = "DRBD_DISKLESS"
View Source
const FlagEncrypted = "ENCRYPTED"
View Source
const FlagEvicted = "EVICTED"
View Source
const FlagFailedDeployment = "FAILED_DEPLOYMENT"
View Source
const FlagFailedDisconnect = "FAILED_DISCONNECT"
View Source
const FlagGrossSize = "GROSS_SIZE"
View Source
const FlagNvmeInitiator = "NVME_INITIATOR"
View Source
const FlagQignore = "QIGNORE"
View Source
const FlagResize = "RESIZE"
View Source
const FlagRscInactive = "INACTIVE"
View Source
const FlagSuccessful = "SUCCESSFUL"
View Source
const FlagTieBreaker = "TIE_BREAKER"
View Source
const InfoAutoDrbdProxyCreated = (10007 | MaskInfo)
View Source
const InfoNoRscSpawned = (10000 | MaskInfo)

## Codes 10000-19999: info ###

View Source
const InfoNodeNameMismatch = (10001 | MaskInfo)
View Source
const InfoNoop = (10007 | MaskInfo)
View Source
const InfoPropRemoved = (10005 | MaskInfo)
View Source
const InfoPropSet = (10002 | MaskInfo)
View Source
const InfoRscAlreadyExists = (10008 | MaskInfo)
View Source
const InfoTieBreakerCreated = (10003 | MaskInfo)
View Source
const InfoTieBreakerDeleting = (10004 | MaskInfo)
View Source
const InfoTieBreakerTakeover = (10006 | MaskInfo)
View Source
const Key1StNode = "FirstNode"
View Source
const Key2NdNode = "SecondNode"
View Source
const KeyAutoEvictAfterTime = "AutoEvictAfterTime"
View Source
const KeyAutoEvictAllowEviction = "AutoEvictAllowEviction"
View Source
const KeyAutoEvictMaxDisconnectedNodes = "AutoEvictMaxDisconnectedNodes"
View Source
const KeyAutoEvictMinReplicaCount = "AutoEvictMinReplicaCount"

## Auto-Evict property keys ###

View Source
const KeyAutoSnapshotNextId = "NextAutoId"
View Source
const KeyAutoSnapshotPrefix = "Prefix"
View Source
const KeyAutoplaceMaxThroughput = "MaxThroughput"
View Source
const KeyAutoplacePreSelectFileName = "PreSelectScript"
View Source
const KeyAutoplacePreSelectScriptTimeout = "PreSelectScriptTimeout"
View Source
const KeyAutoplaceStratWeightMaxFreespace = "MaxFreeSpace"

## Autoplace property keys ###

View Source
const KeyAutoplaceStratWeightMinReservedSpace = "MinReservedSpace"
View Source
const KeyAutoplaceStratWeightMinRscCount = "MinRscCount"
View Source
const KeyBcacheBlocksize = "Blocksize"
View Source
const KeyBcacheBucketsize = "Bucketsize"
View Source
const KeyBcacheCacheReplacementPolicy = "CacheReplacementPolicy"
View Source
const KeyBcacheDataOffset = "DataOffset"
View Source
const KeyBcacheDiscard = "Discard"
View Source
const KeyBcachePoolName = "PoolName"

## BCache property keys ###

View Source
const KeyBcacheSize = "Size"
View Source
const KeyBcacheWriteback = "Writeback"
View Source
const KeyCacheBlockSize = "Blocksize"
View Source
const KeyCacheCachePoolName = "CachePool"
View Source
const KeyCacheCacheSize = "Cachesize"
View Source
const KeyCacheMetaPoolName = "MetaPool"
View Source
const KeyCacheMetaSize = "Metasize"
View Source
const KeyCacheOperatingMode = "OpMode"

## Cache property keys ###

View Source
const KeyCachePolicy = "Policy"
View Source
const KeyCurStltConnName = "CurStltConnName"
View Source
const KeyDisableHttpMetrics = "disable-http-metrics"
View Source
const KeyDmstats = "DMStats"
View Source
const KeyDrbdAutoAddQuorumTiebreaker = "auto-add-quorum-tiebreaker"
View Source
const KeyDrbdAutoDiskful = "auto-diskful"
View Source
const KeyDrbdAutoDiskfulAllowCleanup = "auto-diskful-allow-cleanup"
View Source
const KeyDrbdAutoQuorum = "auto-quorum"
View Source
const KeyDrbdAutoVerifyAlgoAllowedUser = "auto-verify-algo-allowed-user-list"
View Source
const KeyDrbdCurrentGi = "DrbdCurrentGi"
View Source
const KeyDrbdDisableAutoVerifyAlgo = "auto-verify-algo-disable"
View Source
const KeyDrbdProxyAutoEnable = "AutoEnable"
View Source
const KeyDrbdProxyCompressionType = "CompressionType"

## DRBD Proxy keys (other than 'options') ###

View Source
const KeyExtCmdWaitTo = "ExtCmdWaitTimeout"

## External commands keys ###

View Source
const KeyExtFile = "ExtFile"

## External files keys ###

View Source
const KeyFsMkfsparameters = "MkfsParams"
View Source
const KeyFsType = "Type"

## File system property keys ###

View Source
const KeyKeep = "Keep"
View Source
const KeyMinorNrAutoRange = "MinorNrAutoRange"
View Source
const KeyNode = "Node"

## Node property keys ###

View Source
const KeyOfTargetPortAutoRange = "OpenflexTargetPortAutoRange"
View Source
const KeyPeerSlots = "PeerSlots"
View Source
const KeyPeerSlotsNewResource = "PeerSlotsNewResource"
View Source
const KeyPoolName = "PoolName"
View Source
const KeyPort = "Port"

## Network Interface property keys ###

View Source
const KeyPrefNic = "PrefNic"
View Source
const KeyRscDfn = "RscDfn"

## Resource property keys ###

View Source
const KeyRscGrp = "RscGrp"
View Source
const KeyRscMigrateFrom = "MigrateFrom"
View Source
const KeyRscRollbackTarget = "RollbackTarget"
View Source
const KeyRunEvery = "RunEvery"
View Source
const KeySearchDomain = "SearchDomain"

## ldap property keys ###

View Source
const KeySecDomain = "SecDomain"
View Source
const KeySecIdentity = "SecIdentity"

## Authentication keys ###

View Source
const KeySecPassword = "SecPassword"
View Source
const KeySecRole = "SecRole"
View Source
const KeySecType = "SecType"
View Source
const KeySite = "Site"
View Source
const KeySnapshot = "Snapshot"

## Snapshot property keys ###

View Source
const KeySnapshotDfnSequenceNumber = "SequenceNumber"
View Source
const KeySnapshotShippingPrefix = "SnapshotShippingPrefix"

## Snapshot shipping property keys ###

View Source
const KeySourceNode = "SourceNode"
View Source
const KeyStorPoolAllocationUnit = "AllocationUnit"

Unit of smallest allocation. The size in KiB as a decimal number.

View Source
const KeyStorPoolCryptPasswd = "CryptPasswd"
View Source
const KeyStorPoolDfn = "StorPoolDfn"

## Storage pool property keys ###

View Source
const KeyStorPoolDfnMaxOversubscriptionRatio = "MaxOversubscriptionRatio"
View Source
const KeyStorPoolDrbdMetaName = "StorPoolNameDrbdMeta"
View Source
const KeyStorPoolExosApiIp = "IP"
View Source
const KeyStorPoolExosApiIpEnv = "IPEnv"
View Source
const KeyStorPoolExosApiPassword = "Password"
View Source
const KeyStorPoolExosApiPasswordEnv = "PasswordEnv"
View Source
const KeyStorPoolExosApiPort = "Port"
View Source
const KeyStorPoolExosApiUser = "Username"
View Source
const KeyStorPoolExosApiUserEnv = "UsernameEnv"
View Source
const KeyStorPoolExosCreateVolumeOptions = "CreateVolumeOptions"
View Source
const KeyStorPoolExosEnclosure = "Enclosure"
View Source
const KeyStorPoolExosPoolSn = "PoolSN"
View Source
const KeyStorPoolExosVlmType = "VolumeType"
View Source
const KeyStorPoolFileDirectory = "FileDir"
View Source
const KeyStorPoolLvcreateOptions = "LvcreateOptions"
View Source
const KeyStorPoolLvcreateType = "LvcreateType"
View Source
const KeyStorPoolName = "StorPoolName"
View Source
const KeyStorPoolOpenflexApiHost = "Openflex/ApiHost"
View Source
const KeyStorPoolOpenflexApiPort = "Openflex/ApiPort"
View Source
const KeyStorPoolOpenflexJobWaitDelay = "Openflex/JobWaitDelay"
View Source
const KeyStorPoolOpenflexJobWaitMaxCount = "Openflex/JobWaitMaxCount"
View Source
const KeyStorPoolOpenflexStorDev = "Openflex/StorDev"
View Source
const KeyStorPoolOpenflexStorDevHost = "Openflex/StorDevHost"
View Source
const KeyStorPoolOpenflexStorPool = "Openflex/StorPool"
View Source
const KeyStorPoolOpenflexUserName = "Openflex/UserName"
View Source
const KeyStorPoolOpenflexUserPw = "Openflex/UserPassword"
View Source
const KeyStorPoolOverrideVlmId = "OverrideVlmId"
View Source
const KeyStorPoolPrefNic = "PrefNic"
View Source
const KeyStorPoolProvisioning = "Provisioning"
View Source
const KeyStorPoolSupportsSnapshots = "SupportsSnapshots"

## Storage pool traits keys ###

View Source
const KeyStorPoolThinPool = "ThinPool"
View Source
const KeyStorPoolVolumeGroup = "LvmVg"
View Source
const KeyStorPoolWaitTimeoutAfterCreate = "WaitTimeoutAfterCreate"
View Source
const KeyStorPoolZfsCreateOptions = "ZfscreateOptions"
View Source
const KeyStorPoolZpool = "ZPool"
View Source
const KeyStorPoolZpoolthin = "ZPoolThin"
View Source
const KeySysFsBlkioThrottleRead = "blkio_throttle_read"

## sys/fs property keys ###

View Source
const KeySysFsBlkioThrottleReadIops = "blkio_throttle_read_iops"
View Source
const KeySysFsBlkioThrottleWrite = "blkio_throttle_write"
View Source
const KeySysFsBlkioThrottleWriteIops = "blkio_throttle_write_iops"
View Source
const KeyTargetNode = "TargetNode"
View Source
const KeyTcpPortAutoRange = "TcpPortAutoRange"
View Source
const KeyTcpPortRange = "TcpPortRange"
View Source
const KeyTrType = "TRType"

## nvme property keys ###

View Source
const KeyUpdateCacheInterval = "UpdateCacheInterval"
View Source
const KeyUuid = "UUID"

## DRBD property keys ###

View Source
const KeyVlmGrp = "VlmGrp"

## Volume property keys ###

View Source
const KeyVlmNr = "VlmNr"
View Source
const KeyVlmRestoreFromResource = "RestoreFromResource"
View Source
const KeyVlmRestoreFromSnapshot = "RestoreFromSnapshot"
View Source
const KeyWritecacheBlocksize = "Blocksize"

## Writecache property keys ###

View Source
const KeyWritecacheOptionAdditional = "Additional"
View Source
const KeyWritecacheOptionAutocommitBlocks = "AutocommitBlocks"
View Source
const KeyWritecacheOptionAutocommitTime = "AutocommitTime"
View Source
const KeyWritecacheOptionFua = "Fua"
View Source
const KeyWritecacheOptionHighWatermark = "HighWatermark"
View Source
const KeyWritecacheOptionLowWatermark = "LowWatermark"
View Source
const KeyWritecacheOptionStartSector = "StartSector"
View Source
const KeyWritecacheOptionWritebackJobs = "WritebackJobs"
View Source
const KeyWritecachePoolName = "PoolName"
View Source
const KeyWritecacheSize = "Size"
View Source
const MaskBitsCode = 0x0000000000007FFF

## Codes ###

View Source
const MaskBitsObj = 0x00000000007C0000

## Type masks (Node, ResDfn, Res, VolDfn, Vol, NetInterface, ...) ###

View Source
const MaskBitsOp = 0x0000000003000000

## Operation type masks ###

View Source
const MaskBitsType = 0xC000000000000000

## Bits 62 - 63 (most significant 2) are reserved for the message type masks (error, warning, info) Bits 25 - 26 are reserved for the operation type masks (create, modify, delete) Bits 18 - 22 are reserved for the object type masks (node, resource, resource definition, ...) Bits 0 - 14 are reserved for codes ###

View Source
const MaskCrt = 0x0000000001000000
View Source
const MaskCtrlConf = 0x0000000000100000
View Source
const MaskDel = 0x0000000003000000
View Source
const MaskError = 0xC000000000000000
View Source
const MaskExtFiles = 0x0000000000500000
View Source
const MaskInfo = 0x4000000000000000
View Source
const MaskKvs = 0x0000000000400000
View Source
const MaskMod = 0x0000000002000000
View Source
const MaskNetIf = 0x00000000001C0000
View Source
const MaskNode = 0x00000000003C0000
View Source
const MaskNodeConn = 0x0000000000280000
View Source
const MaskPhysicalDevice = 0x00000000004C0000
View Source
const MaskRsc = 0x0000000000340000
View Source
const MaskRscConn = 0x0000000000240000
View Source
const MaskRscDfn = 0x0000000000380000
View Source
const MaskRscGrp = 0x0000000000440000
View Source
const MaskSnapshot = 0x00000000000C0000
View Source
const MaskStorPool = 0x0000000000140000
View Source
const MaskStorPoolDfn = 0x0000000000180000
View Source
const MaskSuccess = 0x0000000000000000
View Source
const MaskVlm = 0x00000000002C0000
View Source
const MaskVlmConn = 0x0000000000200000
View Source
const MaskVlmDfn = 0x0000000000300000
View Source
const MaskVlmGrp = 0x0000000000480000
View Source
const MaskWarn = 0x8000000000000000
View Source
const Modified = (3 | MaskSuccess)
View Source
const NamespcAlloc = "Allocation"
View Source
const NamespcAutoSnapshot = "AutoSnapshot"
View Source
const NamespcAutoplacer = "Autoplacer"
View Source
const NamespcAutoplacerWeights = "Autoplacer/Weights"
View Source
const NamespcAuxiliary = "Aux"
View Source
const NamespcBcache = "BCache"
View Source
const NamespcCache = "Cache"
View Source
const NamespcCacheFeatures = "Cache/Features"
View Source
const NamespcCachePolicyArgs = "Cache/Policy"
View Source
const NamespcConnectionPaths = "Paths"
View Source
const NamespcDflt = "Default"
View Source
const NamespcDrbdDiskOptions = "DrbdOptions/Disk"
View Source
const NamespcDrbdHandlerOptions = "DrbdOptions/Handlers"
View Source
const NamespcDrbdNetOptions = "DrbdOptions/Net"
View Source
const NamespcDrbdOptions = "DrbdOptions"
View Source
const NamespcDrbdPeerDeviceOptions = "DrbdOptions/PeerDevice"
View Source
const NamespcDrbdProxy = "DrbdProxy"
View Source
const NamespcDrbdProxyCompressionOptions = "DrbdOptions/ProxyCompression"
View Source
const NamespcDrbdProxyOptions = "DrbdOptions/Proxy"
View Source
const NamespcDrbdResourceOptions = "DrbdOptions/Resource"
View Source
const NamespcExos = "StorDriver/Exos"
View Source
const NamespcFilesystem = "FileSystem"
View Source
const NamespcLogging = "Logging"
View Source
const NamespcNetcom = "NetCom"

## Property namespaces ###

View Source
const NamespcNetif = "NetIf"
View Source
const NamespcNode = "Node"
View Source
const NamespcNvme = "NVMe"
View Source
const NamespcRest = "REST"
View Source
const NamespcSnapshotShipping = "SnapshotShipping"
View Source
const NamespcStlt = "Satellite"
View Source
const NamespcStltDevSymlinks = "Satellite/Device/Symlinks"
View Source
const NamespcStorageDriver = "StorDriver"
View Source
const NamespcSysFs = "sys/fs"
View Source
const NamespcWritecache = "Writecache"
View Source
const NamespcWritecacheOptions = "Writecache/Options"
View Source
const PassphraseAccepted = (4 | MaskSuccess)
View Source
const SuccessSignIn = (10000 | MaskSuccess)

## SignIn codes ###

View Source
const UnknownApiCall = (0x0FFFFFFFFFFFFFFF | MaskError)

## Special codes ###

View Source
const ValDrbdAutoQuorumDisabled = "disabled"
View Source
const ValDrbdAutoQuorumIoError = "io-error"
View Source
const ValDrbdAutoQuorumSuspendIo = "suspend-io"
View Source
const ValDrbdProxyCompressionLz4 = "lz4"
View Source
const ValDrbdProxyCompressionLzma = "lzma"
View Source
const ValDrbdProxyCompressionNone = "none"

## DRBD related property values ###

View Source
const ValDrbdProxyCompressionZlib = "zlib"
View Source
const ValDrbdProxyCompressionZstd = "zstd"
View Source
const ValFalse = "False"
View Source
const ValFsTypeExt4 = "ext4"
View Source
const ValFsTypeXfs = "xfs"
View Source
const ValNetcomTypePlain = "Plain"
View Source
const ValNetcomTypeSsl = "SSL"

## Property values ###

View Source
const ValNetifTypeIp = "IP"

## Net interface Type values ###

View Source
const ValNetifTypeRdma = "RDMA"
View Source
const ValNetifTypeRoce = "RoCE"
View Source
const ValNo = "No"
View Source
const ValNodeTypeAux = "Auxiliary"
View Source
const ValNodeTypeCmbd = "Combined"
View Source
const ValNodeTypeCtrl = "Controller"

## Node Type values ###

View Source
const ValNodeTypeExosTarget = "Exos_Target"
View Source
const ValNodeTypeOpenflexTarget = "Openflex_Target"
View Source
const ValNodeTypeStlt = "Satellite"
View Source
const ValSnapShipName = "SnapshotShipping"

## Snapshot-shipping values ###

View Source
const ValSslProtoTlsv1 = "TLSv1"
View Source
const ValStorPoolDrbdMetaInternal = ".internal"
View Source
const ValStorPoolProvisioningFat = "Fat"

## Storage pool traits values ###

View Source
const ValStorPoolProvisioningThin = "Thin"
View Source
const ValTrue = "True"

## Boolean values ###

View Source
const ValWritecacheFuaOff = "Off"
View Source
const ValWritecacheFuaOn = "On"

## Writecache option values ###

View Source
const ValYes = "Yes"
View Source
const WarnAllDiskless = (1009 | MaskWarn)
View Source
const WarnDelUnsetProp = (1005 | MaskWarn)
View Source
const WarnInvldOptPropNetcomEnabled = (1001 | MaskWarn)

## Codes 1000-9999: warnings ###

View Source
const WarnInvldSnapshotShippingPrefix = (1016 | MaskWarn)
View Source
const WarnMixedPmemAndNonPmem = (1014 | MaskWarn)
View Source
const WarnNoStltConnDefined = (1004 | MaskWarn)
View Source
const WarnNodeEvicted = (1017 | MaskWarn)
View Source
const WarnNotConnected = (1002 | MaskWarn)
View Source
const WarnNotEnoughNodesForTieBreaker = (1013 | MaskWarn)
View Source
const WarnNotFound = (3000 | MaskWarn)
View Source
const WarnNotFoundCryptKey = (1011 | MaskWarn)
View Source
const WarnRscAlreadyDeployed = (1006 | MaskWarn)
View Source
const WarnRscAlreadyDiskless = (1008 | MaskWarn)
View Source
const WarnRscAlreadyHasDisk = (1007 | MaskWarn)
View Source
const WarnRscDeactivated = (1018 | MaskWarn)
View Source
const WarnStltNotUpdated = (1003 | MaskWarn)
View Source
const WarnStorageError = (1010 | MaskWarn)
View Source
const WarnStorageKindAdded = (1012 | MaskWarn)
View Source
const WarnUneffectiveProp = (1015 | MaskWarn)

Variables

This section is empty.

Functions

func EnoughFreeSpace

func EnoughFreeSpace(requestedKiB, replicas string) error

EnoughFreeSpace checks to see if there's enough free space to create a new resource.

Types

type FSUtil

type FSUtil struct {
	*ResourceDeployment
	FSType    string
	FSOpts    string
	MountOpts string
	// contains filtered or unexported fields
}

FSUtil handles creating a filesystem and mounting resources.

func (FSUtil) Mount

func (f FSUtil) Mount(source, target string) error

Mount the FSUtil's resource on the path.

func (FSUtil) SafeFormat added in v0.11.0

func (f FSUtil) SafeFormat(path string) error

func (FSUtil) UnMount

func (f FSUtil) UnMount(path string) error

UnMount the FSUtil's resource from the path.

type ResDef added in v0.11.0

type ResDef struct {
	VlmDfns []struct {
		VlmDfnUUID string `json:"vlm_dfn_uuid"`
		VlmMinor   int    `json:"vlm_minor"`
		VlmNr      int    `json:"vlm_nr"`
		VlmSize    int    `json:"vlm_size"`
	} `json:"vlm_dfns,omitempty"`
	RscDfnSecret string `json:"rsc_dfn_secret"`
	RscDfnUUID   string `json:"rsc_dfn_uuid"`
	RscName      string `json:"rsc_name"`
	RscDfnPort   int    `json:"rsc_dfn_port"`
	RscDfnProps  []struct {
		Value string `json:"value"`
		Key   string `json:"key"`
	} `json:"rsc_dfn_props,omitempty"`
}

type ResourceDeployment added in v0.8.2

type ResourceDeployment struct {
	ResourceDeploymentConfig
	// contains filtered or unexported fields
}

ResourceDeployment contains all the information needed to query and assign/deploy a resource.

func NewResourceDeployment added in v0.8.2

func NewResourceDeployment(c ResourceDeploymentConfig) ResourceDeployment

NewResourceDeployment creates a new ResourceDeployment object. This tolerates some pretty janky ResourceDeploymentConfigs here is the breakdown of how that is handled: If no Name is given, a UUID is generated and used. If no NodeList is given, assignment will be automatically placed. If no ClientList is given, no client assignments will be made. If there are duplicates within ClientList or NodeList, they will be removed. If there are duplicates between ClientList and NodeList, duplicates in the ClientList will be removed. If no AutoPlace Value is given AND there is no NodeList and no ClientList, it will default to 1. If no DisklessOnRemaining is given, no diskless assignments on non replica nodes will be made. If no DoNotPlaceWithRegex, ReplicasOnSame, or ReplicasOnDifferent are provided resource assignment will occur without them. If no SizeKiB is provided, it will be given a size of 4096kb. If no StoragePool is provided, the default storage pool will be used. If no DisklessStoragePool is provided, the default diskless storage pool will be used. If no Encryption is specified, none will be used. If no MigrateOnAttach is specified, none will be used. If no Controllers are specified, none will be used. If no LogOut is specified, ioutil.Discard will be used. TODO: Document DR stuff.

func (ResourceDeployment) Assign added in v0.8.2

func (r ResourceDeployment) Assign() error

Assign assigns a resource with diskfull storage to all nodes in its NodeList, then attaches the resource disklessly to all nodes in its ClientList.

func (ResourceDeployment) Attach added in v0.12.0

func (r ResourceDeployment) Attach(node string, asClient bool) error

Attach assigns a resource on a single node disklessly or diskfully. If migrateOnAttach is true the migration will be be performed directly after assignment.

func (ResourceDeployment) Create added in v0.8.2

func (r ResourceDeployment) Create() error

Create reserves the resource name in Linstor.

func (ResourceDeployment) CreateAndAssign added in v0.8.2

func (r ResourceDeployment) CreateAndAssign() error

CreateAndAssign deploys the resource, created a new one if it doesn't exist.

func (ResourceDeployment) Delete added in v0.8.2

func (r ResourceDeployment) Delete() error

Delete removes a resource entirely from all nodes.

func (ResourceDeployment) DeployedNodes added in v0.13.1

func (r ResourceDeployment) DeployedNodes() ([]string, error)

DeployedNodes returns a list of nodes where the reource is deployed diskfully.

func (ResourceDeployment) Exists added in v0.8.2

func (r ResourceDeployment) Exists() (bool, error)

Exists checks to see if a resource is defined in LINSTOR.

func (ResourceDeployment) GetDevPath added in v0.10.0

func (r ResourceDeployment) GetDevPath(node string, stat bool) (string, error)

GetDevPath returns the path to the linstor volume on the given node. If stat is set to true, the device will be stat'd as a loose test to see if it is ready for IO.

func (ResourceDeployment) GetSnapByID added in v0.13.0

func (r ResourceDeployment) GetSnapByID(snapshots []Snapshot, id string) *Snapshot

func (ResourceDeployment) GetSnapByName added in v0.13.0

func (r ResourceDeployment) GetSnapByName(snapshots []Snapshot, name string) *Snapshot

func (ResourceDeployment) IsClient added in v0.8.2

func (r ResourceDeployment) IsClient(nodeName string) bool

IsClient determines if resource is running as a client on nodeName.

func (ResourceDeployment) ListResourceDefinitions added in v0.11.0

func (r ResourceDeployment) ListResourceDefinitions() ([]ResDef, error)

func (ResourceDeployment) NewResourceFromResource added in v0.13.0

func (r ResourceDeployment) NewResourceFromResource(sourceRes ResourceDeployment) error

func (ResourceDeployment) NewResourceFromSnapshot added in v0.13.0

func (r ResourceDeployment) NewResourceFromSnapshot(snapshotID string) error

func (ResourceDeployment) OnNode added in v0.8.2

func (r ResourceDeployment) OnNode(nodeName string) (bool, error)

OnNode determines if a resource is present on a particular node.

func (ResourceDeployment) SetAuxProp added in v0.13.0

func (r ResourceDeployment) SetAuxProp(key, value string) error

SetAuxProp adds an aux prop to the resource.

func (ResourceDeployment) SnapshotCreate added in v0.13.0

func (r ResourceDeployment) SnapshotCreate(name string) (*Snapshot, error)

SnapshotCreate makes a snapshot of the ResourceDeployment on all nodes where it is deployed. If the snapshot already exsits, return it as is.

func (ResourceDeployment) SnapshotDelete added in v0.13.0

func (r ResourceDeployment) SnapshotDelete(id string) error

SnapshotDelete deletes a snapshot with the given ID.

func (ResourceDeployment) SnapshotList added in v0.13.0

func (r ResourceDeployment) SnapshotList() ([]Snapshot, error)

SnapshotList returns a list of all snapshots known to LINSTOR.

func (ResourceDeployment) Unassign added in v0.8.2

func (r ResourceDeployment) Unassign(nodeName string) error

Unassign unassigns a resource from a particular node.

func (ResourceDeployment) WaitForDevPath added in v0.11.0

func (r ResourceDeployment) WaitForDevPath(node string, maxRetries int) (string, error)

WaitForDevPath polls until the resourse path appears on the system.

type ResourceDeploymentConfig added in v0.8.2

type ResourceDeploymentConfig struct {
	Name                string
	NodeList            []string
	ClientList          []string
	ReplicasOnSame      []string
	ReplicasOnDifferent []string
	DRSites             []string
	DRSiteKey           string
	AutoPlace           uint64
	DisklessOnRemaining bool
	DoNotPlaceWithRegex string
	SizeKiB             uint64
	StoragePool         string
	DisklessStoragePool string
	Encryption          bool
	MigrateOnAttach     bool
	Controllers         string
	LayerList           []string
	Annotations         map[string]string
	LogOut              io.Writer
	LogFmt              log.Formatter
}

ResourceDeploymentConfig is a configuration object for ResourceDeployment. If you're deploying a resource, AutoPlace is required. If you're assigning a resource to particular nodes, NodeList is required.

type Snapshot added in v0.13.0

type Snapshot struct {
	SnapshotDfnFlags []string `json:"snapshot_dfn_flags"`
	UUID             string   `json:"uuid"`
	RscName          string   `json:"rsc_name"`
	Nodes            []struct {
		NodeName string `json:"node_name"`
	} `json:"snapshots"`
	SnapshotName    string `json:"snapshot_name"`
	SnapshotVlmDfns []struct {
		VlmNr   int `json:"vlm_nr"`
		VlmSize int `json:"vlm_size"`
	} `json:"snapshot_vlm_dfns"`
	RscDfnUUID string `json:"rsc_dfn_uuid"`
}

type SnapshotInfo added in v0.13.0

type SnapshotInfo []struct {
	SnapshotDfns []Snapshot `json:"snapshot_dfns"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL