Version: v1.7.1 Latest Latest

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

Go to latest
Published: Sep 24, 2021 License: Apache-2.0 Imports: 18 Imported by: 0




View Source
const ConfigFilePath = "/host/node-disk-manager.config"

ConfigFilePath refers to the config file for ndm


This section is empty.


func FilterPartitions

func FilterPartitions(name string, pns []string) []string

FilterPartitions gets the name of the partitions given a block device. Given a disk name /dev/sdb and slice of partition names : ["/dev/sdb1", "/dev/sdb2", "/dev/sdc1"], it should return ["/dev/sdb1", "/dev/sdb2"]

func GetAllTypes

func GetAllTypes(BL *v1alpha1.BlockDeviceList) error

GetAllTypes updates the list of all block devices found on nodes and their relationships


type AllBlockDevices

type AllBlockDevices struct {
	Parents    []string
	Partitions []string
	LVMs       []string
	RAIDs      []string
	Holders    []string
	Slaves     []string
	Loops      []string
	Sparse     []string

AllBlockDevices contains all the relationships and device types

type Info

type Info struct {

Info helps in using types defined in package Node

func NewInfo

func NewInfo() *Info

NewInfo returns an instance of type Node

func (*Info) FindVersion

func (i *Info) FindVersion(ctx context.Context, null *protos.Null) (*protos.VersionInfo, error)

FindVersion detects the version and gitCommit of NDM

type Node

type Node struct {

Node helps in using types defined in package Node

func NewNode

func NewNode() *Node

NewNode returns an instance of type Node

func (*Node) GetHugepages

func (n *Node) GetHugepages(ctx context.Context, null *protos.Null) (*protos.Hugepages, error)

GetHugepages services gets the number of hugepages on a node

func (*Node) ISCSIStatus

func (n *Node) ISCSIStatus(ctx context.Context, null *protos.Null) (*protos.Status, error)

ISCSIStatus gives the status of iSCSI service

func (*Node) ListBlockDeviceDetails

func (n *Node) ListBlockDeviceDetails(ctx context.Context, bd *protos.BlockDevice) (*protos.BlockDeviceDetails, error)

ListBlockDeviceDetails gives the details about the disk from SMART

func (*Node) ListBlockDevices

func (n *Node) ListBlockDevices(ctx context.Context, null *protos.Null) (*protos.BlockDevices, error)

ListBlockDevices returns the block devices and their relationships

func (*Node) Name

func (n *Node) Name(ctx context.Context, null *protos.Null) (*protos.NodeName, error)

Name is used to find the name of the worker node NDM is deployed on

func (*Node) Rescan

func (n *Node) Rescan(ctx context.Context, null *protos.Null) (*protos.Message, error)

Rescan syncs etcd with ndm

func (*Node) SetHugepages

func (n *Node) SetHugepages(ctx context.Context, h *protos.Hugepages) (*protos.HugepagesResult, error)

SetHugepages service can set 2MB hugepages on a node

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL