1
0
mirror of https://github.com/gluster/glusterd2.git synced 2026-02-05 12:45:38 +01:00
Files
glusterd2/pkg/errors/error.go
Aravinda VK bebbc65052 Support for loopback bricks
Register the Bricks hosting directory using,

```
glustercli device add <peerid> <path> --provisioner loop
```

Example:

```
glustercli device add 70d79c3f-e7af-43f6-8b65-05dff2423da1 \
	   /exports --provisioner loop
```

Now create the volume using,

```
glustercli volume create gv1 --size 1G \
	   --provisioner loop \
	   --replica 3
```

Fixes: #1418
Signed-off-by: Aravinda VK <avishwan@redhat.com>
2019-02-14 10:49:17 +05:30

79 lines
5.8 KiB
Go

package errors
import (
"errors"
)
// Different error macros
var (
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")
ErrInvalidClusterOption = errors.New("invalid cluster option key")
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")
ErrDeviceNotFound = errors.New("device does not exist in the given peer")
ErrVolumeBricksMountFailed = errors.New("failed to get mount point entries for the volume bricks")
ErrBrickMountFailed = errors.New("failed to mount brick")
ErrReservedGroupProfile = errors.New("reserved group profile")
ErrInvalidIntValue = errors.New("error parsing the value. Make sure the value is a valid integer")
ErrConnectingHost = errors.New("could not connect to host. Make sure host address is valid, network connection is active and gd2 is up and running")
ErrBlockVolNotFound = errors.New("block volume not found")
ErrBlockHostVolNotFound = errors.New("block hosting volume not found")
ErrSnapNotSupported = errors.New("snapshot not supported")
)