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>
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>
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>
'--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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>