Skip to content

fix: stop logging workspace agent unless verbose #13378

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

Merged

Conversation

spikecurtis
Copy link
Contributor

@spikecurtis spikecurtis commented May 28, 2024

Output from coder speedtest, coder port-forward and coder ping includes logging from the tailnet.Conn, which doesn't really match the plain, human readable text output of these commands. E.g.

2024-05-28 10:09:50.898 [info]  updating engine DERP map  derp_map="{\"Regions\":{\"1000\":{\"EmbeddedRelay\":false,\"RegionID\":1000,\"RegionCode\":\"coder_stun_1000\",\"RegionName\":\"Coder STUN 1000\",\"Nodes\":[{\"Name\":\"1000stun0\",\"RegionID\":1000,\"HostName\":\"stun.l.google.com\",\"STUNPort\":19302,\"STUNOnly\":true}]},\"1001\":{\"EmbeddedRelay\":false,\"RegionID\":1001,\"RegionCode\":\"coder_stun_1001\",\"RegionName\":\"Coder STUN 1001\",\"Nodes\":[{\"Name\":\"1001stun0\",\"RegionID\":1001,\"HostName\":\"stun1.l.google.com\",\"STUNPort\":19302,\"STUNOnly\":true}]},\"10013\":{\"EmbeddedRelay\":false,\"RegionID\":10013,\"RegionCode\":\"coder_paris-fly\",\"RegionName\":\"Europe Fly.io (Paris)\",\"Nodes\":[{\"Name\":\"10013a\",\"RegionID\":10013,\"HostName\":\"paris.fly.dev.coder.com\",\"STUNPort\":-1,\"DERPPort\":443}]},\"10015\":{\"EmbeddedRelay\":false,\"RegionID\":10015,\"RegionCode\":\"coder_sydney-fly\",\"RegionName\":\"Australia Fly.io (Sydney)\",\"Nodes\":[{\"Name\":\"10015a\",\"RegionID\":10015,\"HostName\":\"sydney.fly.dev.coder.com\",\"STUNPort\":-1,\"DERPPort\":443}]},\"10016\":{\"EmbeddedRelay\":false,\"RegionID\":10016,\"RegionCode\":\"coder_sao-paulo-fly\",\"RegionName\":\"Brazil Fly.io (Sao Paulo)\",\"Nodes\":[{\"Name\":\"10016a\",\"RegionID\":10016,\"HostName\":\"sao-paulo.fly.dev.coder.com\",\"STUNPort\":-1,\"DERPPort\":443}]},\"10018\":{\"EmbeddedRelay\":false,\"RegionID\":10018,\"RegionCode\":\"coder_johannesburg-fly\",\"RegionName\":\"South Africa Fly.io (Johannesburg)\",\"Nodes\":[{\"Name\":\"10018a\",\"RegionID\":10018,\"HostName\":\"jnb.fly.dev.coder.com\",\"STUNPort\":-1,\"DERPPort\":443}]},\"1002\":{\"EmbeddedRelay\":false,\"RegionID\":1002,\"RegionCode\":\"coder_stun_1002\",\"RegionName\":\"Coder STUN 1002\",\"Nodes\":[{\"Name\":\"1002stun0\",\"RegionID\":1002,\"HostName\":\"stun2.l.google.com\",\"STUNPort\":19302,\"STUNOnly\":true}]},\"1003\":{\"EmbeddedRelay\":false,\"RegionID\":1003,\"RegionCode\":\"coder_stun_1003\",\"RegionName\":\"Coder STUN 1003\",\"Nodes\":[{\"Name\":\"1003stun0\",\"RegionID\":1003,\"HostName\":\"stun3.l.google.com\",\"STUNPort\":19302,\"STUNOnly\":true}]},\"1004\":{\"EmbeddedRelay\":false,\"RegionID\":1004,\"RegionCode\":\"coder_stun_1004\",\"RegionName\":\"Coder STUN 1004\",\"Nodes\":[{\"Name\":\"1004stun0\",\"RegionID\":1004,\"HostName\":\"stun4.l.google.com\",\"STUNPort\":19302,\"STUNOnly\":true}]},\"999\":{\"EmbeddedRelay\":true,\"RegionID\":999,\"RegionCode\":\"coder\",\"RegionName\":\"Council Bluffs, Iowa\",\"Nodes\":[{\"Name\":\"999b\",\"RegionID\":999,\"HostName\":\"dev.coder.com\",\"STUNPort\":-1,\"DERPPort\":443}]}}}"
2024-05-28 10:09:50.898 [info]  updating engine network map  network_map="netmap: self: [bqyfb] auth=machine-unknown u=? [fd7a:115c:a1e0:46da:b312:5e11:ec77:f271/128]\n"
2024-05-28 10:09:50.899 [info]  updating engine filter  filter="&{logf:0x103ce9170 local:0x140007a0060 logIPs:0x140007a0078 matches4:[{IPProto:[6 17 1 58 132] Srcs:[{ip:{addr:{hi:0 lo:281470681743360} z:0x1400000e078} bitsPlusOne:1}] Dsts:[{Net:{ip:{addr:{hi:0 lo:281470681743360} z:0x1400000e078} bitsPlusOne:1} Ports:{First:0 Last:65535}}] Caps:[]}] matches6:[{IPProto:[6 17 1 58 132] Srcs:[{ip:{addr:{hi:0 lo:0} z:0x1400000e090} bitsPlusOne:1}] Dsts:[{Net:{ip:{addr:{hi:0 lo:0} z:0x1400000e090} bitsPlusOne:1} Ports:{First:0 Last:65535}}] Caps:[]}] cap4:[] cap6:[] state:0x14000788930 shieldsUp:false}"
2024-05-28 10:09:52.067 [info]  updating engine network map  network_map="netmap: self: [bqyfb] auth=machine-unknown u=? [fd7a:115c:a1e0:46da:b312:5e11:ec77:f271/128]\n [W+fRR] d:52eb7800464fe556 D999 fd7a:115c:a1e0:4f25:bb75:b198:9e47:ea4e/128 fd7a:115c:a1e0:49d6:b259:b7ac:b1b2:48f4/128 :      3.19.66.22:33328      10.1.2.106:33328\n"
209ms via coder
Starting a 5s download test...
INTERVAL       THROUGHPUT
0.00-1.53 sec  10.9499 Mbits/sec
1.53-2.62 sec  76.8738 Mbits/sec
2.62-3.68 sec  79.7098 Mbits/sec
3.68-4.73 sec  79.7699 Mbits/sec
4.73-5.36 sec  79.3592 Mbits/sec
----------------------------------
0.00-5.36 sec  59.4535 Mbits/sec
2024-05-28 10:10:00.341 [info]  closing tailnet Conn
2024-05-28 10:10:00.342 [info]  closing tailnet Conn

