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

43 Commits

Author SHA1 Message Date
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
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
8a52b23d84 Replace brick api 2018-12-07 19:04:19 +05:30
Aravinda VK
931b7a2e80 Refactor Device management
Signed-off-by: Aravinda VK <avishwan@redhat.com>
2018-12-05 11:21:29 +05:30
Vishal Pandey
48a7ebfd28 Brick resize for volume expand
Signed-off-by: Vishal Pandey <vpandey@redhat.com>
2018-11-22 17:19:02 +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
Mohammed Rafi KC
7d71e62ad6 MountSnapshot bricks on glusterd restart
Snapshot bricks are provisoned by glusterd. During a glusterd
restart, we should check for brick mounts for activated
snapshots.

Signed-off-by: Mohammed Rafi KC <rkavunga@redhat.com>
2018-10-16 11:36:06 +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
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
Aravinda VK
7603e0dc3f Mounting auto provisioned bricks on glusterd2 start
On `glusterd2` restart, it checks the list of auto provisioned bricks
and mounts if not mounted already.

Updates: #851
Signed-off-by: Aravinda VK <avishwan@redhat.com>
2018-07-18 10:21:56 +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
vpandey-RH
5e17004eec Volume reset CLI command and support for resetting all options
at once.

Signed-off-by: Vishal Pandey <vpandey@redhat.com>
2018-07-10 16:20:52 +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
root
20ae919453 Merge branch 'master' into add-size-constraint-to-volume-peer-metadata 2018-05-30 17:42:15 +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
Madhu Rajanna
55ed87fc53 added requestbody for volume start api
Signed-off-by: Madhu Rajanna <mrajanna@redhat.com>
2018-05-22 15:18:51 +05:30
Prashanth Pai
f131affbce Merge branch 'master' into edit-volume-metadata-API 2018-05-10 15:04:59 +05:30
root
406542b467 Add CLI command for editing and deleting metadata keys. Currently
keys can be edited/deleted one at a time.

Signed-off-by: Vishal Pandey <vpandey@redhat.com>
2018-05-10 03:20:52 -04:00
root
11fece9aea Adding support for metadata keys deletion 2018-05-08 06:47:16 -04:00
Devyani Kota
a8cf201650 Add checks for NEVER_RESET and FORCE flags for options to be reset
Signed-off-by: Devyani Kota <devyanikota@gmail.com>
2018-05-04 17:48:55 +05:30
Devyani Kota
35b1ec1729 Add checks for volopt flags
Signed-off-by: Devyani Kota <devyanikota@gmail.com>
2018-05-04 17:48:55 +05:30
Devyani Kota
d7ba58b284 Add VolumeOptionResetReq struct to represent a reset option request
Signed-off-by: Devyani Kota <devyanikota@gmail.com>
2018-05-04 17:48:55 +05:30
Poornima G
628e2f9e9a group-vol-set: Add description support for profiles
Also change the way profile disable is implemented, offvalue
is not required and having it can create confusion and is not
readable in vol info output.

Signed-off-by: Poornima G <pgurusid@redhat.com>
2018-05-02 11:56:09 +05:30
root
862088dc91 Merge branch 'master' into edit-volume-metadata-API 2018-04-30 05:10:17 -04:00
root
9471d6845c edit metadata 2018-04-25 09:42:41 -04:00
root
118f610ce8 Add Metadata as a new field in volinfo which acts like a dictionary
and populate it during volume create.

