Skip to content

Commit 81dd1ad

Browse files
committed
fix tailscale log storage issue in IXP
we were logging all of the route learned via the IXP to tailscale log file
1 parent 4b272c4 commit 81dd1ad

File tree

4 files changed

+20
-8
lines changed

4 files changed

+20
-8
lines changed

templates/terraform/ixp.tf.j2

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -171,15 +171,18 @@ resource "docker_container" "{{ inventory_hostname }}_tailscale" {
171171
restart = "unless-stopped"
172172
log_driver = "json-file"
173173
log_opts = {
174-
tag = {% raw %}"{{.ImageName}}|{{.Name}}|{{.ImageFullID}}|{{.FullID}}"{% endraw %}
174+
tag = {% raw %}"{{.ImageName}}|{{.Name}}|{{.ImageFullID}}|{{.FullID}}"{% endraw %}
175+
176+
max-size = "10m"
177+
max-file = "3"
175178
}
176179
privileged = true
177180
network_mode = "host"
178181
env = [
179182
"TS_AUTHKEY=${var.headscale_authkey}",
180183
"TS_STATE_DIR=/var/lib/tailscale",
181184
"TS_HOSTNAME={{ inventory_hostname }}",
182-
"TS_EXTRA_ARGS=--login-server=https://headscale.nxthdr.dev --advertise-tags=tag:ixp",
185+
"TS_EXTRA_ARGS=--login-server=https://headscale.nxthdr.dev --advertise-tags=tag:ixp --no-logs-no-support",
183186
"TS_USERSPACE=false"
184187
]
185188
volumes {

terraform/ixpams01.tf

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -168,14 +168,17 @@ resource "docker_container" "ixpams01_tailscale" {
168168
restart = "unless-stopped"
169169
log_driver = "json-file"
170170
log_opts = {
171-
tag = "{{.ImageName}}|{{.Name}}|{{.ImageFullID}}|{{.FullID}}" }
171+
tag = "{{.ImageName}}|{{.Name}}|{{.ImageFullID}}|{{.FullID}}"
172+
max-size = "10m"
173+
max-file = "3"
174+
}
172175
privileged = true
173176
network_mode = "host"
174177
env = [
175178
"TS_AUTHKEY=${var.headscale_authkey}",
176179
"TS_STATE_DIR=/var/lib/tailscale",
177180
"TS_HOSTNAME=ixpams01",
178-
"TS_EXTRA_ARGS=--login-server=https://headscale.nxthdr.dev --advertise-tags=tag:ixp",
181+
"TS_EXTRA_ARGS=--login-server=https://headscale.nxthdr.dev --advertise-tags=tag:ixp --no-logs-no-support",
179182
"TS_USERSPACE=false"
180183
]
181184
volumes {

terraform/ixpams02.tf

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -168,14 +168,17 @@ resource "docker_container" "ixpams02_tailscale" {
168168
restart = "unless-stopped"
169169
log_driver = "json-file"
170170
log_opts = {
171-
tag = "{{.ImageName}}|{{.Name}}|{{.ImageFullID}}|{{.FullID}}" }
171+
tag = "{{.ImageName}}|{{.Name}}|{{.ImageFullID}}|{{.FullID}}"
172+
max-size = "10m"
173+
max-file = "3"
174+
}
172175
privileged = true
173176
network_mode = "host"
174177
env = [
175178
"TS_AUTHKEY=${var.headscale_authkey}",
176179
"TS_STATE_DIR=/var/lib/tailscale",
177180
"TS_HOSTNAME=ixpams02",
178-
"TS_EXTRA_ARGS=--login-server=https://headscale.nxthdr.dev --advertise-tags=tag:ixp",
181+
"TS_EXTRA_ARGS=--login-server=https://headscale.nxthdr.dev --advertise-tags=tag:ixp --no-logs-no-support",
179182
"TS_USERSPACE=false"
180183
]
181184
volumes {

terraform/ixpfra01.tf

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -168,14 +168,17 @@ resource "docker_container" "ixpfra01_tailscale" {
168168
restart = "unless-stopped"
169169
log_driver = "json-file"
170170
log_opts = {
171-
tag = "{{.ImageName}}|{{.Name}}|{{.ImageFullID}}|{{.FullID}}" }
171+
tag = "{{.ImageName}}|{{.Name}}|{{.ImageFullID}}|{{.FullID}}"
172+
max-size = "10m"
173+
max-file = "3"
174+
}
172175
privileged = true
173176
network_mode = "host"
174177
env = [
175178
"TS_AUTHKEY=${var.headscale_authkey}",
176179
"TS_STATE_DIR=/var/lib/tailscale",
177180
"TS_HOSTNAME=ixpfra01",
178-
"TS_EXTRA_ARGS=--login-server=https://headscale.nxthdr.dev --advertise-tags=tag:ixp",
181+
"TS_EXTRA_ARGS=--login-server=https://headscale.nxthdr.dev --advertise-tags=tag:ixp --no-logs-no-support",
179182
"TS_USERSPACE=false"
180183
]
181184
volumes {

0 commit comments

Comments
 (0)