Documentation ¶
Index ¶
- Constants
- func CheckBackingImageManagerCompatibility(bimMinVersion, bimVersion int) error
- func CheckCLICompatibility(cliVersion, cliMinVersion int) error
- func CheckInstanceManagerCompatibility(imMinVersion, imVersion int) error
- func CheckInstanceManagerProxySupport(im *longhorn.InstanceManager) error
- func ConvertEngineBackupState(state string) longhorn.BackupState
- func GetAddressFromBackendReplicaURL(url string) string
- func GetBackendReplicaURL(address string) string
- func GetDeprecatedInstanceManagerBinary(image string) string
- func GetEngineEndpoint(volume *Volume, ip string) (string, error)
- func GetEngineInstanceFrontend(dataEngine longhorn.DataEngineType, volumeFrontend longhorn.VolumeFrontend) (frontend string, err error)
- func IsEndpointTGTBlockDev(endpoint string) bool
- func ValidateReplicaURL(url string) error
- type BackingImageDataSourceClient
- type BackingImageDataSourceInfo
- type BackingImageManagerClient
- func (c *BackingImageManagerClient) BackupCreate(name, uuid, checksum, backupTargetURL string, ...) error
- func (c *BackingImageManagerClient) BackupStatus(name string) (*longhorn.BackupBackingImageStatus, error)
- func (c *BackingImageManagerClient) Delete(name, uuid string) error
- func (c *BackingImageManagerClient) Fetch(name, uuid, checksum, dataSourceAddress string, size int64) (*longhorn.BackingImageFileInfo, error)
- func (c *BackingImageManagerClient) Get(name, uuid string) (*longhorn.BackingImageFileInfo, error)
- func (c *BackingImageManagerClient) List() (map[string]longhorn.BackingImageFileInfo, error)
- func (c *BackingImageManagerClient) PrepareDownload(name, uuid string) (string, string, error)
- func (c *BackingImageManagerClient) Sync(name, uuid, checksum, fromHost string, size int64) (*longhorn.BackingImageFileInfo, error)
- func (c *BackingImageManagerClient) VersionGet() (int, int, error)
- func (c *BackingImageManagerClient) Watch() (*bimapi.BackingImageStream, error)
- type Backup
- type BackupBackingImageMonitor
- type BackupCreateInfo
- type BackupMonitor
- type BackupTarget
- type BackupTargetClient
- func (btc *BackupTargetClient) BackupBackingImageDelete(backupURL string) error
- func (btc *BackupTargetClient) BackupBackingImageGet(backupBackingImageURL string) (*backupbackingimage.BackupInfo, error)
- func (btc *BackupTargetClient) BackupBackingImageNameList() ([]string, error)
- func (btc *BackupTargetClient) BackupCleanUpAllMounts() (err error)
- func (btc *BackupTargetClient) BackupConfigMetaGet(url string, credential map[string]string) (*ConfigMetadata, error)
- func (btc *BackupTargetClient) BackupDelete(backupURL string, credential map[string]string) error
- func (btc *BackupTargetClient) BackupGet(backupConfigURL string, credential map[string]string) (*Backup, error)
- func (btc *BackupTargetClient) BackupNameList(destURL, volumeName string, credential map[string]string) ([]string, error)
- func (btc *BackupTargetClient) BackupVolumeDelete(destURL, volumeName string, credential map[string]string) error
- func (btc *BackupTargetClient) BackupVolumeGet(backupVolumeURL string, credential map[string]string) (*BackupVolume, error)
- func (btc *BackupTargetClient) BackupVolumeNameList() ([]string, error)
- func (btc *BackupTargetClient) DeleteSystemBackup(systemBackup *longhorn.SystemBackup) (string, error)
- func (btc *BackupTargetClient) DownloadSystemBackup(name, version, downloadPath string) error
- func (btc *BackupTargetClient) ExecuteEngineBinary(args ...string) (string, error)
- func (btc *BackupTargetClient) ExecuteEngineBinaryWithTimeout(timeout time.Duration, args ...string) (string, error)
- func (btc *BackupTargetClient) ExecuteEngineBinaryWithoutTimeout(args ...string) (string, error)
- func (btc *BackupTargetClient) GetSystemBackupConfig(name, version string) (*systembackupstore.Config, error)
- func (btc *BackupTargetClient) ListSystemBackup() (systembackupstore.SystemBackups, error)
- func (btc *BackupTargetClient) LonghornEngineBinary() string
- func (btc *BackupTargetClient) UploadSystemBackup(...) (string, error)
- type BackupVolume
- type ConfigMetadata
- type Controller
- type DiskService
- func (s *DiskService) Close()
- func (s *DiskService) DiskCreate(diskType, diskName, diskUUID, diskPath, diskDriver string, blockSize int64) (*imapi.DiskInfo, error)
- func (s *DiskService) DiskDelete(diskType, diskName, diskUUID, diskPath, diskDriver string) error
- func (s *DiskService) DiskGet(diskType, diskName, diskPath, diskDriver string) (*imapi.DiskInfo, error)
- func (s *DiskService) DiskReplicaInstanceDelete(diskType, diskName, diskUUID, diskDriver, replciaInstanceName string) error
- func (s *DiskService) DiskReplicaInstanceList(diskType, diskName, diskDriver string) (map[string]*imapi.ReplicaStorageInstance, error)
- func (s *DiskService) GetInstanceManagerName() string
- type EngineBinary
- func (e *EngineBinary) BackupRestore(engine *longhorn.Engine, ...) error
- func (e *EngineBinary) BackupRestoreStatus(*longhorn.Engine) (map[string]*longhorn.RestoreStatus, error)
- func (e *EngineBinary) CleanupBackupMountPoints() error
- func (e *EngineBinary) Close()
- func (e *EngineBinary) ExecuteEngineBinary(args ...string) (string, error)
- func (e *EngineBinary) ExecuteEngineBinaryWithTimeout(timeout time.Duration, args ...string) (string, error)
- func (e *EngineBinary) ExecuteEngineBinaryWithoutTimeout(envs []string, args ...string) (string, error)
- func (e *EngineBinary) LonghornEngineBinary() string
- func (e *EngineBinary) MetricsGet(*longhorn.Engine) (*Metrics, error)
- func (e *EngineBinary) Name() string
- func (e *EngineBinary) RemountReadOnlyVolume(*longhorn.Engine) error
- func (e *EngineBinary) ReplicaAdd(engine *longhorn.Engine, replicaName, url string, ...) error
- func (e *EngineBinary) ReplicaList(*longhorn.Engine) (map[string]*Replica, error)
- func (e *EngineBinary) ReplicaModeUpdate(engine *longhorn.Engine, url, mode string) error
- func (e *EngineBinary) ReplicaRebuildStatus(*longhorn.Engine) (map[string]*longhorn.RebuildStatus, error)
- func (e *EngineBinary) ReplicaRebuildVerify(engine *longhorn.Engine, replicaName, url string) error
- func (e *EngineBinary) ReplicaRemove(engine *longhorn.Engine, url, replicaName string) error
- func (e *EngineBinary) SPDKBackingImageCreate(name, backingImageUUID, diskUUID, checksum, fromAddress, srcDiskUUID string, ...) (*imapi.BackingImage, error)
- func (e *EngineBinary) SPDKBackingImageDelete(name, diskUUID string) error
- func (e *EngineBinary) SPDKBackingImageGet(name, diskUUID string) (*imapi.BackingImage, error)
- func (e *EngineBinary) SPDKBackingImageList() (map[string]longhorn.BackingImageV2CopyInfo, error)
- func (e *EngineBinary) SPDKBackingImageWatch(ctx context.Context) (*imapi.BackingImageStream, error)
- func (e *EngineBinary) SnapshotBackup(engine *longhorn.Engine, ...) (string, string, error)
- func (e *EngineBinary) SnapshotBackupStatus(engine *longhorn.Engine, backupName, replicaAddress, replicaName string) (*longhorn.EngineBackupStatus, error)
- func (e *EngineBinary) SnapshotClone(engine *longhorn.Engine, ...) error
- func (e *EngineBinary) SnapshotCloneStatus(*longhorn.Engine) (map[string]*longhorn.SnapshotCloneStatus, error)
- func (e *EngineBinary) SnapshotCreate(engine *longhorn.Engine, name string, labels map[string]string, ...) (string, error)
- func (e *EngineBinary) SnapshotDelete(engine *longhorn.Engine, name string) error
- func (e *EngineBinary) SnapshotGet(engine *longhorn.Engine, name string) (*longhorn.SnapshotInfo, error)
- func (e *EngineBinary) SnapshotHash(engine *longhorn.Engine, snapshotName string, rehash bool) error
- func (e *EngineBinary) SnapshotHashStatus(engine *longhorn.Engine, snapshotName string) (map[string]*longhorn.HashStatus, error)
- func (e *EngineBinary) SnapshotList(*longhorn.Engine) (map[string]*longhorn.SnapshotInfo, error)
- func (e *EngineBinary) SnapshotPurge(*longhorn.Engine) error
- func (e *EngineBinary) SnapshotPurgeStatus(*longhorn.Engine) (map[string]*longhorn.PurgeStatus, error)
- func (e *EngineBinary) SnapshotRevert(engine *longhorn.Engine, name string) error
- func (e *EngineBinary) VersionGet(engine *longhorn.Engine, clientOnly bool) (*EngineVersion, error)
- func (e *EngineBinary) VolumeExpand(engine *longhorn.Engine) error
- func (e *EngineBinary) VolumeFrontendShutdown(*longhorn.Engine) error
- func (e *EngineBinary) VolumeFrontendStart(engine *longhorn.Engine) error
- func (e *EngineBinary) VolumeGet(*longhorn.Engine) (*Volume, error)
- func (e *EngineBinary) VolumeSnapshotMaxCountSet(engine *longhorn.Engine) error
- func (e *EngineBinary) VolumeSnapshotMaxSizeSet(engine *longhorn.Engine) error
- func (e *EngineBinary) VolumeUnmapMarkSnapChainRemovedSet(engine *longhorn.Engine) error
- type EngineClient
- type EngineClientCollection
- type EngineClientProxy
- type EngineClientRequest
- type EngineCollection
- type EngineInstanceCreateRequest
- type EngineInstanceUpgradeRequest
- type EngineSimulator
- func (e *EngineSimulator) BackupRestore(engine *longhorn.Engine, ...) error
- func (e *EngineSimulator) BackupRestoreStatus(*longhorn.Engine) (map[string]*longhorn.RestoreStatus, error)
- func (e *EngineSimulator) CleanupBackupMountPoints() error
- func (e *EngineSimulator) IsGRPC() bool
- func (e *EngineSimulator) MetricsGet(*longhorn.Engine) (*Metrics, error)
- func (e *EngineSimulator) Name() string
- func (e *EngineSimulator) RemountReadOnlyVolume(*longhorn.Engine) error
- func (e *EngineSimulator) ReplicaAdd(engine *longhorn.Engine, replicaName, url string, ...) error
- func (e *EngineSimulator) ReplicaList(*longhorn.Engine) (map[string]*Replica, error)
- func (e *EngineSimulator) ReplicaModeUpdate(engine *longhorn.Engine, url, mode string) error
- func (e *EngineSimulator) ReplicaRebuildStatus(*longhorn.Engine) (map[string]*longhorn.RebuildStatus, error)
- func (e *EngineSimulator) ReplicaRebuildVerify(engine *longhorn.Engine, replicaName, url string) error
- func (e *EngineSimulator) ReplicaRemove(engine *longhorn.Engine, addr, replicaName string) error
- func (e *EngineSimulator) SPDKBackingImageCreate(name, backingImageUUID, diskUUID, checksum, fromAddress, srcDiskUUID string, ...) (*imapi.BackingImage, error)
- func (e *EngineSimulator) SPDKBackingImageDelete(name, diskUUID string) error
- func (e *EngineSimulator) SPDKBackingImageGet(name, diskUUID string) (*imapi.BackingImage, error)
- func (e *EngineSimulator) SPDKBackingImageList() (map[string]longhorn.BackingImageV2CopyInfo, error)
- func (e *EngineSimulator) SPDKBackingImageWatch(ctx context.Context) (*imapi.BackingImageStream, error)
- func (e *EngineSimulator) SimulateStopReplica(addr string) error
- func (e *EngineSimulator) SnapshotBackup(engine *longhorn.Engine, ...) (string, string, error)
- func (e *EngineSimulator) SnapshotBackupStatus(engine *longhorn.Engine, backupName, replicaAddress, replicaName string) (*longhorn.EngineBackupStatus, error)
- func (e *EngineSimulator) SnapshotClone(engine *longhorn.Engine, ...) error
- func (e *EngineSimulator) SnapshotCloneStatus(*longhorn.Engine) (map[string]*longhorn.SnapshotCloneStatus, error)
- func (e *EngineSimulator) SnapshotCreate(engine *longhorn.Engine, name string, labels map[string]string, ...) (string, error)
- func (e *EngineSimulator) SnapshotDelete(engine *longhorn.Engine, name string) error
- func (e *EngineSimulator) SnapshotGet(engine *longhorn.Engine, name string) (*longhorn.SnapshotInfo, error)
- func (e *EngineSimulator) SnapshotHash(engine *longhorn.Engine, snapshotName string, rehash bool) error
- func (e *EngineSimulator) SnapshotHashStatus(engine *longhorn.Engine, snapshotName string) (map[string]*longhorn.HashStatus, error)
- func (e *EngineSimulator) SnapshotList(engine *longhorn.Engine) (map[string]*longhorn.SnapshotInfo, error)
- func (e *EngineSimulator) SnapshotPurge(*longhorn.Engine) error
- func (e *EngineSimulator) SnapshotPurgeStatus(*longhorn.Engine) (map[string]*longhorn.PurgeStatus, error)
- func (e *EngineSimulator) SnapshotRevert(engine *longhorn.Engine, name string) error
- func (e *EngineSimulator) Start(*longhorn.InstanceManager, logrus.FieldLogger, *datastore.DataStore) error
- func (e *EngineSimulator) Stop(*longhorn.InstanceManager) error
- func (e *EngineSimulator) VersionGet(engine *longhorn.Engine, clientOnly bool) (*EngineVersion, error)
- func (e *EngineSimulator) VolumeExpand(*longhorn.Engine) error
- func (e *EngineSimulator) VolumeFrontendShutdown(*longhorn.Engine) error
- func (e *EngineSimulator) VolumeFrontendStart(*longhorn.Engine) error
- func (e *EngineSimulator) VolumeGet(*longhorn.Engine) (*Volume, error)
- func (e *EngineSimulator) VolumeSnapshotMaxCountSet(*longhorn.Engine) error
- func (e *EngineSimulator) VolumeSnapshotMaxSizeSet(*longhorn.Engine) error
- func (e *EngineSimulator) VolumeUnmapMarkSnapChainRemovedSet(*longhorn.Engine) error
- type EngineSimulatorCollection
- func (c *EngineSimulatorCollection) CreateEngineSimulator(request *EngineSimulatorRequest) error
- func (c *EngineSimulatorCollection) DeleteEngineSimulator(volumeName string) error
- func (c *EngineSimulatorCollection) GetEngineSimulator(volumeName string) (*EngineSimulator, error)
- func (c *EngineSimulatorCollection) NewEngineClient(request *EngineClientRequest) (EngineClient, error)
- type EngineSimulatorRequest
- type EngineVersion
- type InstanceManagerClient
- func (c *InstanceManagerClient) Close() error
- func (c *InstanceManagerClient) EngineInstanceCreate(req *EngineInstanceCreateRequest) (*longhorn.InstanceProcess, error)
- func (c *InstanceManagerClient) EngineInstanceUpgrade(req *EngineInstanceUpgradeRequest) (*longhorn.InstanceProcess, error)
- func (c *InstanceManagerClient) GetAPIVersion() int
- func (c *InstanceManagerClient) InstanceDelete(dataEngine longhorn.DataEngineType, name, kind, diskUUID string, ...) (err error)
- func (c *InstanceManagerClient) InstanceGet(dataEngine longhorn.DataEngineType, name, kind string) (*longhorn.InstanceProcess, error)
- func (c *InstanceManagerClient) InstanceGetBinary(dataEngine longhorn.DataEngineType, name, kind, diskUUID string) (string, error)
- func (c *InstanceManagerClient) InstanceList() (map[string]longhorn.InstanceProcess, error)
- func (c *InstanceManagerClient) InstanceLog(ctx context.Context, dataEngine longhorn.DataEngineType, name, kind string) (*imapi.LogStream, error)
- func (c *InstanceManagerClient) InstanceWatch(ctx context.Context) (interface{}, error)
- func (c *InstanceManagerClient) LogSetFlags(dataEngine longhorn.DataEngineType, component, flags string) error
- func (c *InstanceManagerClient) LogSetLevel(dataEngine longhorn.DataEngineType, component, level string) error
- func (c *InstanceManagerClient) ReplicaInstanceCreate(req *ReplicaInstanceCreateRequest) (*longhorn.InstanceProcess, error)
- func (c *InstanceManagerClient) VersionGet() (int, int, int, int, error)
- type LauncherVolumeInfo
- type Metrics
- type Proxy
- func (p *Proxy) BackupRestore(e *longhorn.Engine, ...) error
- func (p *Proxy) BackupRestoreStatus(e *longhorn.Engine) (status map[string]*longhorn.RestoreStatus, err error)
- func (p *Proxy) CleanupBackupMountPoints() (err error)
- func (p *Proxy) Close()
- func (p *Proxy) DirectToURL(e *longhorn.Engine) string
- func (p *Proxy) MetricsGet(e *longhorn.Engine) (*Metrics, error)
- func (p *Proxy) RemountReadOnlyVolume(e *longhorn.Engine) error
- func (p *Proxy) ReplicaAdd(e *longhorn.Engine, replicaName, replicaAddress string, restore, fastSync bool, ...) (err error)
- func (p *Proxy) ReplicaList(e *longhorn.Engine) (replicas map[string]*Replica, err error)
- func (p *Proxy) ReplicaModeUpdate(e *longhorn.Engine, url, mode string) (err error)
- func (p *Proxy) ReplicaRebuildStatus(e *longhorn.Engine) (status map[string]*longhorn.RebuildStatus, err error)
- func (p *Proxy) ReplicaRebuildVerify(e *longhorn.Engine, replicaName, url string) (err error)
- func (p *Proxy) ReplicaRemove(e *longhorn.Engine, address, replicaName string) (err error)
- func (p *Proxy) SPDKBackingImageCreate(name, backingImageUUID, diskUUID, checksum, fromAddress, srcDiskUUID string, ...) (*imapi.BackingImage, error)
- func (p *Proxy) SPDKBackingImageDelete(name, diskUUID string) error
- func (p *Proxy) SPDKBackingImageGet(name, diskUUID string) (*imapi.BackingImage, error)
- func (p *Proxy) SPDKBackingImageList() (map[string]longhorn.BackingImageV2CopyInfo, error)
- func (p *Proxy) SPDKBackingImageWatch(ctx context.Context) (*imapi.BackingImageStream, error)
- func (p *Proxy) SnapshotBackup(e *longhorn.Engine, ...) (string, string, error)
- func (p *Proxy) SnapshotBackupStatus(e *longhorn.Engine, backupName, replicaAddress, replicaName string) (status *longhorn.EngineBackupStatus, err error)
- func (p *Proxy) SnapshotClone(e *longhorn.Engine, ...) (err error)
- func (p *Proxy) SnapshotCloneStatus(e *longhorn.Engine) (status map[string]*longhorn.SnapshotCloneStatus, err error)
- func (p *Proxy) SnapshotCreate(e *longhorn.Engine, name string, labels map[string]string, ...) (string, error)
- func (p *Proxy) SnapshotDelete(e *longhorn.Engine, name string) (err error)
- func (p *Proxy) SnapshotGet(e *longhorn.Engine, name string) (snapshot *longhorn.SnapshotInfo, err error)
- func (p *Proxy) SnapshotHash(e *longhorn.Engine, snapshotName string, rehash bool) error
- func (p *Proxy) SnapshotHashStatus(e *longhorn.Engine, snapshotName string) (status map[string]*longhorn.HashStatus, err error)
- func (p *Proxy) SnapshotList(e *longhorn.Engine) (snapshots map[string]*longhorn.SnapshotInfo, err error)
- func (p *Proxy) SnapshotPurge(e *longhorn.Engine) (err error)
- func (p *Proxy) SnapshotPurgeStatus(e *longhorn.Engine) (status map[string]*longhorn.PurgeStatus, err error)
- func (p *Proxy) SnapshotRevert(e *longhorn.Engine, snapshotName string) (err error)
- func (p *Proxy) VersionGet(e *longhorn.Engine, clientOnly bool) (version *EngineVersion, err error)
- func (p *Proxy) VolumeExpand(e *longhorn.Engine) (err error)
- func (p *Proxy) VolumeFrontendShutdown(e *longhorn.Engine) (err error)
- func (p *Proxy) VolumeFrontendStart(e *longhorn.Engine) (err error)
- func (p *Proxy) VolumeGet(e *longhorn.Engine) (volume *Volume, err error)
- func (p *Proxy) VolumeSnapshotMaxCountSet(e *longhorn.Engine) error
- func (p *Proxy) VolumeSnapshotMaxSizeSet(e *longhorn.Engine) error
- func (p *Proxy) VolumeUnmapMarkSnapChainRemovedSet(e *longhorn.Engine) error
- type Replica
- type ReplicaError
- type ReplicaInstanceCreateRequest
- type ShareManagerClient
- type SystemBackupOperationInterface
- type TaskError
- type Volume
Constants ¶
const ( CurrentBackingImageManagerAPIVersion = 3 MinBackingImageManagerAPIVersion = 3 UnknownBackingImageManagerAPIVersion = 0 )
const ( BackupMonitorSyncPeriod = 2 * time.Second // BackupMonitorMaxRetryPeriod is the maximum retry period when backup monitor routine // encounters an error and backup stays in Pending state BackupMonitorMaxRetryPeriod = 24 * time.Hour )
const ( ProcessStateInProgress = "in_progress" ProcessStateComplete = "complete" ProcessStateError = "error" ErrNotImplement = "not implemented" )
Should be the same values as in https://github.com/longhorn/longhorn-engine/blob/master/pkg/types/types.go
const ( CurrentInstanceManagerAPIVersion = 6 MinInstanceManagerAPIVersion = 1 UnknownInstanceManagerAPIVersion = 0 UnknownInstanceManagerProxyAPIVersion = 0 // UnsupportedInstanceManagerProxyAPIVersion means the instance manager without the proxy client (Longhorn release before v1.3.0) UnsupportedInstanceManagerProxyAPIVersion = 0 DefaultEnginePortCount = 1 DefaultReplicaPortCountV1 = 10 DefaultReplicaPortCountV2 = 5 DefaultPortArg = "--listen,0.0.0.0:" DefaultTerminateSignal = "SIGHUP" // IncompatibleInstanceManagerAPIVersion means the instance manager version in v0.7.0 IncompatibleInstanceManagerAPIVersion = -1 DeprecatedInstanceManagerBinaryName = "longhorn-instance-manager" )
const ( CLIVersionFour = 4 CLIVersionFive = 5 // CLIAPIMinVersionForExistingEngineBeforeUpgrade will enable already created volumes before the upgrade to operate normally. // Additionally, they will not be impacted by the new engine upgrade enforcement mechanism. // This mechanism exclusively focuses on preventing users from creating or updating a volume, engine, or replica using any incompatible version. // It is strictly bound to the default engine image of the release, emeta.CLIAPIMinVersion. CLIAPIMinVersionForExistingEngineBeforeUpgrade = 3 InstanceManagerProcessManagerServiceDefaultPort = 8500 InstanceManagerProxyServiceDefaultPort = InstanceManagerProcessManagerServiceDefaultPort + 1 // 8501 InstanceManagerDiskServiceDefaultPort = InstanceManagerProcessManagerServiceDefaultPort + 2 // 8502 InstanceManagerInstanceServiceDefaultPort = InstanceManagerProcessManagerServiceDefaultPort + 3 // 8503 InstanceManagerSpdkServiceDefaultPort = InstanceManagerProcessManagerServiceDefaultPort + 4 // 8504 BackingImageManagerDefaultPort = 8000 BackingImageDataSourceDefaultPort = 8000 BackingImageSyncServerDefaultPort = 8001 EndpointISCSIPrefix = "iscsi://" DefaultISCSIPort = "3260" DefaultISCSILUN = "1" MaxPollCount = 60 MinPollCount = 1 PollInterval = 1 * time.Second BackingImageDataSourcePollInterval = 3 * PollInterval MaxMonitorRetryCount = 10 )
Variables ¶
This section is empty.
Functions ¶
func CheckBackingImageManagerCompatibility ¶ added in v1.4.0
func CheckCLICompatibility ¶ added in v1.4.0
func CheckInstanceManagerCompatibility ¶ added in v1.4.0
func CheckInstanceManagerProxySupport ¶ added in v1.3.0
func CheckInstanceManagerProxySupport(im *longhorn.InstanceManager) error
func ConvertEngineBackupState ¶ added in v1.2.3
func ConvertEngineBackupState(state string) longhorn.BackupState
ConvertEngineBackupState converts longhorn engine backup state to Backup CR state
func GetAddressFromBackendReplicaURL ¶ added in v0.6.0
func GetBackendReplicaURL ¶ added in v0.6.0
func GetDeprecatedInstanceManagerBinary ¶ added in v0.8.0
func GetEngineEndpoint ¶ added in v1.1.3
func GetEngineInstanceFrontend ¶ added in v1.5.0
func GetEngineInstanceFrontend(dataEngine longhorn.DataEngineType, volumeFrontend longhorn.VolumeFrontend) (frontend string, err error)
func IsEndpointTGTBlockDev ¶ added in v1.4.0
func ValidateReplicaURL ¶
Types ¶
type BackingImageDataSourceClient ¶ added in v1.2.0
type BackingImageDataSourceClient struct {
// contains filtered or unexported fields
}
func NewBackingImageDataSourceClient ¶ added in v1.2.0
func NewBackingImageDataSourceClient(ip string) *BackingImageDataSourceClient
func (*BackingImageDataSourceClient) Get ¶ added in v1.2.0
func (c *BackingImageDataSourceClient) Get() (*BackingImageDataSourceInfo, error)
func (*BackingImageDataSourceClient) Transfer ¶ added in v1.3.0
func (c *BackingImageDataSourceClient) Transfer() error
type BackingImageDataSourceInfo ¶ added in v1.2.0
type BackingImageDataSourceInfo struct { DiskUUID string `json:"diskUUID"` SourceType string `json:"sourceType"` Parameters map[string]string `json:"parameters"` Name string `json:"name"` UUID string `json:"uuid"` FilePath string `json:"filePath"` State string `json:"state"` Size int64 `json:"size"` Progress int `json:"progress"` ProcessedSize int64 `json:"processedSize"` CurrentChecksum string `json:"currentChecksum"` Message string `json:"message"` }
type BackingImageManagerClient ¶ added in v1.1.1
type BackingImageManagerClient struct {
// contains filtered or unexported fields
}
func NewBackingImageManagerClient ¶ added in v1.1.1
func NewBackingImageManagerClient(bim *longhorn.BackingImageManager) (*BackingImageManagerClient, error)
func (*BackingImageManagerClient) BackupCreate ¶ added in v1.6.0
func (*BackingImageManagerClient) BackupStatus ¶ added in v1.6.0
func (c *BackingImageManagerClient) BackupStatus(name string) (*longhorn.BackupBackingImageStatus, error)
func (*BackingImageManagerClient) Delete ¶ added in v1.1.1
func (c *BackingImageManagerClient) Delete(name, uuid string) error
func (*BackingImageManagerClient) Fetch ¶ added in v1.2.0
func (c *BackingImageManagerClient) Fetch(name, uuid, checksum, dataSourceAddress string, size int64) (*longhorn.BackingImageFileInfo, error)
func (*BackingImageManagerClient) Get ¶ added in v1.1.1
func (c *BackingImageManagerClient) Get(name, uuid string) (*longhorn.BackingImageFileInfo, error)
func (*BackingImageManagerClient) List ¶ added in v1.1.1
func (c *BackingImageManagerClient) List() (map[string]longhorn.BackingImageFileInfo, error)
func (*BackingImageManagerClient) PrepareDownload ¶ added in v1.3.0
func (c *BackingImageManagerClient) PrepareDownload(name, uuid string) (string, string, error)
func (*BackingImageManagerClient) Sync ¶ added in v1.1.1
func (c *BackingImageManagerClient) Sync(name, uuid, checksum, fromHost string, size int64) (*longhorn.BackingImageFileInfo, error)
func (*BackingImageManagerClient) VersionGet ¶ added in v1.1.1
func (c *BackingImageManagerClient) VersionGet() (int, int, error)
func (*BackingImageManagerClient) Watch ¶ added in v1.1.1
func (c *BackingImageManagerClient) Watch() (*bimapi.BackingImageStream, error)
type Backup ¶
type Backup struct { Name string `json:"name"` State longhorn.BackupState `json:"state"` URL string `json:"url"` SnapshotName string `json:"snapshotName"` SnapshotCreated string `json:"snapshotCreated"` Created string `json:"created"` Size string `json:"size"` Labels map[string]string `json:"labels"` VolumeName string `json:"volumeName"` VolumeSize string `json:"volumeSize"` VolumeCreated string `json:"volumeCreated"` VolumeBackingImageName string `json:"volumeBackingImageName"` Messages map[string]string `json:"messages"` CompressionMethod string `json:"compressionMethod"` Parameters map[string]string `json:"parameters"` NewlyUploadedDataSize string `json:"newlyUploadedDataSize"` ReUploadedDataSize string `json:"reUploadedDataSize"` BackupTargetName string `json:"backupTargetName"` }
type BackupBackingImageMonitor ¶ added in v1.6.0
type BackupBackingImageMonitor struct {
// contains filtered or unexported fields
}
func NewBackupBackingImageMonitor ¶ added in v1.6.0
func NewBackupBackingImageMonitor(logger logrus.FieldLogger, ds *datastore.DataStore, bbi *longhorn.BackupBackingImage, backingImage *longhorn.BackingImage, backupTargetClient *BackupTargetClient, compressionMethod longhorn.BackupCompressionMethod, concurrentLimit int, bimClient *BackingImageManagerClient, syncCallback func(key string)) (*BackupBackingImageMonitor, error)
func (*BackupBackingImageMonitor) GetBackupBackingImageStatus ¶ added in v1.6.0
func (m *BackupBackingImageMonitor) GetBackupBackingImageStatus() longhorn.BackupBackingImageStatus
func (*BackupBackingImageMonitor) Stop ¶
func (m *BackupBackingImageMonitor) Stop()
type BackupCreateInfo ¶ added in v0.6.0
type BackupMonitor ¶ added in v1.2.3
type BackupMonitor struct {
// contains filtered or unexported fields
}
func NewBackupMonitor ¶ added in v1.2.3
func NewBackupMonitor(logger logrus.FieldLogger, ds *datastore.DataStore, backup *longhorn.Backup, volume *longhorn.Volume, backupTargetClient *BackupTargetClient, biChecksum string, compressionMethod longhorn.BackupCompressionMethod, concurrentLimit int, storageClassName string, engine *longhorn.Engine, engineClientProxy EngineClientProxy, syncCallback func(key string)) (*BackupMonitor, error)
func (*BackupMonitor) Close ¶ added in v1.2.3
func (m *BackupMonitor) Close()
func (*BackupMonitor) GetBackupStatus ¶ added in v1.2.3
func (m *BackupMonitor) GetBackupStatus() longhorn.BackupStatus
type BackupTarget ¶
type BackupTargetClient ¶ added in v1.2.0
type BackupTargetClient struct { Image string URL string Credential map[string]string ExecuteTimeout time.Duration }
func NewBackupTargetClient ¶ added in v1.2.0
func NewBackupTargetClient(engineImage, url string, credential map[string]string, executeTimeout time.Duration) *BackupTargetClient
NewBackupTargetClient returns the backup target client
func NewBackupTargetClientFromBackupTarget ¶ added in v1.4.0
func NewBackupTargetClientFromBackupTarget(backupTarget *longhorn.BackupTarget, ds *datastore.DataStore) (*BackupTargetClient, error)
func (*BackupTargetClient) BackupBackingImageDelete ¶ added in v1.6.0
func (btc *BackupTargetClient) BackupBackingImageDelete(backupURL string) error
BackupBackingImageDelete deletes the backup volume from the remote backup target
func (*BackupTargetClient) BackupBackingImageGet ¶ added in v1.6.0
func (btc *BackupTargetClient) BackupBackingImageGet(backupBackingImageURL string) (*backupbackingimage.BackupInfo, error)
BackupBackingImageGet inspects a backup config with the given backup config URL
func (*BackupTargetClient) BackupBackingImageNameList ¶ added in v1.6.0
func (btc *BackupTargetClient) BackupBackingImageNameList() ([]string, error)
BackupBackingImageNameList returns a list of backup backing image names
func (*BackupTargetClient) BackupCleanUpAllMounts ¶ added in v1.4.2
func (btc *BackupTargetClient) BackupCleanUpAllMounts() (err error)
BackupCleanUpAllMounts clean up all mount points of backup store on the node
func (*BackupTargetClient) BackupConfigMetaGet ¶ added in v1.3.0
func (btc *BackupTargetClient) BackupConfigMetaGet(url string, credential map[string]string) (*ConfigMetadata, error)
BackupConfigMetaGet returns the config metadata with the given URL
func (*BackupTargetClient) BackupDelete ¶ added in v1.3.0
func (btc *BackupTargetClient) BackupDelete(backupURL string, credential map[string]string) error
BackupDelete deletes the backup from the remote backup target
func (*BackupTargetClient) BackupGet ¶ added in v1.3.0
func (btc *BackupTargetClient) BackupGet(backupConfigURL string, credential map[string]string) (*Backup, error)
BackupGet inspects a backup config with the given backup config URL
func (*BackupTargetClient) BackupNameList ¶ added in v1.3.0
func (btc *BackupTargetClient) BackupNameList(destURL, volumeName string, credential map[string]string) ([]string, error)
BackupNameList returns a list of backup names
func (*BackupTargetClient) BackupVolumeDelete ¶ added in v1.3.0
func (btc *BackupTargetClient) BackupVolumeDelete(destURL, volumeName string, credential map[string]string) error
BackupVolumeDelete deletes the backup volume from the remote backup target
func (*BackupTargetClient) BackupVolumeGet ¶ added in v1.3.0
func (btc *BackupTargetClient) BackupVolumeGet(backupVolumeURL string, credential map[string]string) (*BackupVolume, error)
BackupVolumeGet inspects a backup volume config with the given volume config URL
func (*BackupTargetClient) BackupVolumeNameList ¶ added in v1.3.0
func (btc *BackupTargetClient) BackupVolumeNameList() ([]string, error)
BackupVolumeNameList returns a list of backup volume names
func (*BackupTargetClient) DeleteSystemBackup ¶ added in v1.4.0
func (btc *BackupTargetClient) DeleteSystemBackup(systemBackup *longhorn.SystemBackup) (string, error)
DeleteSystemBackup deletes system backup in the backup target
func (*BackupTargetClient) DownloadSystemBackup ¶ added in v1.4.0
func (btc *BackupTargetClient) DownloadSystemBackup(name, version, downloadPath string) error
DownloadSystemBackup downloads system backup from the backup target
func (*BackupTargetClient) ExecuteEngineBinary ¶ added in v1.2.0
func (btc *BackupTargetClient) ExecuteEngineBinary(args ...string) (string, error)
func (*BackupTargetClient) ExecuteEngineBinaryWithTimeout ¶ added in v1.4.0
func (*BackupTargetClient) ExecuteEngineBinaryWithoutTimeout ¶ added in v1.2.0
func (btc *BackupTargetClient) ExecuteEngineBinaryWithoutTimeout(args ...string) (string, error)
func (*BackupTargetClient) GetSystemBackupConfig ¶ added in v1.4.0
func (btc *BackupTargetClient) GetSystemBackupConfig(name, version string) (*systembackupstore.Config, error)
GetSystemBackupConfig returns the system backup config from the backup target
func (*BackupTargetClient) ListSystemBackup ¶ added in v1.4.0
func (btc *BackupTargetClient) ListSystemBackup() (systembackupstore.SystemBackups, error)
ListSystemBackup returns a list of system backups in backup target
func (*BackupTargetClient) LonghornEngineBinary ¶ added in v1.2.0
func (btc *BackupTargetClient) LonghornEngineBinary() string
func (*BackupTargetClient) UploadSystemBackup ¶ added in v1.4.0
func (btc *BackupTargetClient) UploadSystemBackup(name, localFile, longhornVersion, longhornGitCommit, managerImage, engineImage string) (string, error)
UploadSystemBackup uploads system backup to the backup target
type BackupVolume ¶
type BackupVolume struct { Name string `json:"name"` Size string `json:"size"` Labels map[string]string `json:"labels"` Created string `json:"created"` LastBackupName string `json:"lastBackupName"` LastBackupAt string `json:"lastBackupAt"` DataStored string `json:"dataStored"` Messages map[string]string `json:"messages"` Backups map[string]*Backup `json:"backups"` BackingImageName string `json:"backingImageName"` BackingImageChecksum string `json:"backingImageChecksum"` StorageClassName string `json:"storageClassName"` BackupTargetName string `json:"backupTargetName"` VolumeName string `json:"volumeName"` }
type ConfigMetadata ¶ added in v1.2.0
type Controller ¶
type DiskService ¶ added in v1.5.0
type DiskService struct {
// contains filtered or unexported fields
}
func NewDiskServiceClient ¶ added in v1.5.0
func NewDiskServiceClient(im *longhorn.InstanceManager, logger logrus.FieldLogger) (c *DiskService, err error)
func (*DiskService) Close ¶ added in v1.5.0
func (s *DiskService) Close()
func (*DiskService) DiskCreate ¶ added in v1.5.0
func (*DiskService) DiskDelete ¶ added in v1.5.0
func (s *DiskService) DiskDelete(diskType, diskName, diskUUID, diskPath, diskDriver string) error
func (*DiskService) DiskGet ¶ added in v1.5.0
func (s *DiskService) DiskGet(diskType, diskName, diskPath, diskDriver string) (*imapi.DiskInfo, error)
func (*DiskService) DiskReplicaInstanceDelete ¶ added in v1.5.0
func (s *DiskService) DiskReplicaInstanceDelete(diskType, diskName, diskUUID, diskDriver, replciaInstanceName string) error
func (*DiskService) DiskReplicaInstanceList ¶ added in v1.5.0
func (s *DiskService) DiskReplicaInstanceList(diskType, diskName, diskDriver string) (map[string]*imapi.ReplicaStorageInstance, error)
func (*DiskService) GetInstanceManagerName ¶ added in v1.7.0
func (s *DiskService) GetInstanceManagerName() string
type EngineBinary ¶ added in v1.3.0
type EngineBinary struct {
// contains filtered or unexported fields
}
func GetEngineBinaryClient ¶ added in v1.4.0
func GetEngineBinaryClient(ds *datastore.DataStore, volumeName, nodeID string) (client *EngineBinary, err error)
func (*EngineBinary) BackupRestore ¶ added in v1.3.0
func (e *EngineBinary) BackupRestore(engine *longhorn.Engine, backupTarget, backupName, backupVolumeName, lastRestored string, credential map[string]string, concurrentLimit int) error
BackupRestore calls engine binary TODO: Deprecated, replaced by gRPC proxy
func (*EngineBinary) BackupRestoreStatus ¶ added in v1.3.0
func (e *EngineBinary) BackupRestoreStatus(*longhorn.Engine) (map[string]*longhorn.RestoreStatus, error)
BackupRestoreStatus calls engine binary TODO: Deprecated, replaced by gRPC proxy
func (*EngineBinary) CleanupBackupMountPoints ¶ added in v1.5.4
func (e *EngineBinary) CleanupBackupMountPoints() error
CleanupBackupMountPoints calls engine binary TODO: Deprecated, replaced by gRPC proxy, just to match the interface
func (*EngineBinary) Close ¶ added in v1.3.0
func (e *EngineBinary) Close()
Close engine proxy client connection. Do not panic this method because this is could be called by the fallback client.
func (*EngineBinary) ExecuteEngineBinary ¶ added in v1.3.0
func (e *EngineBinary) ExecuteEngineBinary(args ...string) (string, error)
func (*EngineBinary) ExecuteEngineBinaryWithTimeout ¶ added in v1.3.0
func (*EngineBinary) ExecuteEngineBinaryWithoutTimeout ¶ added in v1.3.0
func (e *EngineBinary) ExecuteEngineBinaryWithoutTimeout(envs []string, args ...string) (string, error)
func (*EngineBinary) LonghornEngineBinary ¶ added in v1.3.0
func (e *EngineBinary) LonghornEngineBinary() string
func (*EngineBinary) MetricsGet ¶ added in v1.4.0
func (e *EngineBinary) MetricsGet(*longhorn.Engine) (*Metrics, error)
func (*EngineBinary) Name ¶ added in v1.3.0
func (e *EngineBinary) Name() string
func (*EngineBinary) RemountReadOnlyVolume ¶ added in v1.5.4
func (e *EngineBinary) RemountReadOnlyVolume(*longhorn.Engine) error
func (*EngineBinary) ReplicaAdd ¶ added in v1.3.0
func (e *EngineBinary) ReplicaAdd(engine *longhorn.Engine, replicaName, url string, isRestoreVolume, fastSync bool, localSync *etypes.FileLocalSync, replicaFileSyncHTTPClientTimeout, grpcTimeoutSeconds int64) error
ReplicaAdd calls engine binary TODO: Deprecated, replaced by gRPC proxy
func (*EngineBinary) ReplicaList ¶ added in v1.3.0
ReplicaList calls engine binary TODO: Deprecated, replaced by gRPC proxy
func (*EngineBinary) ReplicaModeUpdate ¶ added in v1.4.0
func (e *EngineBinary) ReplicaModeUpdate(engine *longhorn.Engine, url, mode string) error
ReplicaModeUpdate calls engine binary TODO: Deprecated, replaced by gRPC proxy
func (*EngineBinary) ReplicaRebuildStatus ¶ added in v1.3.0
func (e *EngineBinary) ReplicaRebuildStatus(*longhorn.Engine) (map[string]*longhorn.RebuildStatus, error)
ReplicaRebuildStatus calls engine binary TODO: Deprecated, replaced by gRPC proxy
func (*EngineBinary) ReplicaRebuildVerify ¶ added in v1.3.0
func (e *EngineBinary) ReplicaRebuildVerify(engine *longhorn.Engine, replicaName, url string) error
ReplicaRebuildVerify calls engine binary TODO: Deprecated, replaced by gRPC proxy
func (*EngineBinary) ReplicaRemove ¶ added in v1.3.0
func (e *EngineBinary) ReplicaRemove(engine *longhorn.Engine, url, replicaName string) error
ReplicaRemove calls engine binary TODO: Deprecated, replaced by gRPC proxy
func (*EngineBinary) SPDKBackingImageCreate ¶
func (e *EngineBinary) SPDKBackingImageCreate(name, backingImageUUID, diskUUID, checksum, fromAddress, srcDiskUUID string, size uint64) (*imapi.BackingImage, error)
func (*EngineBinary) SPDKBackingImageDelete ¶
func (e *EngineBinary) SPDKBackingImageDelete(name, diskUUID string) error
func (*EngineBinary) SPDKBackingImageGet ¶
func (e *EngineBinary) SPDKBackingImageGet(name, diskUUID string) (*imapi.BackingImage, error)
func (*EngineBinary) SPDKBackingImageList ¶
func (e *EngineBinary) SPDKBackingImageList() (map[string]longhorn.BackingImageV2CopyInfo, error)
func (*EngineBinary) SPDKBackingImageWatch ¶
func (e *EngineBinary) SPDKBackingImageWatch(ctx context.Context) (*imapi.BackingImageStream, error)
func (*EngineBinary) SnapshotBackup ¶ added in v1.3.0
func (e *EngineBinary) SnapshotBackup(engine *longhorn.Engine, snapName, backupName, backupTarget, backingImageName, backingImageChecksum, compressionMethod string, concurrentLimit int, storageClassName string, labels, credential, parameters map[string]string) (string, string, error)
SnapshotBackup calls engine binary TODO: Deprecated, replaced by gRPC proxy
func (*EngineBinary) SnapshotBackupStatus ¶ added in v1.3.0
func (e *EngineBinary) SnapshotBackupStatus(engine *longhorn.Engine, backupName, replicaAddress, replicaName string) (*longhorn.EngineBackupStatus, error)
SnapshotBackupStatus calls engine binary TODO: Deprecated, replaced by gRPC proxy
func (*EngineBinary) SnapshotClone ¶ added in v1.3.0
func (e *EngineBinary) SnapshotClone(engine *longhorn.Engine, snapshotName, fromEngineAddress, fromVolumeName, fromEngineName string, fileSyncHTTPClientTimeout, grpcTimeoutSeconds int64) error
SnapshotClone calls engine binary TODO: Deprecated, replaced by gRPC proxy
func (*EngineBinary) SnapshotCloneStatus ¶ added in v1.3.0
func (e *EngineBinary) SnapshotCloneStatus(*longhorn.Engine) (map[string]*longhorn.SnapshotCloneStatus, error)
SnapshotCloneStatus calls engine binary TODO: Deprecated, replaced by gRPC proxy
func (*EngineBinary) SnapshotCreate ¶ added in v1.3.0
func (e *EngineBinary) SnapshotCreate(engine *longhorn.Engine, name string, labels map[string]string, freezeFilesystem bool) (string, error)
SnapshotCreate calls engine binary TODO: Deprecated, replaced by gRPC proxy
func (*EngineBinary) SnapshotDelete ¶ added in v1.3.0
func (e *EngineBinary) SnapshotDelete(engine *longhorn.Engine, name string) error
SnapshotDelete calls engine binary TODO: Deprecated, replaced by gRPC proxy
func (*EngineBinary) SnapshotGet ¶ added in v1.3.0
func (e *EngineBinary) SnapshotGet(engine *longhorn.Engine, name string) (*longhorn.SnapshotInfo, error)
SnapshotGet calls engine binary TODO: Deprecated, replaced by gRPC proxy
func (*EngineBinary) SnapshotHash ¶ added in v1.4.0
func (e *EngineBinary) SnapshotHash(engine *longhorn.Engine, snapshotName string, rehash bool) error
SnapshotHash calls engine binary TODO: Deprecated, replaced by gRPC proxy
func (*EngineBinary) SnapshotHashStatus ¶ added in v1.4.0
func (e *EngineBinary) SnapshotHashStatus(engine *longhorn.Engine, snapshotName string) (map[string]*longhorn.HashStatus, error)
SnapshotHashStatus calls engine binary TODO: Deprecated, replaced by gRPC proxy
func (*EngineBinary) SnapshotList ¶ added in v1.3.0
func (e *EngineBinary) SnapshotList(*longhorn.Engine) (map[string]*longhorn.SnapshotInfo, error)
SnapshotList calls engine binary TODO: Deprecated, replaced by gRPC proxy
func (*EngineBinary) SnapshotPurge ¶ added in v1.3.0
func (e *EngineBinary) SnapshotPurge(*longhorn.Engine) error
SnapshotPurge calls engine binary TODO: Deprecated, replaced by gRPC proxy
func (*EngineBinary) SnapshotPurgeStatus ¶ added in v1.3.0
func (e *EngineBinary) SnapshotPurgeStatus(*longhorn.Engine) (map[string]*longhorn.PurgeStatus, error)
SnapshotPurgeStatus calls engine binary TODO: Deprecated, replaced by gRPC proxy
func (*EngineBinary) SnapshotRevert ¶ added in v1.3.0
func (e *EngineBinary) SnapshotRevert(engine *longhorn.Engine, name string) error
SnapshotRevert calls engine binary TODO: Deprecated, replaced by gRPC proxy
func (*EngineBinary) VersionGet ¶ added in v1.3.0
func (e *EngineBinary) VersionGet(engine *longhorn.Engine, clientOnly bool) (*EngineVersion, error)
VersionGet calls engine binary to get client version and request gRPC proxy for server version.
func (*EngineBinary) VolumeExpand ¶ added in v1.3.0
func (e *EngineBinary) VolumeExpand(engine *longhorn.Engine) error
VolumeExpand calls engine binary TODO: Deprecated, replaced by gRPC proxy
func (*EngineBinary) VolumeFrontendShutdown ¶ added in v1.3.0
func (e *EngineBinary) VolumeFrontendShutdown(*longhorn.Engine) error
VolumeFrontendShutdown calls engine binary TODO: Deprecated, replaced by gRPC proxy
func (*EngineBinary) VolumeFrontendStart ¶ added in v1.3.0
func (e *EngineBinary) VolumeFrontendStart(engine *longhorn.Engine) error
VolumeFrontendStart calls engine binary TODO: Deprecated, replaced by gRPC proxy
func (*EngineBinary) VolumeGet ¶ added in v1.3.0
func (e *EngineBinary) VolumeGet(*longhorn.Engine) (*Volume, error)
VolumeGet calls engine binary TODO: Deprecated, replaced by gRPC proxy
func (*EngineBinary) VolumeSnapshotMaxCountSet ¶ added in v1.6.0
func (e *EngineBinary) VolumeSnapshotMaxCountSet(engine *longhorn.Engine) error
VolumeSnapshotMaxCountSet calls engine binary TODO: Deprecated, replaced by gRPC proxy
func (*EngineBinary) VolumeSnapshotMaxSizeSet ¶ added in v1.6.0
func (e *EngineBinary) VolumeSnapshotMaxSizeSet(engine *longhorn.Engine) error
VolumeSnapshotMaxSizeSet calls engine binary TODO: Deprecated, replaced by gRPC proxy
func (*EngineBinary) VolumeUnmapMarkSnapChainRemovedSet ¶ added in v1.4.0
func (e *EngineBinary) VolumeUnmapMarkSnapChainRemovedSet(engine *longhorn.Engine) error
VolumeUnmapMarkSnapChainRemovedSet calls engine binary TODO: Deprecated, replaced by gRPC proxy
type EngineClient ¶
type EngineClient interface { VersionGet(engine *longhorn.Engine, clientOnly bool) (*EngineVersion, error) VolumeGet(*longhorn.Engine) (*Volume, error) VolumeExpand(*longhorn.Engine) error VolumeFrontendStart(*longhorn.Engine) error VolumeFrontendShutdown(*longhorn.Engine) error VolumeUnmapMarkSnapChainRemovedSet(engine *longhorn.Engine) error VolumeSnapshotMaxCountSet(engine *longhorn.Engine) error VolumeSnapshotMaxSizeSet(engine *longhorn.Engine) error ReplicaList(*longhorn.Engine) (map[string]*Replica, error) ReplicaAdd(engine *longhorn.Engine, replicaName, url string, isRestoreVolume, fastSync bool, localSync *etypes.FileLocalSync, replicaFileSyncHTTPClientTimeout, grpcTimeoutSeconds int64) error ReplicaRemove(engine *longhorn.Engine, url, replicaName string) error ReplicaRebuildStatus(*longhorn.Engine) (map[string]*longhorn.RebuildStatus, error) ReplicaRebuildVerify(engine *longhorn.Engine, replicaName, url string) error ReplicaModeUpdate(engine *longhorn.Engine, url string, mode string) error SnapshotCreate(engine *longhorn.Engine, name string, labels map[string]string, freezeFilesystem bool) (string, error) SnapshotList(engine *longhorn.Engine) (map[string]*longhorn.SnapshotInfo, error) SnapshotGet(engine *longhorn.Engine, name string) (*longhorn.SnapshotInfo, error) SnapshotDelete(engine *longhorn.Engine, name string) error SnapshotRevert(engine *longhorn.Engine, name string) error SnapshotPurge(engine *longhorn.Engine) error SnapshotPurgeStatus(engine *longhorn.Engine) (map[string]*longhorn.PurgeStatus, error) SnapshotBackup(engine *longhorn.Engine, snapshotName, backupName, backupTarget, backingImageName, backingImageChecksum, compressionMethod string, concurrentLimit int, storageClassName string, labels, credential, parameters map[string]string) (string, string, error) SnapshotBackupStatus(engine *longhorn.Engine, backupName, replicaAddress, replicaName string) (*longhorn.EngineBackupStatus, error) SnapshotCloneStatus(engine *longhorn.Engine) (map[string]*longhorn.SnapshotCloneStatus, error) SnapshotClone(engine *longhorn.Engine, snapshotName, fromEngineAddress, fromVolumeName, fromEngineName string, fileSyncHTTPClientTimeout, grpcTimeoutSeconds int64) error SnapshotHash(engine *longhorn.Engine, snapshotName string, rehash bool) error SnapshotHashStatus(engine *longhorn.Engine, snapshotName string) (map[string]*longhorn.HashStatus, error) BackupRestore(engine *longhorn.Engine, backupTarget, backupName, backupVolume, lastRestored string, credential map[string]string, concurrentLimit int) error BackupRestoreStatus(engine *longhorn.Engine) (map[string]*longhorn.RestoreStatus, error) SPDKBackingImageCreate(name, backingImageUUID, diskUUID, checksum, fromAddress, srcDiskUUID string, size uint64) (*imapi.BackingImage, error) SPDKBackingImageDelete(name, diskUUID string) error SPDKBackingImageGet(name, diskUUID string) (*imapi.BackingImage, error) SPDKBackingImageList() (map[string]longhorn.BackingImageV2CopyInfo, error) SPDKBackingImageWatch(ctx context.Context) (*imapi.BackingImageStream, error) CleanupBackupMountPoints() error MetricsGet(engine *longhorn.Engine) (*Metrics, error) RemountReadOnlyVolume(engine *longhorn.Engine) error }
type EngineClientCollection ¶
type EngineClientCollection interface {
NewEngineClient(request *EngineClientRequest) (*EngineBinary, error)
}
type EngineClientProxy ¶ added in v1.3.0
type EngineClientProxy interface { EngineClient Close() }
func GetCompatibleClient ¶ added in v1.3.0
func GetCompatibleClient(e *longhorn.Engine, fallBack interface{}, ds *datastore.DataStore, logger logrus.FieldLogger, proxyConnCounter util.Counter) (c EngineClientProxy, err error)
func NewEngineClientProxy ¶ added in v1.3.0
func NewEngineClientProxy(im *longhorn.InstanceManager, logger logrus.FieldLogger, proxyConnCounter util.Counter) (c EngineClientProxy, err error)
type EngineClientRequest ¶
type EngineCollection ¶
type EngineCollection struct{}
func (*EngineCollection) NewEngineClient ¶
func (c *EngineCollection) NewEngineClient(request *EngineClientRequest) (*EngineBinary, error)
type EngineInstanceCreateRequest ¶ added in v1.5.0
type EngineInstanceCreateRequest struct { Engine *longhorn.Engine VolumeFrontend longhorn.VolumeFrontend EngineReplicaTimeout int64 ReplicaFileSyncHTTPClientTimeout int64 DataLocality longhorn.DataLocality ImIP string EngineCLIAPIVersion int UpgradeRequired bool InitiatorAddress string TargetAddress string }
type EngineInstanceUpgradeRequest ¶ added in v1.5.0
type EngineInstanceUpgradeRequest struct { Engine *longhorn.Engine VolumeFrontend longhorn.VolumeFrontend EngineReplicaTimeout int64 ReplicaFileSyncHTTPClientTimeout int64 DataLocality longhorn.DataLocality EngineCLIAPIVersion int }
type EngineSimulator ¶
type EngineSimulator struct {
// contains filtered or unexported fields
}
func (*EngineSimulator) BackupRestore ¶ added in v0.6.0
func (*EngineSimulator) BackupRestoreStatus ¶ added in v0.6.0
func (e *EngineSimulator) BackupRestoreStatus(*longhorn.Engine) (map[string]*longhorn.RestoreStatus, error)
func (*EngineSimulator) CleanupBackupMountPoints ¶ added in v1.5.4
func (e *EngineSimulator) CleanupBackupMountPoints() error
func (*EngineSimulator) IsGRPC ¶ added in v1.3.0
func (e *EngineSimulator) IsGRPC() bool
func (*EngineSimulator) MetricsGet ¶ added in v1.4.0
func (e *EngineSimulator) MetricsGet(*longhorn.Engine) (*Metrics, error)
func (*EngineSimulator) Name ¶
func (e *EngineSimulator) Name() string
func (*EngineSimulator) RemountReadOnlyVolume ¶ added in v1.5.4
func (e *EngineSimulator) RemountReadOnlyVolume(*longhorn.Engine) error
func (*EngineSimulator) ReplicaAdd ¶
func (e *EngineSimulator) ReplicaAdd(engine *longhorn.Engine, replicaName, url string, isRestoreVolume, fastSync bool, localSync *etypes.FileLocalSync, replicaFileSyncHTTPClientTimeout int64, grpcTimeoutSeconds int64) error
func (*EngineSimulator) ReplicaList ¶
func (*EngineSimulator) ReplicaModeUpdate ¶ added in v1.4.0
func (e *EngineSimulator) ReplicaModeUpdate(engine *longhorn.Engine, url, mode string) error
func (*EngineSimulator) ReplicaRebuildStatus ¶ added in v0.8.0
func (e *EngineSimulator) ReplicaRebuildStatus(*longhorn.Engine) (map[string]*longhorn.RebuildStatus, error)
func (*EngineSimulator) ReplicaRebuildVerify ¶ added in v1.1.0
func (e *EngineSimulator) ReplicaRebuildVerify(engine *longhorn.Engine, replicaName, url string) error
func (*EngineSimulator) ReplicaRemove ¶
func (e *EngineSimulator) ReplicaRemove(engine *longhorn.Engine, addr, replicaName string) error
func (*EngineSimulator) SPDKBackingImageCreate ¶
func (e *EngineSimulator) SPDKBackingImageCreate(name, backingImageUUID, diskUUID, checksum, fromAddress, srcDiskUUID string, size uint64) (*imapi.BackingImage, error)
func (*EngineSimulator) SPDKBackingImageDelete ¶
func (e *EngineSimulator) SPDKBackingImageDelete(name, diskUUID string) error
func (*EngineSimulator) SPDKBackingImageGet ¶
func (e *EngineSimulator) SPDKBackingImageGet(name, diskUUID string) (*imapi.BackingImage, error)
func (*EngineSimulator) SPDKBackingImageList ¶
func (e *EngineSimulator) SPDKBackingImageList() (map[string]longhorn.BackingImageV2CopyInfo, error)
func (*EngineSimulator) SPDKBackingImageWatch ¶
func (e *EngineSimulator) SPDKBackingImageWatch(ctx context.Context) (*imapi.BackingImageStream, error)
func (*EngineSimulator) SimulateStopReplica ¶
func (e *EngineSimulator) SimulateStopReplica(addr string) error
func (*EngineSimulator) SnapshotBackup ¶
func (*EngineSimulator) SnapshotBackupStatus ¶ added in v0.6.0
func (e *EngineSimulator) SnapshotBackupStatus(engine *longhorn.Engine, backupName, replicaAddress, replicaName string) (*longhorn.EngineBackupStatus, error)
func (*EngineSimulator) SnapshotClone ¶ added in v1.2.0
func (*EngineSimulator) SnapshotCloneStatus ¶ added in v1.2.0
func (e *EngineSimulator) SnapshotCloneStatus(*longhorn.Engine) (map[string]*longhorn.SnapshotCloneStatus, error)
func (*EngineSimulator) SnapshotCreate ¶
func (*EngineSimulator) SnapshotDelete ¶
func (e *EngineSimulator) SnapshotDelete(engine *longhorn.Engine, name string) error
func (*EngineSimulator) SnapshotGet ¶
func (e *EngineSimulator) SnapshotGet(engine *longhorn.Engine, name string) (*longhorn.SnapshotInfo, error)
func (*EngineSimulator) SnapshotHash ¶ added in v1.4.0
func (*EngineSimulator) SnapshotHashStatus ¶ added in v1.4.0
func (e *EngineSimulator) SnapshotHashStatus(engine *longhorn.Engine, snapshotName string) (map[string]*longhorn.HashStatus, error)
func (*EngineSimulator) SnapshotList ¶
func (e *EngineSimulator) SnapshotList(engine *longhorn.Engine) (map[string]*longhorn.SnapshotInfo, error)
func (*EngineSimulator) SnapshotPurge ¶
func (e *EngineSimulator) SnapshotPurge(*longhorn.Engine) error
func (*EngineSimulator) SnapshotPurgeStatus ¶ added in v0.6.0
func (e *EngineSimulator) SnapshotPurgeStatus(*longhorn.Engine) (map[string]*longhorn.PurgeStatus, error)
func (*EngineSimulator) SnapshotRevert ¶
func (e *EngineSimulator) SnapshotRevert(engine *longhorn.Engine, name string) error
func (*EngineSimulator) Start ¶ added in v1.3.0
func (e *EngineSimulator) Start(*longhorn.InstanceManager, logrus.FieldLogger, *datastore.DataStore) error
func (*EngineSimulator) Stop ¶ added in v1.3.0
func (e *EngineSimulator) Stop(*longhorn.InstanceManager) error
func (*EngineSimulator) VersionGet ¶ added in v1.3.0
func (e *EngineSimulator) VersionGet(engine *longhorn.Engine, clientOnly bool) (*EngineVersion, error)
func (*EngineSimulator) VolumeExpand ¶ added in v1.3.0
func (e *EngineSimulator) VolumeExpand(*longhorn.Engine) error
func (*EngineSimulator) VolumeFrontendShutdown ¶ added in v1.3.0
func (e *EngineSimulator) VolumeFrontendShutdown(*longhorn.Engine) error
func (*EngineSimulator) VolumeFrontendStart ¶ added in v1.3.0
func (e *EngineSimulator) VolumeFrontendStart(*longhorn.Engine) error
func (*EngineSimulator) VolumeGet ¶ added in v1.3.0
func (e *EngineSimulator) VolumeGet(*longhorn.Engine) (*Volume, error)
func (*EngineSimulator) VolumeSnapshotMaxCountSet ¶ added in v1.6.0
func (e *EngineSimulator) VolumeSnapshotMaxCountSet(*longhorn.Engine) error
func (*EngineSimulator) VolumeSnapshotMaxSizeSet ¶ added in v1.6.0
func (e *EngineSimulator) VolumeSnapshotMaxSizeSet(*longhorn.Engine) error
func (*EngineSimulator) VolumeUnmapMarkSnapChainRemovedSet ¶ added in v1.4.0
func (e *EngineSimulator) VolumeUnmapMarkSnapChainRemovedSet(*longhorn.Engine) error
type EngineSimulatorCollection ¶
type EngineSimulatorCollection struct {
// contains filtered or unexported fields
}
func NewEngineSimulatorCollection ¶
func NewEngineSimulatorCollection() *EngineSimulatorCollection
func (*EngineSimulatorCollection) CreateEngineSimulator ¶
func (c *EngineSimulatorCollection) CreateEngineSimulator(request *EngineSimulatorRequest) error
func (*EngineSimulatorCollection) DeleteEngineSimulator ¶
func (c *EngineSimulatorCollection) DeleteEngineSimulator(volumeName string) error
func (*EngineSimulatorCollection) GetEngineSimulator ¶
func (c *EngineSimulatorCollection) GetEngineSimulator(volumeName string) (*EngineSimulator, error)
func (*EngineSimulatorCollection) NewEngineClient ¶
func (c *EngineSimulatorCollection) NewEngineClient(request *EngineClientRequest) (EngineClient, error)
type EngineSimulatorRequest ¶
type EngineVersion ¶
type EngineVersion struct { ClientVersion *longhorn.EngineVersionDetails `json:"clientVersion"` ServerVersion *longhorn.EngineVersionDetails `json:"serverVersion"` }
type InstanceManagerClient ¶ added in v0.8.0
type InstanceManagerClient struct {
// contains filtered or unexported fields
}
func NewInstanceManagerClient ¶ added in v0.8.0
func NewInstanceManagerClient(im *longhorn.InstanceManager, allowUnknown bool) (*InstanceManagerClient, error)
NewInstanceManagerClient creates a new instance manager client. Usually, we only want to attempt to communicate with an instance manager in state running. However, sometimes it makes sense to make a best effort attempt to communicate with an instance manager in state unknown. It should be safe to do so, since Kubernetes should not reassign the pod's IP address until it is at least terminating, which puts the instance manager in state error. However, there is an increased chance of failure.
func (*InstanceManagerClient) Close ¶ added in v1.3.0
func (c *InstanceManagerClient) Close() error
func (*InstanceManagerClient) EngineInstanceCreate ¶ added in v1.5.0
func (c *InstanceManagerClient) EngineInstanceCreate(req *EngineInstanceCreateRequest) (*longhorn.InstanceProcess, error)
EngineInstanceCreate creates a new engine instance
func (*InstanceManagerClient) EngineInstanceUpgrade ¶ added in v1.5.0
func (c *InstanceManagerClient) EngineInstanceUpgrade(req *EngineInstanceUpgradeRequest) (*longhorn.InstanceProcess, error)
EngineInstanceUpgrade upgrades the engine process
func (*InstanceManagerClient) GetAPIVersion ¶ added in v1.5.0
func (c *InstanceManagerClient) GetAPIVersion() int
func (*InstanceManagerClient) InstanceDelete ¶ added in v1.5.0
func (c *InstanceManagerClient) InstanceDelete(dataEngine longhorn.DataEngineType, name, kind, diskUUID string, cleanupRequired bool) (err error)
InstanceDelete deletes the instance
func (*InstanceManagerClient) InstanceGet ¶ added in v1.5.0
func (c *InstanceManagerClient) InstanceGet(dataEngine longhorn.DataEngineType, name, kind string) (*longhorn.InstanceProcess, error)
InstanceGet returns the instance process
func (*InstanceManagerClient) InstanceGetBinary ¶ added in v1.5.0
func (c *InstanceManagerClient) InstanceGetBinary(dataEngine longhorn.DataEngineType, name, kind, diskUUID string) (string, error)
InstanceGetBinary returns the binary name of the instance
func (*InstanceManagerClient) InstanceList ¶ added in v1.5.0
func (c *InstanceManagerClient) InstanceList() (map[string]longhorn.InstanceProcess, error)
InstanceList returns a map of instance name to instance process
func (*InstanceManagerClient) InstanceLog ¶ added in v1.5.0
func (c *InstanceManagerClient) InstanceLog(ctx context.Context, dataEngine longhorn.DataEngineType, name, kind string) (*imapi.LogStream, error)
InstanceLog returns a grpc stream that will be closed when the passed context is cancelled or the underlying grpc client is closed
func (*InstanceManagerClient) InstanceWatch ¶ added in v1.5.0
func (c *InstanceManagerClient) InstanceWatch(ctx context.Context) (interface{}, error)
InstanceWatch returns a grpc stream that will be closed when the passed context is cancelled or the underlying grpc client is closed
func (*InstanceManagerClient) LogSetFlags ¶ added in v1.7.0
func (c *InstanceManagerClient) LogSetFlags(dataEngine longhorn.DataEngineType, component, flags string) error
func (*InstanceManagerClient) LogSetLevel ¶ added in v1.7.0
func (c *InstanceManagerClient) LogSetLevel(dataEngine longhorn.DataEngineType, component, level string) error
func (*InstanceManagerClient) ReplicaInstanceCreate ¶ added in v1.5.0
func (c *InstanceManagerClient) ReplicaInstanceCreate(req *ReplicaInstanceCreateRequest) (*longhorn.InstanceProcess, error)
ReplicaInstanceCreate creates a new replica instance
func (*InstanceManagerClient) VersionGet ¶ added in v0.8.0
VersionGet returns the version of the instance manager
type LauncherVolumeInfo ¶
type Proxy ¶ added in v1.3.0
type Proxy struct {
// contains filtered or unexported fields
}
func (*Proxy) BackupRestore ¶ added in v1.3.0
func (*Proxy) BackupRestoreStatus ¶ added in v1.3.0
func (*Proxy) CleanupBackupMountPoints ¶ added in v1.5.4
func (*Proxy) MetricsGet ¶ added in v1.4.0
func (*Proxy) RemountReadOnlyVolume ¶ added in v1.5.4
func (*Proxy) ReplicaAdd ¶ added in v1.3.0
func (*Proxy) ReplicaList ¶ added in v1.3.0
func (*Proxy) ReplicaModeUpdate ¶ added in v1.4.0
func (*Proxy) ReplicaRebuildStatus ¶ added in v1.3.0
func (*Proxy) ReplicaRebuildVerify ¶ added in v1.3.0
func (*Proxy) ReplicaRemove ¶ added in v1.3.0
func (*Proxy) SPDKBackingImageCreate ¶
func (*Proxy) SPDKBackingImageDelete ¶
func (*Proxy) SPDKBackingImageGet ¶
func (p *Proxy) SPDKBackingImageGet(name, diskUUID string) (*imapi.BackingImage, error)
func (*Proxy) SPDKBackingImageList ¶
func (p *Proxy) SPDKBackingImageList() (map[string]longhorn.BackingImageV2CopyInfo, error)
func (*Proxy) SPDKBackingImageWatch ¶
func (*Proxy) SnapshotBackup ¶ added in v1.3.0
func (*Proxy) SnapshotBackupStatus ¶ added in v1.3.0
func (*Proxy) SnapshotClone ¶ added in v1.3.0
func (*Proxy) SnapshotCloneStatus ¶ added in v1.3.0
func (*Proxy) SnapshotCreate ¶ added in v1.3.0
func (*Proxy) SnapshotDelete ¶ added in v1.3.0
func (*Proxy) SnapshotGet ¶ added in v1.3.0
func (*Proxy) SnapshotHash ¶ added in v1.4.0
func (*Proxy) SnapshotHashStatus ¶ added in v1.4.0
func (*Proxy) SnapshotList ¶ added in v1.3.0
func (*Proxy) SnapshotPurge ¶ added in v1.3.0
func (*Proxy) SnapshotPurgeStatus ¶ added in v1.3.0
func (*Proxy) SnapshotRevert ¶ added in v1.3.0
func (*Proxy) VersionGet ¶ added in v1.3.0
func (*Proxy) VolumeExpand ¶ added in v1.3.0
func (*Proxy) VolumeFrontendShutdown ¶ added in v1.3.0
func (*Proxy) VolumeFrontendStart ¶ added in v1.3.0
func (*Proxy) VolumeSnapshotMaxCountSet ¶ added in v1.6.0
func (*Proxy) VolumeSnapshotMaxSizeSet ¶ added in v1.6.0
type Replica ¶
type Replica struct { URL string Mode longhorn.ReplicaMode }
type ReplicaError ¶ added in v1.0.1
func (ReplicaError) Error ¶ added in v1.0.1
func (e ReplicaError) Error() string
type ReplicaInstanceCreateRequest ¶ added in v1.5.0
type ShareManagerClient ¶ added in v1.4.4
type ShareManagerClient struct {
// contains filtered or unexported fields
}
func NewShareManagerClient ¶ added in v1.4.4
func NewShareManagerClient(sm *longhorn.ShareManager, pod *corev1.Pod) (*ShareManagerClient, error)
func (*ShareManagerClient) Close ¶ added in v1.4.4
func (c *ShareManagerClient) Close() error
func (*ShareManagerClient) FilesystemResize ¶
func (c *ShareManagerClient) FilesystemResize() error
func (*ShareManagerClient) FilesystemTrim ¶ added in v1.4.4
func (c *ShareManagerClient) FilesystemTrim(encryptedDevice bool) error
func (*ShareManagerClient) Mount ¶ added in v1.5.3
func (c *ShareManagerClient) Mount() error
func (*ShareManagerClient) Unmount ¶ added in v1.4.4
func (c *ShareManagerClient) Unmount() error
type SystemBackupOperationInterface ¶ added in v1.4.0
type SystemBackupOperationInterface interface { DeleteSystemBackup(systemBackup *longhorn.SystemBackup) (string, error) DownloadSystemBackup(name, version, downloadPath string) error GetSystemBackupConfig(name, version string) (*systembackupstore.Config, error) ListSystemBackup() (systembackupstore.SystemBackups, error) UploadSystemBackup(name, localFile, longhornVersion, longhornGitCommit, managerImage, engineImage string) (string, error) }
type TaskError ¶ added in v1.0.1
type TaskError struct {
ReplicaErrors []ReplicaError
}
type Volume ¶
type Volume struct { Name string `json:"name"` Size int64 `json:"size"` ReplicaCount int `json:"replicaCount"` Endpoint string `json:"endpoint"` Frontend string `json:"frontend"` FrontendState string `json:"frontendState"` IsExpanding bool `json:"isExpanding"` LastExpansionError string `json:"lastExpansionError"` LastExpansionFailedAt string `json:"lastExpansionFailedAt"` UnmapMarkSnapChainRemoved bool `json:"unmapMarkSnapChainRemoved"` SnapshotMaxCount int `json:"snapshotMaxCount"` SnapshotMaxSize int64 `json:"SnapshotMaxSize"` }
Source Files ¶
- backing_image_data_source.go
- backing_image_manager.go
- backup_backing_image.go
- backup_monitor.go
- backups.go
- disk_service.go
- engine.go
- engine_binary.go
- enginesim.go
- instance_manager.go
- proxy.go
- proxy_backing_image.go
- proxy_backup.go
- proxy_metrics.go
- proxy_replica.go
- proxy_snapshot.go
- proxy_volume.go
- share_manager.go
- snapshot.go
- system_backup.go
- types.go