Package: influxdb / 1.6.7~rc0-1

disable-reporting.patch Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
Description: Disable reporting by default
 This patch disables reporting by default. For reporting to be enabled,
 it has to be specified in the config file. This changes the default
 behaviour where reporting would be enabled if influxd is launched
 without specifying a config file.
Author: Alexandre Viau <alexandre@alexandreviau.net>
Last-Update: 2015-08-11

---
 cmd/influxd/run/config.go |    2 +-
 cmd/influxd/run/server.go |    6 +++---
 2 files changed, 4 insertions(+), 4 deletions(-)

--- a/cmd/influxd/run/config.go
+++ b/cmd/influxd/run/config.go
@@ -59,7 +59,7 @@
 	ContinuousQuery continuous_querier.Config `toml:"continuous_queries"`
 
 	// Server reporting
-	ReportingDisabled bool `toml:"reporting-disabled"`
+	ReportingEnabled bool `toml:"reporting-enabled"`
 
 	// BindAddress is the address that all TCP services use (Raft, Snapshot, Cluster, etc.)
 	BindAddress string `toml:"bind-address"`
@@ -207,8 +207,8 @@
 // Diagnostics returns a diagnostics representation of Config.
 func (c *Config) Diagnostics() (*diagnostics.Diagnostics, error) {
 	return diagnostics.RowFromMap(map[string]interface{}{
-		"reporting-disabled": c.ReportingDisabled,
-		"bind-address":       c.BindAddress,
+		"reporting-enabled": c.ReportingEnabled,
+		"bind-address":      c.BindAddress,
 	}), nil
 }
 
--- a/cmd/influxd/run/server.go
+++ b/cmd/influxd/run/server.go
@@ -84,7 +84,7 @@
 	Monitor *monitor.Monitor
 
 	// Server reporting and registration
-	reportingDisabled bool
+	reportingEnabled bool
 
 	// Profiling
 	CPUProfile string
@@ -171,7 +171,7 @@
 
 		MetaClient: meta.NewClient(c.Meta),
 
-		reportingDisabled: c.ReportingDisabled,
+		reportingEnabled: c.ReportingEnabled,
 
 		httpAPIAddr: c.HTTPD.BindAddress,
 		httpUseTLS:  c.HTTPD.HTTPSEnabled,
@@ -468,7 +468,7 @@
 	}
 
 	// Start the reporting service, if not disabled.
-	if !s.reportingDisabled {
+	if s.reportingEnabled {
 		go s.startServerReporting()
 	}
 
--- a/tests/server_helpers.go
+++ b/tests/server_helpers.go
@@ -498,7 +498,7 @@
 
 	c := &Config{rootPath: root, Config: run.NewConfig()}
 	c.BindAddress = "127.0.0.1:0"
-	c.ReportingDisabled = true
+	c.ReportingEnabled = false
 	c.Coordinator.WriteTimeout = toml.Duration(30 * time.Second)
 
 	c.Meta.Dir = filepath.Join(c.rootPath, "meta")