Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor etcd config as discovery section with convenience types #2843

Merged
merged 51 commits into from
Nov 9, 2020
Merged
Show file tree
Hide file tree
Changes from 49 commits
Commits
Show all changes
51 commits
Select commit Hold shift + click to select a range
238de0b
[dbnode] [coordinator] Refactor config to use defaults wherever possible
robskillington Nov 5, 2020
fdc1021
Refactor pooling policy
robskillington Nov 5, 2020
7051a16
By default remove the filesystem too
robskillington Nov 5, 2020
6b10865
default coordinator section in dbnode config
rallen090 Nov 5, 2020
10ee091
default coordinator section in dbnode config 2
rallen090 Nov 5, 2020
dcba7d9
merged in changes
rallen090 Nov 5, 2020
9252528
build fixes 1
rallen090 Nov 5, 2020
943afd2
build fixes 2
rallen090 Nov 5, 2020
4021b30
lint
rallen090 Nov 5, 2020
6382b2b
lint 2
rallen090 Nov 5, 2020
b38c754
lint
rallen090 Nov 5, 2020
496c7ce
lint removing exhaustivestruct
rallen090 Nov 5, 2020
89dc079
update writeNewSeriesLimitPerSecond to be under limits:
rallen090 Nov 5, 2020
4394e27
discovery environment config
rallen090 Nov 5, 2020
3bf7aa1
tests for discovery config
rallen090 Nov 6, 2020
b54de40
update configs w/ new discovery format
rallen090 Nov 6, 2020
519c53f
test fixing 1
rallen090 Nov 6, 2020
4116b1e
tidy
rallen090 Nov 6, 2020
ec2e96b
test fixing 2
rallen090 Nov 6, 2020
47442d3
use envcfg from discoverycfg
rallen090 Nov 6, 2020
048e5dd
test fixes 1
rallen090 Nov 6, 2020
4022019
test fixes 2
rallen090 Nov 6, 2020
3dc1969
test fixes 2
rallen090 Nov 6, 2020
e44cd1e
test fixes 3
rallen090 Nov 6, 2020
896cd3a
test fixes 3
rallen090 Nov 6, 2020
803b8b5
test fixes 4
rallen090 Nov 6, 2020
f9b8326
lint
rallen090 Nov 6, 2020
af93c26
lint again
rallen090 Nov 6, 2020
4cbf248
more test fixes 1
rallen090 Nov 6, 2020
623cf52
more test fixes 2
rallen090 Nov 6, 2020
5b934fe
lint more
rallen090 Nov 6, 2020
b6ca23a
more test fixing
rallen090 Nov 6, 2020
64bba79
remove lint we do not want
rallen090 Nov 6, 2020
38efe1d
more lint
rallen090 Nov 6, 2020
0ad5356
more test fix
rallen090 Nov 6, 2020
5294afd
more test fix 2
rallen090 Nov 6, 2020
26f21fd
more test fix 3
rallen090 Nov 6, 2020
901bfe3
more test fix 4
rallen090 Nov 6, 2020
83be2c5
mod tidy
rallen090 Nov 6, 2020
457c15d
Merge branch 'master' into ra/etcd-config-as-discovery-section
rallen090 Nov 6, 2020
4df8a78
Merge branch 'master' into refactor-config-use-defaults-wherever-poss…
rallen090 Nov 6, 2020
68f7f48
Merge branch 'master' into refactor-config-use-defaults-wherever-poss…
robskillington Nov 7, 2020
e97464f
Minor tweaks
robskillington Nov 7, 2020
95151d7
Merge branch 'refactor-config-use-defaults-wherever-possible' into ra…
robskillington Nov 7, 2020
692a3f2
Merge branch 'master' into ra/etcd-config-as-discovery-section
robskillington Nov 9, 2020
26759b1
Merge branch 'master' into ra/etcd-config-as-discovery-section
robskillington Nov 9, 2020
c2e832b
Update configs to match defaults being available
robskillington Nov 9, 2020
28e7f7d
Merge branch 'ra/etcd-config-as-discovery-section' of github.com:m3db…
robskillington Nov 9, 2020
2e0571c
Add nlreturn to disabled linters
robskillington Nov 9, 2020
65816d3
Merge branch 'master' into ra/etcd-config-as-discovery-section
robskillington Nov 9, 2020
7bfe97d
Merge branch 'master' into ra/etcd-config-as-discovery-section
robskillington Nov 9, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,9 @@ linters:
# We allow cuddling assignment following conditions because there are valid
# logical groupings for this use-case (e.g. when evaluating config values).
- wsl
# New line required before return would require a large fraction of the
# code base to need updating, it's not worth the perceived benefit.
- nlreturn
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's cut this separately, please

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure thing.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Opened #2865.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Stamped, thanks!

