Implement glustercli command to disable and delete the current tracing
configuration on the cluster. The changes include gd2 transaction that
first deletes the trace configuration from the store on one node and then
a subsequent step clears the in-memory trace configuration on all nodes.
closes #1368
Signed-off-by: Sridhar Seshasayee <sseshasa@redhat.com>
Implement glustercli command to update the current tracing status on the
cluster. All trace config options are passed as flags to the command. If
any option is not passed, the existing value for that option will be
retained.
closes #1368
Signed-off-by: Sridhar Seshasayee <sseshasa@redhat.com>
Implement glustercli command to get the current tracing status on the
cluster. The tracing info is read from the store and presented to the
user in table format with info like Status, Jaeger Endpoints, Sampler
type and sample fraction. For e.g.,
+------------------------+----------------------------+
| TRACE OPTION | VALUE |
+------------------------+----------------------------+
| Status | enabled |
| Jaeger Endpoint | http://192.168.122.1:14268 |
| Jaeger Agent Endpoint | http://192.168.122.1:6831 |
| Jaeger Sampler | 2 (Probabilistic) |
| Jaeger Sample Fraction | 0.99 |
+------------------------+----------------------------+
Add "trace enable" e2e test cases. The tests also exercise the
"trace status" request.
closes #1368
Signed-off-by: Sridhar Seshasayee <sseshasa@redhat.com>
Implement glustercli command to enable tracing. The rest client performs
basic checks of the tracing options prior to sending the request.
closes #1368
Signed-off-by: Sridhar Seshasayee <sseshasa@redhat.com>
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>
- gsyncd path defaulted to /usr/libexec/glusterfs/gsyncd
- Fixes remote REST API auth issues
- Workaround to make it work with marker xlator
Signed-off-by: Aravinda VK <avishwan@redhat.com>
Earlier `humanReadable` function was accepting values in `MiB`
With PR #1326 default unit is changed to bytes.
Signed-off-by: Aravinda VK <avishwan@redhat.com>
Moved lvm related functions from `$SRC/glusterd2/snapshot/lvm`
and `$SRC/plugins/device/deviceutils/` to `$SRC/pkg/lvmutils`
Also moved fs related functions from `plugins/deviceutils` to
`$SRC/pkg/fsutils`.
Fixes: #1187
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>
Endpoints are taken in following order of precedence
(highest to lowest):
- --endpoints
- GD2_ENDPOINTS (environment variable)
- (default value)
Fixes: #1291
Signed-off-by: Aravinda VK <avishwan@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>
Glustercli will have an added feature of deleting all
snapshots in the cluster or all snapshots of a particular
volume
Example CLI commands
Example 1 :-> Delete a particular snapshot
glustercli snapshot delete <snapname>
Example 2 :-> Delete all snapshots of a cluster
glustercli snapshot delete all
Example 3 :-> Delete a all snapshots of a particular volume
glustercli snapshot delete all <volume-name>
Signed-off-by: Mohammed Rafi KC <rkavunga@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>
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>
Glustercli will have an added feature of deleting all
snapshots in the cluster or all snapshots of a particular
volume
Signed-off-by: Mohammed Rafi KC <rkavunga@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>
If last Error Response is nil, then calling failure function will cause
segmentation fault error
Fixes #1115
Signed-off-by: Oshank Kumar <okumar@redhat.com>
The client timeout is now configurable at the restclient layer and also
in the CLI. The client timeout defaults to 30 seconds in both restclient
and CLI.
Timeout can be configured in:
* restclient using SetTimeout() API.
* CLI using --timeout command line flag.
This client timeout is the overall timeout which includes the time taken
from setting up TCP connection till client finishes reading the response
body from glusterd2.
Signed-off-by: Prashanth Pai <ppai@redhat.com>
With this change, secret is taken by CLI in following order of
precedence (highest to lowest):
--secret
--secret-file
GLUSTERD2_AUTH_SECRET (environment variable)
--secret-file (default path)
The command-line flag '--authfile' has been renamed to '--secret-file'
to be consistent with the flag `--secret`.
Signed-off-by: Prashanth Pai <ppai@redhat.com>