I don't think we should be writing logs out to stderr unless --verbose is set.

Copy link
Contributor Author

spikecurtis commented May 28, 2024

This stack of pull requests is managed by Graphite. Learn more about stacking.

Join @spikecurtis and the rest of your teammates on Graphite Graphite

@spikecurtis spikecurtis marked this pull request as ready for review May 28, 2024 10:34
@spikecurtis spikecurtis force-pushed the 05-28-fix_respect_--disable-direct-connections_on_coder_speedtest branch from d917514 to f82e76f Compare May 29, 2024 03:56
@spikecurtis spikecurtis force-pushed the 05-28-fix_stop_logging_workspace_agent_unless_verbose branch from da0e62c to e1e2cde Compare May 29, 2024 03:57
Base automatically changed from 05-28-fix_respect_--disable-direct-connections_on_coder_speedtest to main May 29, 2024 04:07
@spikecurtis spikecurtis force-pushed the 05-28-fix_stop_logging_workspace_agent_unless_verbose branch from e1e2cde to bc6e4ff Compare May 29, 2024 04:08
Copy link
Contributor Author

spikecurtis commented May 29, 2024

Merge activity

  • May 29, 12:08 AM EDT: Graphite rebased this pull request after merging its parent, because this pull request is set to merge when ready.
  • May 29, 12:17 AM EDT: @spikecurtis merged this pull request with Graphite.

@spikecurtis spikecurtis merged commit 84b3121 into main May 29, 2024
27 checks passed
@spikecurtis spikecurtis deleted the 05-28-fix_stop_logging_workspace_agent_unless_verbose branch May 29, 2024 04:17
@github-actions github-actions bot locked and limited conversation to collaborators May 29, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants