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

135 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
vpandey-RH
e6ce7cfd90 Volume profile info API + CLI
Signed-off-by: Vishal Pandey <vpandey@redhat.com>
2018-11-16 18:52:23 +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
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
edda2c5063 Refactor cluster options package
* Merge 'glusterd2/cluster' package into `glusterd2/options` package.
* Rename 'glusterd2/commands/global' to 'glusterd2/commands/options'.

Signed-off-by: Prashanth Pai <ppai@redhat.com>
2018-10-11 16:26:30 +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
Hari Gowtham
486e23ed22 volume: add capacity field
Added capacity field to volume GET AP response. This is currently
returned only for volumes provisioned dynamically and their volume
snapshots.

The CLI prints the volume capacity in a human friendly format.

Signed-off-by: Hari Gowtham <hgowtham@redhat.com>
2018-10-03 09:35:40 +05:30
Aravinda VK
5c11d4e7d8 disperse data count and redundancy count added to API response
Fixes: #1192
Signed-off-by: Aravinda VK <avishwan@redhat.com>
2018-09-26 14:33:48 +05:30
Madhu Rajanna
305072d7f9 rename snapTime field to createAt in snapshot response
instead of returning the time as string,return
snapshot creation time as time.Time, the rest user
dont need to convert back to the time.Time if he
want to do any time conversion.

Signed-off-by: Madhu Rajanna <mrajanna@redhat.com>
2018-09-15 11:34:24 +05:30
Madhu Rajanna
7ba7bd303f return complete snapshot info in snapshot list
during the snapshot list return the complete
snapshots info along with the parent volume
name, if we call snapshotlist we should be
able to get complete snapshot information
like listing volumes.

Signed-off-by: Madhu Rajanna <mrajanna@redhat.com>
2018-09-05 09:57:30 +05:30
Mohammed Rafi KC
8957cd16cb snapshot: Update enpoints.md file with snapshot rest api
Signed-off-by: Mohammed Rafi KC <rkavunga@redhat.com>
2018-09-03 14:43:13 +05:30
Mohammed Rafi KC
d284f086d0 snapshot:update options during snap create using default value
This also address review comments in PR 846.

Signed-off-by: Mohammed Rafi KC <rkavunga@redhat.com>
2018-09-03 14:43:13 +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
Prashanth Pai
4501570a6f Fix replicate and arbiter-count in volinfo response
In volume info and volume listing response, fields 'replica-count' and
'arbiter-count' were not being set.

For common use cases, replica count of the volume is usually the replica
count of any one of the subvols. We set and return the same in response
now.

Signed-off-by: Prashanth Pai <ppai@redhat.com>
2018-07-26 12:05:17 +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
Mohammed Rafi KC
e22c0e07dc snapshot:clone Implement snapshot clone
This PR includes functional changes, client api changes,
Test cases.

Signed-off-by: Mohammed Rafi KC <rkavunga@redhat.com>
2018-07-13 13:06:10 +05:30
Mohammed Rafi KC
e85bb81ad5 snapshot/status: implement snapshot status
This PR includes test functionality change, cli and test cases

Signed-off-by: Mohammed Rafi KC <rkavunga@redhat.com>
2018-07-13 13:06:10 +05:30
Mohammed Rafi KC
a55da3f232 snapshot/list: Change snapshot list to param based rest url
snapshot list will now take volume as the key in url to list all
snapshots of a volume

Signed-off-by: Mohammed Rafi KC <rkavunga@redhat.com>
2018-07-13 13:06:10 +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
Madhu Rajanna
859ad70fbd updated endpoints.md
Signed-off-by: Madhu Rajanna <mrajanna@redhat.com>
2018-07-04 12:51:19 +05:30
Samikshan Bairagya
a85e35e8dc Make more changes to volume get support
1. Merge handlers for volume get on single option and all options.
2. Add e2e test cases for volume get support

