Documentation ¶
Index ¶
- func CloseEncryptedDevice(context *clusterd.Context, dmName string) error
- func DestroyOSD(context *clusterd.Context, clusterInfo *client.ClusterInfo, id int, ...) (*oposd.OSDReplaceInfo, error)
- func GetCephVolumeLVMOSDs(context *clusterd.Context, clusterInfo *client.ClusterInfo, ...) ([]oposd.OSDInfo, error)
- func GetCephVolumeRawOSDs(context *clusterd.Context, clusterInfo *client.ClusterInfo, ...) ([]oposd.OSDInfo, error)
- func GetOSDInfoById(context *clusterd.Context, clusterInfo *client.ClusterInfo, osdID int) (*oposd.OSDInfo, error)
- func Provision(context *clusterd.Context, agent *OsdAgent, ...) error
- func RemoveOSDs(context *clusterd.Context, clusterInfo *client.ClusterInfo, ...) error
- func RotateKeyEncryptionKey(context *clusterd.Context, kms *kms.Config, secretName string, ...) error
- func StartOSD(context *clusterd.Context, osdType, osdID, osdUUID, lvPath string, ...) error
- func UpdateLVMConfig(context *clusterd.Context, onPVC, lvBackedPV bool) error
- type DesiredDevice
- type Device
- type DeviceOsdIDEntry
- type DeviceOsdMapping
- type NSEnter
- type OsdAgent
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CloseEncryptedDevice ¶ added in v1.9.3
func DestroyOSD ¶ added in v1.12.4
func DestroyOSD(context *clusterd.Context, clusterInfo *client.ClusterInfo, id int, isPVC, isEncrypted bool) (*oposd.OSDReplaceInfo, error)
DestroyOSD fetches the OSD to be replaced based on the ID and then destroys that OSD and zaps the backing device
func GetCephVolumeLVMOSDs ¶ added in v1.3.5
func GetCephVolumeLVMOSDs(context *clusterd.Context, clusterInfo *client.ClusterInfo, cephfsid, lv string, skipLVRelease, lvBackedPV bool) ([]oposd.OSDInfo, error)
GetCephVolumeLVMOSDs list OSD prepared with lvm mode
func GetCephVolumeRawOSDs ¶ added in v1.3.5
func GetCephVolumeRawOSDs(context *clusterd.Context, clusterInfo *client.ClusterInfo, cephfsid, block, metadataBlock, walBlock string, lvBackedPV, skipDeviceClass bool) ([]oposd.OSDInfo, error)
GetCephVolumeRawOSDs list OSD prepared with raw mode. Sometimes this function called against a device, sometimes it's not. For instance, in the cleanup scenario, we don't pass any block because we are looking for all the OSDs present on the machine. On the other hand, the PVC scenario always uses the PVC block as a block to check whether the disk is an OSD or not. The same goes for "metadataBlock" and "walBlock" they are only used in the prepare job.
func GetOSDInfoById ¶ added in v1.12.3
func GetOSDInfoById(context *clusterd.Context, clusterInfo *client.ClusterInfo, osdID int) (*oposd.OSDInfo, error)
GetOSDInfoById returns the osdInfo using the ceph volume list
func Provision ¶ added in v0.8.0
func Provision(context *clusterd.Context, agent *OsdAgent, crushLocation, topologyAffinity, deviceFilter, metaDevice string) error
Provision provisions an OSD
func RemoveOSDs ¶ added in v1.4.3
func RemoveOSDs(context *clusterd.Context, clusterInfo *client.ClusterInfo, osdsToRemove []string, preservePVC, forceOSDRemoval bool) error
RemoveOSDs purges a list of OSDs from the cluster
func RotateKeyEncryptionKey ¶ added in v1.11.2
Types ¶
type DesiredDevice ¶ added in v0.9.0
type DesiredDevice struct { Name string OSDsPerDevice int MetadataDevice string DatabaseSizeMB int DeviceClass string InitialWeight string IsFilter bool IsDevicePathFilter bool }
DesiredDevice keeps track of the desired settings for a device
func (*DesiredDevice) UpdateDeviceClass ¶ added in v1.10.13
func (d *DesiredDevice) UpdateDeviceClass(agent *OsdAgent, device *sys.LocalDisk)
type Device ¶
type Device struct { Name string `json:"name"` NodeID string `json:"nodeId"` Dir bool `json:"bool"` }
Device is a device
type DeviceOsdIDEntry ¶
type DeviceOsdIDEntry struct { Data int // OSD ID that has data stored here Metadata []int // OSD IDs (multiple) that have metadata stored here Config DesiredDevice // Device specific config options PersistentDevicePaths []string DeviceInfo *sys.LocalDisk // low-level info about the device RestoreOSD bool // Restore OSD by reparing it with with OSD ID }
DeviceOsdIDEntry represents the details of an OSD
type DeviceOsdMapping ¶
type DeviceOsdMapping struct {
Entries map[string]*DeviceOsdIDEntry // device name to OSD ID mapping entry
}
DeviceOsdMapping represents the mapping of an OSD on disk
func (*DeviceOsdMapping) String ¶
func (m *DeviceOsdMapping) String() string
type NSEnter ¶ added in v1.4.0
type NSEnter struct {
// contains filtered or unexported fields
}
NSEnter is an nsenter object
type OsdAgent ¶
type OsdAgent struct {
// contains filtered or unexported fields
}
OsdAgent represents the OSD struct of an agent
func NewAgent ¶
func NewAgent(context *clusterd.Context, devices []DesiredDevice, metadataDevice string, forceFormat bool, storeConfig config.StoreConfig, clusterInfo *cephclient.ClusterInfo, nodeName string, kv *k8sutil.ConfigMapKVStore, replaceOSD *oposd.OSDReplaceInfo, pvcBacked bool) *OsdAgent
NewAgent is the instantiation of the OSD agent
func (*OsdAgent) GetReplaceOSDId ¶ added in v1.12.3
GetReplaceOSDId returns the OSD ID based on the device name