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

Tracing: Implement glustercli command to disable the trace configuration

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>
This commit is contained in:
Sridhar Seshasayee
2019-01-14 01:37:35 +05:30
committed by Madhu Rajanna
parent 219ce69b48
commit ec25ca6619
6 changed files with 138 additions and 0 deletions

View File

@@ -18,6 +18,7 @@ const (
helpTraceEnableCmd = "Enable Tracing"
helpTraceStatusCmd = "Show Tracing Status"
helpTraceUpdateCmd = "Update Tracing Options"
helpTraceDisableCmd = "Disable Tracing"
errTraceEnableReqFailed = "Failed to enable tracing"
errTraceUpdateReqFailed = "Failed to update trace configuration"
)
@@ -41,6 +42,7 @@ func init() {
traceCmd.AddCommand(traceEnableCmd)
traceCmd.AddCommand(traceStatusCmd)
traceCmd.AddCommand(traceUpdateCmd)
traceCmd.AddCommand(traceDisableCmd)
}
func validateJaegerSampler() {
@@ -151,3 +153,15 @@ var traceUpdateCmd = &cobra.Command{
fmt.Println("Trace update successful")
},
}
var traceDisableCmd = &cobra.Command{
Use: "disable",
Short: helpTraceDisableCmd,
Run: func(cmd *cobra.Command, args []string) {
err := client.TraceDisable()
if err != nil {
failure("Trace disable failed", err, 1)
}
fmt.Println("Trace disable successful")
},
}