disable-all: false
presets:
# bodyclose, errcheck, gosec, govet, scopelint, staticcheck, typecheck
Expand Down
25 changes: 13 additions & 12 deletions kube/bundle.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

25 changes: 13 additions & 12 deletions kube/m3dbnode-configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -65,15 +65,16 @@ data:
filesystem:
filePathPrefix: /var/lib/m3db
config:
service:
env: default_env
zone: embedded
service: m3db
cacheDir: /var/lib/m3kv
etcdClusters:
- zone: embedded
endpoints:
- http://etcd-0.etcd:2379
- http://etcd-1.etcd:2379
- http://etcd-2.etcd:2379
discovery:
config:
service:
env: default_env
zone: embedded
service: m3db
cacheDir: /var/lib/m3kv
etcdClusters:
- zone: embedded
endpoints:
- http://etcd-0.etcd:2379
- http://etcd-1.etcd:2379
- http://etcd-2.etcd:2379
29 changes: 17 additions & 12 deletions scripts/development/m3_stack/m3dbnode.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,20 +12,25 @@ db:
resolver: environment
envVarName: M3DB_HOST_ID

config:
# Note: cannot use type: "m3db_single_node" since sometimes
# multiple DB nodes spawned using the m3_stack start script
# and as such the non-seed nodes need to point etcd not to
# localhost but to m3db_seed:2379 specifically.
discovery:
config:
service:
env: default_env
zone: embedded
service: m3db
cacheDir: /var/lib/m3kv
etcdClusters:
- zone: embedded
endpoints:
- m3db_seed:2379
seedNodes:
env: default_env
zone: embedded
service: m3db
cacheDir: /var/lib/m3kv
etcdClusters:
- zone: embedded
endpoints:
- m3db_seed:2379
seedNodes:
initialCluster:
- hostID: m3db_seed
endpoint: http://m3db_seed:2380
- hostID: m3db_seed
endpoint: http://m3db_seed:2380

# proto:
# schemaFilePath: /etc/m3dbnode/schema.proto
18 changes: 0 additions & 18 deletions scripts/docker-integration-tests/aggregator/m3coordinator.yml
Original file line number Diff line number Diff line change
@@ -1,21 +1,5 @@
listenAddress: 0.0.0.0:7202

logging:
level: info

metrics:
scope:
prefix: "coordinator"
prometheus:
handlerPath: /metrics
listenAddress: 0.0.0.0:7203 # until https://github.com/m3db/m3/issues/682 is resolved
sanitization: prometheus
samplingRate: 1.0
extended: none

tagOptions:
idScheme: quoted

carbon:
ingester:
listenAddress: "0.0.0.0:7204"
Expand Down Expand Up @@ -47,8 +31,6 @@ clusters:
- zone: embedded
endpoints:
- dbnode01:2379
writeConsistencyLevel: majority
readConsistencyLevel: unstrict_majority

downsample:
rules:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,21 +1,5 @@
listenAddress: 0.0.0.0:7202

logging:
level: info

metrics:
scope:
prefix: "coordinator"
prometheus:
handlerPath: /metrics
listenAddress: 0.0.0.0:7203 # until https://github.com/m3db/m3/issues/682 is resolved
sanitization: prometheus
samplingRate: 1.0
extended: none

tagOptions:
idScheme: quoted

carbon:
ingester:
listenAddress: "0.0.0.0:7204"
Expand Down Expand Up @@ -47,8 +31,6 @@ clusters:
- zone: embedded
endpoints:
- dbnode01:2379
writeConsistencyLevel: majority
readConsistencyLevel: unstrict_majority

downsample:
remoteAggregator:
Expand Down
20 changes: 0 additions & 20 deletions scripts/docker-integration-tests/carbon/m3coordinator.yml
Original file line number Diff line number Diff line change
@@ -1,18 +1,3 @@
listenAddress: 0.0.0.0:7201

logging:
level: info

metrics:
scope:
prefix: "coordinator"
prometheus:
handlerPath: /metrics
listenAddress: 0.0.0.0:7203 # until https://github.com/m3db/m3/issues/682 is resolved
sanitization: prometheus
samplingRate: 1.0
extended: none

clusters:
- namespaces:
- namespace: agg
Expand All @@ -33,8 +18,6 @@ clusters:
- zone: embedded
endpoints:
- dbnode01:2379
writeConsistencyLevel: majority
readConsistencyLevel: unstrict_majority

