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