Signed-off-by: Samikshan Bairagya <samikshan@gmail.com>
2018-07-04 12:51:19 +05:30
Samikshan Bairagya
c34bfbcb85 Include OptionLevel information on volume get REST API response
Signed-off-by: Samikshan Bairagya <samikshan@gmail.com>
2018-07-04 12:51:19 +05:30
Samikshan Bairagya
5252ae8d0e Add support to get volume option(s) through REST api.
Issue: #496

Signed-off-by: Samikshan Bairagya <samikshan@gmail.com>
2018-07-04 12:51:19 +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
Madhu Rajanna
8aad2d0728 when glusterd2 starts,glusterd2 PID will be
added as a value under  alive/peerid key
and this is published as a liveness to the store.

peer list and peer status will contains
PID in HTTP response.

Signed-off-by: Madhu Rajanna <mrajanna@redhat.com>
2018-06-22 10:22:46 +05:30
Prashanth Pai
7b84ef8757 txn: Add CLI support to parse txn error
Signed-off-by: Prashanth Pai <ppai@redhat.com>
2018-06-06 21:37:02 +05:30
Prashanth Pai
db80e2be41 txn: Return detailed error to client
The txn framework now returns detailed error to the client i.e which step
failed on which peer and with what error.

Signed-off-by: Prashanth Pai <ppai@redhat.com>
2018-06-06 18:16:50 +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
Prashanth Pai
9bbf00fbad Merge branch 'master' into add-size-constraint-to-volume-peer-metadata 2018-05-31 18:16:06 +05:30
root
20ae919453 Merge branch 'master' into add-size-constraint-to-volume-peer-metadata 2018-05-30 17:42:15 +05:30
Kaushal M
2a3599bd27 Merge branch 'master' into snapshot1 2018-05-29 17:37:42 +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
Prashanth Pai
e2469feec2 Merge branch 'master' into filtering-peers-on-metadata 2018-05-25 21:21:09 +05:30
root
d6f862bdd5 Filter peers on basis of metadata either by metadata key/value/key+value
Signed-off-by: Vishal Pandey <vpandey@redhat.com>
2018-05-25 17:15:36 +05:30
Aravinda VK
e613a8730c Refactoring for Intelligent Volume Provisioning
Added more device utils and `fstab` handling library

Updates: #466
Signed-off-by: Aravinda VK <avishwan@redhat.com>
2018-05-24 19:59:38 +05:30
root
197a143acb resolve documentation issue for volumeGetResp and volumeListResp 2018-05-23 15:02:21 +05:30
rishubhjain
8ad368dbd7 Merge branch 'master' of https://github.com/gluster/glusterd2 into group 2018-05-23 00:17:49 -04:00
rishubhjain
62273e4c30 Merge branch 'master' of https://github.com/gluster/glusterd2 into group
Conflicts:
	pkg/errors/error.go
2018-05-23 00:16:14 -04:00
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
Mohammed Rafi KC
15e37acfdd snapshot: Address review comments
Signed-off-by: Mohammed Rafi KC <rkavunga@redhat.com>
2018-05-17 23:34:01 +05:30
Prashanth Pai
71cf1a8a2c Merge branch 'master' into filter-volumes-by-metadata 2018-05-17 16:02:36 +05:30
Mohammed Rafi KC
271b213a0c snapshot: minimize the core changes
Along with minor refactoring, Added one field to volinfo for volfileId.

Signed-off-by: Mohammed Rafi KC <rkavunga@redhat.com>
2018-05-16 16:17:16 +05:30
Mohammed Rafi KC
71b540a18e snapshot-info,list,volume-list
Signed-off-by: Mohammed Rafi KC <rkavunga@redhat.com>
2018-05-16 16:15:14 +05:30
Mohammed Rafi KC
68f2e7c6fb snapshot-activate
Signed-off-by: Mohammed Rafi KC <rkavunga@redhat.com>
2018-05-16 16:13:51 +05:30