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>
A DebugWrapper will be helpful in debugging
restclient calls. To enable debugging we
need to pass `--loglevel` flag in glustercli
as debug
For Example, glustercli peer list --loglevel=debug
It will dump each outgoing request in
its HTTP/1.x wire representation and also It will
dump the received response in its HTTP/1.x wire
representation.
Signed-off-by: Oshank Kumar <okumar@redhat.com>
A query string hash (QSH) is an important technique
to prevent URL tampering and secure HTTP requests,
When a Client makes a request without a QSH claim,
or with a bad QSH claim (one that doesn’t match
the request), then the glusterd2 will respond with
HTTP status 401 Unauthorized
Signed-off-by: Madhu Rajanna <mrajanna@redhat.com>
If liveness watcher has not been started then a call to stop liveness watcher was causing panic.
Root Cause : closing a closed chan will result in panic.
This will fix issue #1092
Signed-off-by: Oshank Kumar <okumar@redhat.com>
fixed merge conflicts
Signed-off-by: Oshank Kumar <okumar@redhat.com>
changed chan chan err to chan chan struct{}
Signed-off-by: Oshank Kumar <okumar@redhat.com>
added synchronization
Signed-off-by: Oshank Kumar <okumar@redhat.com>
added waitgroup for sync
Signed-off-by: Oshank Kumar <okumar@redhat.com>
group std go package
Signed-off-by: Oshank Kumar <okumar@redhat.com>
* Simplify the do() method. Abstract creation of HTTP error.
* Save the last error response received from the server in the
restclient.Client instance which can be accessed using the
LastErrorResponse() method.
Signed-off-by: Prashanth Pai <ppai@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>
Implemented wehook/test rest API in glusterd2
which will be called by clients to test webhook
connections between all peers in glusterd2
and webhook URL
added rest client code to call webhook/test API
Signed-off-by: Madhu Rajanna <mrajanna@redhat.com>
Patchset include -->
*Functional changes for snapshot delete
*cli implemetation for snapshot delete
*Test case for snapshot delete
Signed-off-by: Mohammed Rafi KC <rkavunga@redhat.com>
Usage:
glustercli volume get <volname> <optname|all>
If all is used instead of optname, all volume options are listed.
Signed-off-by: Samikshan Bairagya <samikshan@gmail.com>
expect only URL which is required to delete webhook
earlier we use to pass same request body for both
webhook create and webhook delete,we store URL in
ETCD to add webhook, so to delete webhook we
require only URL, made code changes to accept
URL in request body for webhook delete
Signed-off-by: Madhu Rajanna <mrajanna@redhat.com>
list gluster events was missed in rest client
api, added rest api to cover the e2e test cases
for list gluster events
Signed-off-by: Madhu Rajanna <mrajanna@redhat.com>