ceph

package
v0.0.0-...-e995b2c Latest Latest
Warning

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

Go to latest
Published: Dec 1, 2017 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// HealthOK denotes the status of ceph cluster when healthy.
	HealthOK = "HEALTH_OK"

	// HealthWarn denotes the status of ceph cluster when unhealthy but recovering.
	HealthWarn = "HEALTH_WARN"

	// HealthErr denotes the status of ceph cluster when unhealthy but usually needs
	// manual intervention.
	HealthErr = "HEALTH_ERR"
)

Variables

View Source
var (
	// QuorumCommand represents ceph quorum_status command.
	QuorumCommand = []string{"quorum_status", "-f", "json"}

	// CephUsageCommand represents ceph df command.
	CephUsageCommand = []string{"df", "detail", "-f", "json"}

	// CephStatusCommand represents ceph status command.
	CephStatusCommand = []string{"status", "-f", "json"}

	// OsdDFCommand represents ceph osd df command.
	OsdDFCommand = []string{"osd", "df", "-f", "json"}

	// OsdPerfCommand represents ceph osd perf command.
	OsdPerfCommand = []string{"osd", "perf", "-f", "json"}

	// OsdDumpCommand represents ceph osd dump command.
	OsdDumpCommand = []string{"osd", "dump", "-f", "json"}
)

Functions

This section is empty.

Types

type Ceph

type Ceph struct{}

Ceph represents ceph volume driver struct.

func (*Ceph) Attach

func (c *Ceph) Attach(ctx driver.Context, v *types.Volume, s *types.Storage) error

Attach is used to attach ceph volume.

func (*Ceph) Create

func (c *Ceph) Create(ctx driver.Context, v *types.Volume, s *types.Storage) error

Create a ceph volume.

func (*Ceph) Detach

func (c *Ceph) Detach(ctx driver.Context, v *types.Volume, s *types.Storage) error

Detach is used to detach ceph volume.

func (*Ceph) Format

func (c *Ceph) Format(ctx driver.Context, v *types.Volume, s *types.Storage) error

Format is used to format ceph volume.

func (*Ceph) Name

func (c *Ceph) Name(ctx driver.Context) string

Name returns volume driver's name.

func (*Ceph) Options

func (c *Ceph) Options() map[string]types.Option

Options returns ceph volume options.

func (*Ceph) Path

func (c *Ceph) Path(ctx driver.Context, v *types.Volume) (string, error)

Path returns ceph volume mount path.

func (*Ceph) Remove

func (c *Ceph) Remove(ctx driver.Context, v *types.Volume, s *types.Storage) error

Remove a ceph volume.

func (*Ceph) Report

func (c *Ceph) Report(ctx driver.Context) ([]*types.Storage, error)

Report is used to collect ceph storage information and report to control server.

func (*Ceph) StoreMode

func (c *Ceph) StoreMode(ctx driver.Context) driver.VolumeStoreMode

StoreMode returns volume driver's store mode.

type Command

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

Command represents ceph command.

func NewCephCommand

func NewCephCommand(bin, conf string) *Command

NewCephCommand returns ceph command instance.

func (*Command) RunCommand

func (cc *Command) RunCommand(obj interface{}, args ...string) error

RunCommand is used to execute ceph command.

type PoolStats

type PoolStats struct {
	Pools []struct {
		Name  string `json:"name"`
		Stats struct {
			BytesUsed int64 `json:"bytes_used"`
			MaxAvail  int64 `json:"max_avail"`
		} `json:"stats"`
	} `json:"pools"`
}

PoolStats represents ceph pool status struct.

type QuorumStatus

type QuorumStatus struct {
	MonMap           monMap `json:"monmap"`
	QuorumLeaderName string `json:"quorum_leader_name"`
}

QuorumStatus represents ceph quorum_status result struct.

type RBDMap

type RBDMap struct {
	MapDevice []struct {
		ID     int    `json:"id"`
		Device string `json:"name"`
		Image  string `json:"image"`
		Pool   string `json:"pool"`
	} `json:"Devices"`
}

RBDMap represents "rbd listmapped" command result struct.

type Stats

type Stats struct {
	ID     string `json:"fsid"`
	Health struct {
		OverallStatus string `json:"overall_status"`
	} `json:"health"`
}

Stats represents ceph status result struct.

Jump to

Keyboard shortcuts

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