carbon:
ingester:
Expand All @@ -56,6 +39,3 @@ carbon:
policies:
- resolution: 5s
retention: 10h

tagOptions:
idScheme: quoted
Original file line number Diff line number Diff line change
@@ -1,18 +1,3 @@
listenAddress: 0.0.0.0:7201

logging:
level: info

metrics:
scope:
prefix: "coordinator"
prometheus:
handlerPath: /metrics
listenAddress: 0.0.0.0:7203 # until https://github.com/m3db/m3/issues/682 is resolved
sanitization: prometheus
samplingRate: 1.0
extended: none

limits:
perQuery:
maxFetchedSeries: 100
Expand All @@ -37,8 +22,3 @@ clusters:
- zone: embedded
endpoints:
- dbnode01:2379
writeConsistencyLevel: majority
readConsistencyLevel: unstrict_majority

tagOptions:
idScheme: quoted
Original file line number Diff line number Diff line change
@@ -1,18 +1,3 @@
listenAddress: 0.0.0.0:7201

logging:
level: info

metrics:
scope:
prefix: "coordinator"
prometheus:
handlerPath: /metrics
listenAddress: 0.0.0.0:7203 # until https://github.com/m3db/m3/issues/682 is resolved
sanitization: prometheus
samplingRate: 1.0
extended: none

clusters:
- namespaces:
- namespace: agg
Expand Down Expand Up @@ -41,8 +26,6 @@ clusters:
- zone: embedded
endpoints:
- dbnode01:2379
writeConsistencyLevel: majority
readConsistencyLevel: unstrict_majority

downsample:
rules:
Expand Down Expand Up @@ -77,6 +60,3 @@ downsample:
bufferPastLimits:
- resolution: 0s
bufferPast: 90s

tagOptions:
idScheme: quoted
Original file line number Diff line number Diff line change
Expand Up @@ -18,56 +18,14 @@ coordinator:
idScheme: quoted

db:
logging:
level: info

metrics:
prometheus:
handlerPath: /metrics
sanitization: prometheus
samplingRate: 1.0
extended: detailed

listenAddress: 0.0.0.0:9000
clusterListenAddress: 0.0.0.0:9001
httpNodeListenAddress: 0.0.0.0:9002
httpClusterListenAddress: 0.0.0.0:9003
debugListenAddress: 0.0.0.0:9004

hostID:
resolver: environment
envVarName: M3DB_HOST_ID

client:
writeConsistencyLevel: majority
readConsistencyLevel: unstrict_majority

gcPercentage: 100

writeNewSeriesAsync: true
writeNewSeriesBackoffDuration: 2ms

cache:
series:
policy: lru

commitlog:
flushMaxBytes: 524288
flushEvery: 1s
queue:
calculationType: fixed
size: 2097152

filesystem:
filePathPrefix: /var/lib/m3db

config:
service:
discovery:
type: m3db_cluster
m3dbCluster:
env: foo-namespace/foo-cluster
zone: bar-zone
service: m3db
cacheDir: /var/lib/m3kv
etcdClusters:
- zone: bar-zone
endpoints:
- etcd01:2379
endpoints:
- etcd01:2379
Original file line number Diff line number Diff line change
@@ -1,18 +1,3 @@
listenAddress: 0.0.0.0:7201

logging:
level: info

metrics:
scope:
prefix: "coordinator"
prometheus:
handlerPath: /metrics
listenAddress: 0.0.0.0:7203 # until https://github.com/m3db/m3/issues/682 is resolved
sanitization: prometheus
samplingRate: 1.0
extended: none

limits:
perQuery:
maxFetchedSeries: 100
Expand All @@ -37,8 +22,3 @@ clusters:
- zone: embedded
endpoints:
- cluster_a_dbnode01:2379
writeConsistencyLevel: majority
readConsistencyLevel: unstrict_majority

tagOptions:
idScheme: quoted
Original file line number Diff line number Diff line change
@@ -1,18 +1,3 @@
listenAddress: 0.0.0.0:7201

logging:
level: info

metrics:
scope:
prefix: "coordinator"
prometheus:
handlerPath: /metrics
listenAddress: 0.0.0.0:7203 # until https://github.com/m3db/m3/issues/682 is resolved
sanitization: prometheus
samplingRate: 1.0
extended: none

limits:
perQuery:
maxFetchedSeries: 100
Expand All @@ -37,8 +22,3 @@ clusters:
- zone: embedded
endpoints:
- cluster_b_dbnode01:2379
writeConsistencyLevel: majority
readConsistencyLevel: unstrict_majority

tagOptions:
idScheme: quoted
Loading