mon

package
v0.0.0-...-1ea1cc7 Latest Latest
Warning

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

Go to latest
Published: May 15, 2019 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Overview

Package mon provides methods for setting up Ceph configuration for mons daemons.

Index

Constants

View Source
const (
	// InitCommand is the `rook ceph` subcommand which will perform mon initialization
	InitCommand = "mon-init"

	// DefaultPort is the default port Ceph mons use to communicate amongst themselves.
	DefaultPort = 6790
)

Variables

This section is empty.

Functions

func FlattenMonEndpoints

func FlattenMonEndpoints(mons map[string]*cephconfig.MonInfo) string

FlattenMonEndpoints returns a comma-delimited string of all mons and endpoints in the form <mon-name>=<mon-endpoint>

func GetMonDataDirPath

func GetMonDataDirPath(configDir, monName string) string

GetMonDataDirPath returns the path of a given monitor's data dir. The data dir is where a mon's '--mon-data' flag should be configured.

func GetMonRunDirPath

func GetMonRunDirPath(configDir, monName string) string

GetMonRunDirPath returns the path of a given monitor's run dir. The run dir is where a mon's monmap file should be stored.

func Initialize

func Initialize(context *clusterd.Context, config *Config) error

Initialize generates configuration files for a Ceph mon

func ParseMonEndpoints

func ParseMonEndpoints(input string) map[string]*cephconfig.MonInfo

ParseMonEndpoints parses a flattened representation of mons and endpoints in the form <mon-name>=<mon-endpoint> and returns a list of Ceph mon configs.

Types

type Config

type Config struct {
	Name    string
	Cluster *cephconfig.ClusterInfo
	Port    int32
}

Config contains the necessary parameters Rook needs to know to set up a mon for a Ceph cluster.

Jump to

Keyboard shortcuts

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