2015-08-14 18:18:14 +05:30
|
|
|
package errors
|
|
|
|
|
|
|
|
|
|
import (
|
|
|
|
|
"errors"
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
// Different error macros
|
|
|
|
|
var (
|
2018-08-06 13:04:30 +05:30
|
|
|
ErrVolCreateFail = errors.New("unable to create volume")
|
|
|
|
|
ErrVolNotFound = errors.New("volume not found")
|
|
|
|
|
ErrVolNotStarted = errors.New("volume not started")
|
|
|
|
|
ErrPeerNotFound = errors.New("peer not found")
|
|
|
|
|
ErrJSONParsingFailed = errors.New("unable to parse the request")
|
|
|
|
|
ErrEmptyVolName = errors.New("volume name is empty")
|
|
|
|
|
ErrInvalidVolName = errors.New("invalid volume name")
|
|
|
|
|
ErrEmptyBrickList = errors.New("brick list is empty")
|
|
|
|
|
ErrInvalidBrickPath = errors.New("invalid brick path, brick path should be in host:<brick> format")
|
|
|
|
|
ErrVolExists = errors.New("volume already exists")
|
|
|
|
|
ErrVolAlreadyStarted = errors.New("volume already started")
|
|
|
|
|
ErrVolAlreadyStopped = errors.New("volume already stopped")
|
|
|
|
|
ErrWrongGraphType = errors.New("graph: incorrect graph type")
|
|
|
|
|
ErrDeviceIDNotFound = errors.New("failed to get device id")
|
|
|
|
|
ErrBrickIsMountPoint = errors.New("brick path is already a mount point")
|
|
|
|
|
ErrBrickUnderRootPartition = errors.New("brick path is under root partition")
|
|
|
|
|
ErrBrickNotDirectory = errors.New("brick path is not a directory")
|
|
|
|
|
ErrBrickPathAlreadyInUse = errors.New("brick path is already in use by other gluster volume")
|
|
|
|
|
ErrNoHostnamesPresent = errors.New("no hostnames present")
|
|
|
|
|
ErrBrickPathConvertFail = errors.New("failed to convert the brickpath to absolute path")
|
|
|
|
|
ErrBrickNotLocal = errors.New("brickpath doesn't belong to localhost")
|
|
|
|
|
ErrBrickPathTooLong = errors.New("brickpath too long")
|
|
|
|
|
ErrSubDirPathTooLong = errors.New("sub directory path is too long")
|
|
|
|
|
ErrIPAddressNotFound = errors.New("failed to find IP address")
|
|
|
|
|
ErrPeerLocalNode = errors.New("peer being added is the local node")
|
|
|
|
|
ErrProcessNotFound = errors.New("process is not running or is inaccessible")
|
|
|
|
|
ErrProcessAlreadyRunning = errors.New("process is already running")
|
|
|
|
|
ErrBitrotAlreadyEnabled = errors.New("bitrot is already enabled")
|
|
|
|
|
ErrBitrotAlreadyDisabled = errors.New("bitrot is already disabled")
|
|
|
|
|
ErrBitrotNotEnabled = errors.New("bitrot is not enabled")
|
|
|
|
|
ErrQuotadNotRunning = errors.New("quotad is not running")
|
|
|
|
|
ErrQuotadNotEnabled = errors.New("quotad is not enabled")
|
|
|
|
|
ErrUnknownValue = errors.New("unknown value specified")
|
|
|
|
|
ErrGetFailed = errors.New("failed to get value from the store")
|
|
|
|
|
ErrUnmarshallFailed = errors.New("failed to unmarshall from json")
|
|
|
|
|
ErrClusterOptionsNotFound = errors.New("cluster options not found in store")
|
|
|
|
|
ErrDuplicateBrickPath = errors.New("duplicate brick entry")
|
|
|
|
|
ErrRestrictedKeyFound = errors.New("key names starting with '_' are restricted in metadata field")
|
|
|
|
|
ErrVolFileNotFound = errors.New("volume file not found")
|
|
|
|
|
ErrEmptySnapName = errors.New("snapshot name is empty")
|
|
|
|
|
ErrSnapExists = errors.New("snapshot already exists")
|
|
|
|
|
ErrSnapNotFound = errors.New("snapshot not found")
|
|
|
|
|
ErrSnapNotActivated = errors.New("snapshot not activated")
|
|
|
|
|
ErrSnapDeactivated = errors.New("snapshot is already deactivated")
|
|
|
|
|
ErrInvalidVolFlags = errors.New("invalid volume flags")
|
|
|
|
|
ErrMetadataSizeOutOfBounds = errors.New("metadata size exceeds max allowed size of 4KB")
|
|
|
|
|
ErrFetchingVolfileContent = errors.New("unable to fetch volfile content")
|
|
|
|
|
ErrPidFileNotFound = errors.New("pid file not found")
|
|
|
|
|
ErrInvalidSnapName = errors.New("invalid snapshot name")
|
2018-12-13 11:27:24 +05:30
|
|
|
ErrInvalidClusterOption = errors.New("invalid cluster option key")
|
2018-08-06 13:04:30 +05:30
|
|
|
ErrInvalidVolFileTmplNamespace = errors.New("invalid template namespace")
|
|
|
|
|
ErrInvalidVolFileTmplName = errors.New("invalid template name")
|
|
|
|
|
ErrDeviceNameNotFound = errors.New("device name not found")
|
|
|
|
|
ErrInvalidSplitBrainOp = errors.New("invalid split-brain operation specified")
|
|
|
|
|
ErrInvalidHostName = errors.New("hostname doesn't exist")
|
|
|
|
|
ErrInvalidBrickName = errors.New("brick doesn't exist on this host")
|
|
|
|
|
ErrFilenameNotFound = errors.New("please specify filename for split-brain operation")
|
|
|
|
|
ErrInvalidFilenameFormat = errors.New("filename should be an absolute path in volume, should start with / notation")
|
|
|
|
|
ErrHostOrBrickNotFound = errors.New("please specify hostname and brick path to resolve split-brain")
|
|
|
|
|
ErrVolTypeNotInReplicateOrDisperse = errors.New("invalid operation: the volume is not a replicate or disperse volume")
|
2018-11-29 15:52:16 +05:30
|
|
|
ErrDeviceNotFound = errors.New("device does not exist in the given peer")
|
2018-11-23 16:00:39 +05:30
|
|
|
ErrVolumeBricksMountFailed = errors.New("failed to get mount point entries for the volume bricks")
|
|
|
|
|
ErrBrickMountFailed = errors.New("failed to mount brick")
|
2018-12-07 16:22:35 +05:30
|
|
|
ErrReservedGroupProfile = errors.New("reserved group profile")
|
2018-12-06 23:55:51 +05:30
|
|
|
ErrInvalidIntValue = errors.New("error parsing the value. Make sure the value is a valid integer")
|
2018-12-26 20:56:08 +05:30
|
|
|
ErrConnectingHost = errors.New("could not connect to host. Make sure host address is valid, network connection is active and gd2 is up and running")
|
2019-01-23 12:12:27 +05:30
|
|
|
ErrBlockVolNotFound = errors.New("block volume not found")
|
|
|
|
|
ErrBlockHostVolNotFound = errors.New("block hosting volume not found")
|
2019-01-10 09:22:45 +05:30
|
|
|
ErrSnapNotSupported = errors.New("snapshot not supported")
|
2015-08-14 18:18:14 +05:30
|
|
|
)
|