1
0
mirror of https://github.com/gluster/glusterd2.git synced 2026-02-05 12:45:38 +01:00

27 Commits

Author SHA1 Message Date
Poornima G
2869f88344 BlockVolume: Input block host volume properties in block create request
Signed-off-by: Poornima G <pgurusid@redhat.com>
2019-02-21 09:49:55 +05:30
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
Madhu Rajanna
140393c6fa Add logging if there is an error in CLI
add logging if there is an error in CLI,
with the help of -v flag user should
be able to check the failure logs.

Fixes #1414

Signed-off-by: Madhu Rajanna <mrajanna@redhat.com>
2018-12-18 10:08:39 +05:30
Aravinda VK
56dc388f64 Auto distribute count based on Max brick size
While creating auto provisioned volume, support added to automatically
calculate the distribute count based on max brick size specified in
the request.

For example, below command creates 2x3(Distributed replicate) volume

```
glustercli volume create gv1 --replica 3 --size 1G \
        --max-brick-size 512M
```

Fixes: #999
Signed-off-by: Aravinda VK <avishwan@redhat.com>
2018-12-13 20:15:36 +05:30
rishubhjain
643fb9dd1b Using bytes instead of KB for volume creation 2018-11-19 15:16:41 +05:30
Hari Gowtham
b5e55a7427 Arbiter brick size calculation for smart volume creation.
This patch creates the arbiter brick for the smart volume as per the
calculation:

brick size = 4 KB * ( size in KB of largest data brick in volume or
replica set / average file size in KB)

Signed-off-by: Hari Gowtham <hgowtham@redhat.com>
2018-11-12 09:58:13 +05:30
imjoey
72ccf646db Fix capitalized error message format. 2018-10-26 09:31:33 +05:30
Prashanth Pai
4ecc175f1a Refactor flags/filters applied to set volume options
'--advanced' in the CLI and REST API during volume create doesn't intuitively
and clearly indicate that it's for the volume options. A new user may read this
as creation of an "advanced volume" which isn't true.

The flags have now been prepended with 'allow' in the fields of request structs.
The API has been renamed as 'allow-<type>-options'.

Also, created 'VolOptionFlags' struct for flags of options and embeded it in
all request structs.

Signed-off-by: Prashanth Pai <ppai@redhat.com>
2018-10-04 20:38:24 +05:30
Aravinda VK
8e1cfe4e6d Make Volume name mandatory in Volume create request
- CSI driver also passes Volume name to Volume create API
- Mandatory Volume name also helps to ignore
  duplicate(accidental/network failure) Volume create
  API requests(Discussed here
  https://github.com/gluster/glusterd2/issues/919#issuecomment-401022413)
- Applications can generate name and can pass to API, not much benefit
  of auto generating name from glusterd2
- Supporting both the syntax in CLI adds confusion

Signed-off-by: Aravinda VK <avishwan@redhat.com>
2018-09-18 19:23:30 +05:30
Madhu Rajanna
c5ba295533 Start/Stop daemons during volume start and stop
add Xlator action function to start
daemons if volume starts

add Xlator action function to stop
daemons if volume stops and if daemon
is not managing any other volumes.

update volinfo in ETCD and notify
all nodes about newly generated volfiles

Signed-off-by: Madhu Rajanna <mrajanna@redhat.com>
2018-08-21 13:37:22 +05:30
Madhu Rajanna
3c9ca8411b log errors with log.WithError()
during error logging we should log
with WithError()

Signed-off-by: Madhu Rajanna <mrajanna@redhat.com>
2018-08-09 14:29:28 +05:30
Oshank Kumar
02e35a95e0 cli: Refactor some of glustercli code
Signed-off-by: Oshank Kumar <okumar@redhat.com>
2018-08-08 12:38:17 +05:30
Prashanth Pai
ae4b61202a arbiter: Support replica 2 arbiter 1 usage
Signed-off-by: Prashanth Pai <ppai@redhat.com>
2018-07-23 15:53:15 +05:30
Aravinda VK
5bf8c09ffd Merge Smartvol API into regular Volume Create
Example:

    curl -XPOST http://localhost:24007/v1/volumes \
        -d '{"name": "gv1", "size": 1000, "replica": 3}'

Where size is in Mb.

CLI usage is unchanged

    glustercli volume create --name gv1 --size 1G --replica 3

Signed-off-by: Aravinda VK <avishwan@redhat.com>
2018-07-18 10:21:56 +05:30
Prashanth Pai
d872f193de cli: Add support for backward compatible volume create command
The following backward-compatible command is (again) supported:

    $ glustercli volume create <volname> <bricks...>

This is a minimal change to restore old behaviour and does not revert
the commit 31f829. The use of new command is what that should be
encouraged and documented.

   $ glustercli volume create --name <volname> <bricks...>

Signed-off-by: Prashanth Pai <ppai@redhat.com>
2018-07-03 10:57:10 +05:30
Aravinda VK
31f8290f7b Auto generate Volume Name if not specified in Request
Updates: #851
Signed-off-by: Aravinda VK <avishwan@redhat.com>
2018-06-25 16:25:25 +05:30
Aravinda VK
45d8d420b4 Intelligent Volume Provisioning
Updates: #466
Signed-off-by: Aravinda VK <avishwan@redhat.com>
2018-05-31 19:42:40 +05:30
Madhu Rajanna
6bc5318b4b added missed experimental and deprecated flags
Signed-off-by: Madhu Rajanna <mrajanna@redhat.com>
2018-05-29 16:08:07 +05:30
Madhu Rajanna
f76d86cc2b add volume create to glustercli
Signed-off-by: Madhu Rajanna <mrajanna@redhat.com>
2018-05-29 12:09:01 +05:30
Madhu Rajanna
203f5ea5e9 added functionality to expose flags in
volume create and volume expand

added additional flag to create brick dir if its not exists

exposed flags for volume create and expand
in glustercli

added e2e test cases for flags in
volume create and volume expand

Signed-off-by: Madhu Rajanna <mrajanna@redhat.com>
2018-05-29 10:17:18 +05:30
Aravinda VK
75505b562a cli: Added support for Disperse Volume
and fixed issue with pure distribute volume

Signed-off-by: Aravinda VK <avishwan@redhat.com>
2018-05-25 13:09:47 +05:30
Madhu Rajanna
2eabbe85d7 added flag to set options during
volume creation

Signed-off-by: Madhu Rajanna <mrajanna@redhat.com>
2018-05-16 12:11:37 +05:30
Prashanth Pai
28ce236c58 Merge branch 'master' into verbose_log 2018-04-26 15:55:54 +05:30
Prashanth Pai
0947f10e15 cli: Add thin arbiter support
Closes #701

Signed-off-by: Prashanth Pai <ppai@redhat.com>
2018-04-26 15:05:16 +05:30
Madhu Rajanna
c22ebe363f glustercli fixed review comments
Signed-off-by: Madhu Rajanna <mrajanna@redhat.com>
2018-04-25 18:02:01 +05:30
Madhu Rajanna
faa96dc761 add verbose flag to cli to
print error message to stdout

Signed-off-by: Madhu Rajanna <mrajanna@redhat.com>
2018-04-25 17:15:37 +05:30
Kaushal M
69a9bd5748 volume-create: Add support for advanced/experimental/deprecated 2018-04-02 13:44:20 +05:30