Signed-off-by: Vishal Pandey <vpandey@redhat.com>
2018-04-25 02:45:36 -04:00
Prashanth Pai
43a9269602 Implement volume statedump for bricks, quota and clients
Signed-off-by: Prashanth Pai <ppai@redhat.com>
2018-04-17 10:46:40 +05:30
rishubhjain
2f56409a7a Using Peer instead of Node 2018-04-05 03:23:21 -04:00
Kaushal M
69a9bd5748 volume-create: Add support for advanced/experimental/deprecated 2018-04-02 13:44:20 +05:30
Kaushal M
5367df27af volume-set: Add support for deprecated options 2018-03-28 15:39:58 +05:30
Kaushal M
140030e7b3 volume-set: Add support for advanced/experimental options 2018-03-27 12:46:18 +05:30
Prashanth Pai
a91b996f78 Add force option to volume expand API and CLI
Signed-off-by: Prashanth Pai <ppai@redhat.com>
2018-02-21 11:51:51 +05:30
Kamal Mohanan
652709a11e Add api for delete
Signed-off-by: Kamal Mohanan <kmohanan@redhat.com>
2018-01-24 16:19:16 +05:30
Kamal Mohanan
5280d85b69 Cleanup
Signed-off-by: Kamal Mohanan <kmohanan@redhat.com>
2018-01-24 16:14:16 +05:30
Kamal Mohanan
96bc18947f Add e2e test and glusterd1 profiles
Signed-off-by: Kamal Mohanan <kmohanan@redhat.com>
2018-01-24 16:14:16 +05:30
Kamal Mohanan
ce9076ab74 Add api
Signed-off-by: Kamal Mohanan <kmohanan@redhat.com>
2018-01-24 16:14:15 +05:30
Aravinda VK
e9936cdf04 volgen2: Added code comments and code improvements
Also rebased after disperse volume integration

Signed-off-by: Aravinda VK <avishwan@redhat.com>
2018-01-09 16:29:58 +05:30
Aravinda VK
c2deafff2d volgen2: More code cleanups
Merged duplicate code, simplified interface for volfiles.
Now it is easy to support both interface code and template for
volfile generation

Signed-off-by: Aravinda VK <avishwan@redhat.com>
2018-01-09 15:17:42 +05:30
Aravinda VK
6bf5113bfa volgen: Code based Volfile generation
Sub volumes support is added to Volinfo. Code based volfile generation
is implemented(Still exploring the possible approach to do that based on
input json/yml/toml)

All volfiles available in `$SRC/glusterd2/volgen2/volfile_*.go`

Features:

- Easy to add condition while generating volfile(For example, bitrot
  volfile only contains local bricks information)
- Easy to generate Cluster level, Volume level and Brick level volfiles
- Adding new volfile support is easy(Add one file)
- Full access to Cluster Info/Volume Info/Brick Info
- All supported volfiles are available now
- All generated volfiles are stored in etcd
- REST endpoint available to trigger regeneration of volfiles(Selective
  regeneration not yet available)

Limitations:
- Currently limited to code based volfile generation. If new volfile
  added or modified, Glusterd2 need to be recompiled. I tried template
  based approach to support cluster volfiles but it is getting over
  complecated. If this is not blocker now, we can proceed with this
  approach.

Future:
- Template file(json/yml/toml) support can be added on top of
  this if required.

Fixes: #388
Signed-off-by: Aravinda VK <avishwan@redhat.com>
2018-01-09 15:17:39 +05:30
Kamal Mohanan
8dc59815a6 Validation
Signed-off-by: Kamal Mohanan <kmohanan@redhat.com>
2018-01-09 11:23:34 +05:30
Kamal Mohanan
f438855c90 Add Template file
Signed-off-by: Kamal Mohanan <kmohanan@redhat.com>
2018-01-09 11:23:34 +05:30
Ravishankar N
3a5351d0fd add arbiter support
This patch adds partial support for arbiter volume creation and
displaying volume info in the output. brick volgen support is still
pending, wherein we need to insert the arbiter xlator into every 3rd
brick of the replica. For now, even if you create arbiter volume, the
3rd brick becomes a full fledged data brick.

Signed-off-by: Ravishankar N <ravishankar@redhat.com>
2017-12-13 17:34:02 +05:30
Prashanth Pai
b4a164ca52 volume ops: Separate internal structs from structs sent to client
Signed-off-by: Prashanth Pai <ppai@redhat.com>
2017-11-14 21:05:25 +05:30