rbd

package
v1.2.1 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (

	// CSIInstanceID is the instance ID that is unique to an instance of CSI, used when sharing
	// ceph clusters across CSI instances, to differentiate omap names per CSI instance
	CSIInstanceID = "default"
)

Functions

This section is empty.

Types

type ControllerServer

type ControllerServer struct {
	*csicommon.DefaultControllerServer
	MetadataStore util.CachePersister
	// A map storing all volumes with ongoing operations so that additional operations
	// for that same volume (as defined by VolumeID/volume name) return an Aborted error
	VolumeLocks *util.VolumeLocks

	// A map storing all volumes with ongoing operations so that additional operations
	// for that same snapshot (as defined by SnapshotID/snapshot name) return an Aborted error
	SnapshotLocks *util.VolumeLocks
}

ControllerServer struct of rbd CSI driver with supported methods of CSI controller server spec.

func NewControllerServer

func NewControllerServer(d *csicommon.CSIDriver, cachePersister util.CachePersister) *ControllerServer

NewControllerServer initialize a controller server for rbd CSI driver

func (*ControllerServer) CreateSnapshot

CreateSnapshot creates the snapshot in backend and stores metadata in store nolint: gocyclo

func (*ControllerServer) CreateVolume

CreateVolume creates the volume in backend

func (*ControllerServer) DeleteLegacyVolume

DeleteLegacyVolume deletes a volume provisioned using version 1.0.0 of the plugin

func (*ControllerServer) DeleteSnapshot

DeleteSnapshot deletes the snapshot in backend and removes the snapshot metadata from store

func (*ControllerServer) DeleteVolume

DeleteVolume deletes the volume in backend and removes the volume metadata from store

func (*ControllerServer) ValidateVolumeCapabilities

ValidateVolumeCapabilities checks whether the volume capabilities requested are supported.

type Driver

type Driver struct {
	// contains filtered or unexported fields
}

Driver contains the default identity,node and controller struct

func NewDriver

func NewDriver() *Driver

NewDriver returns new rbd driver

func (*Driver) Run

func (r *Driver) Run(conf *util.Config, cachePersister util.CachePersister)

Run start a non-blocking grpc controller,node and identityserver for rbd CSI driver which can serve multiple parallel requests

type ErrImageNotFound

type ErrImageNotFound struct {
	// contains filtered or unexported fields
}

ErrImageNotFound is returned when image name is not found in the cluster on the given pool

func (ErrImageNotFound) Error

func (e ErrImageNotFound) Error() string

type ErrInvalidVolID

type ErrInvalidVolID struct {
	// contains filtered or unexported fields
}

ErrInvalidVolID is returned when a CSI passed VolumeID does not conform to any known volume ID formats

func (ErrInvalidVolID) Error

func (e ErrInvalidVolID) Error() string

type ErrMissingStash added in v1.2.0

type ErrMissingStash struct {
	// contains filtered or unexported fields
}

ErrMissingStash is returned when the image metadata stash file is not found

func (ErrMissingStash) Error added in v1.2.0

func (e ErrMissingStash) Error() string

type ErrSnapNotFound

type ErrSnapNotFound struct {
	// contains filtered or unexported fields
}

ErrSnapNotFound is returned when snap name passed is not found in the list of snapshots for the given image

func (ErrSnapNotFound) Error

func (e ErrSnapNotFound) Error() string

type ErrVolNameConflict

type ErrVolNameConflict struct {
	// contains filtered or unexported fields
}

ErrVolNameConflict is generated when a requested CSI volume name already exists on RBD but with different properties, and hence is in conflict with the passed in CSI volume name

func (ErrVolNameConflict) Error

func (e ErrVolNameConflict) Error() string

type IdentityServer

type IdentityServer struct {
	*csicommon.DefaultIdentityServer
}

IdentityServer struct of rbd CSI driver with supported methods of CSI identity server spec.

func NewIdentityServer

func NewIdentityServer(d *csicommon.CSIDriver) *IdentityServer

NewIdentityServer initialize a identity server for rbd CSI driver

func (*IdentityServer) GetPluginCapabilities

GetPluginCapabilities returns available capabilities of the rbd driver

type NodeServer

type NodeServer struct {
	*csicommon.DefaultNodeServer

	// A map storing all volumes with ongoing operations so that additional operations
	// for that same volume (as defined by VolumeID) return an Aborted error
	VolumeLocks *util.VolumeLocks
	// contains filtered or unexported fields
}

NodeServer struct of ceph rbd driver with supported methods of CSI node server spec

func NewNodeServer

func NewNodeServer(d *csicommon.CSIDriver, t string) (*NodeServer, error)

NewNodeServer initialize a node server for rbd CSI driver.

func (*NodeServer) NodeGetCapabilities added in v1.2.0

NodeGetCapabilities returns the supported capabilities of the node server

func (*NodeServer) NodePublishVolume

NodePublishVolume mounts the volume mounted to the device path to the target path

func (*NodeServer) NodeStageVolume added in v1.2.0

NodeStageVolume mounts the volume to a staging path on the node. Implementation notes: - stagingTargetPath is the directory passed in the request where the volume needs to be staged

  • We stage the volume into a directory, named after the VolumeID inside stagingTargetPath if it is a file system
  • We stage the volume into a file, named after the VolumeID inside stagingTargetPath if it is a block volume
  • Order of operation execution: (useful for defer stacking and when Unstaging to ensure steps are done in reverse, this is done in undoStagingTransaction)
  • Stash image metadata under staging path
  • Map the image (creates a device)
  • Create the staging file/directory under staging path
  • Stage the device (mount the device mapped for image)

func (*NodeServer) NodeUnpublishVolume

NodeUnpublishVolume unmounts the volume from the target path

func (*NodeServer) NodeUnstageVolume added in v1.2.0

NodeUnstageVolume unstages the volume from the staging path

Jump to

Keyboard shortcuts

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