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

Fix agent tunnel address with dedicated supervisor port #11427

Merged
merged 2 commits into from
Dec 10, 2024

Conversation

brandond
Copy link
Member

@brandond brandond commented Dec 7, 2024

Proposed Changes

Fix issue where rke2 tunnel was trying to connect to apiserver port instead of supervisor:

Note the incorrect port for the tunnel connection in RKE2 where the apiserver and supervisor are on different ports:

time="2024-12-06T20:35:57Z" level=info msg="Started tunnel to 172.17.0.2:6443"
time="2024-12-06T20:35:57Z" level=info msg="Stopped tunnel to 127.0.0.1:9345"
time="2024-12-06T20:35:57Z" level=info msg="Connecting to proxy" url="wss://172.17.0.2:6443/v1-rke2/connect"
time="2024-12-06T20:35:57Z" level=info msg="Proxy done" err="context canceled" url="wss://127.0.0.1:9345/v1-rke2/connect"
time="2024-12-06T20:35:57Z" level=info msg="error in remotedialer server [400]: websocket: close 1006 (abnormal closure): unexpected EOF"
time="2024-12-06T20:35:57Z" level=error msg="Failed to connect to proxy. Response status: 403 - 403 Forbidden. Response body: {\"kind\":\"Status\",\"apiVersion\":\"v1\",\"metadata\":{},\"status\":\"Failure\",\"message\":\"forbidden: User \\\"system:node:e8266a6ea5f6\\\" cannot get path \\\"/v1-rke2/connect\\\"\",\"reason\":\"Forbidden\",\"details\":{},\"code\":403}\n" error="websocket: bad handshake"
time="2024-12-06T20:35:57Z" level=error msg="Remotedialer proxy error; reconnecting..." error="websocket: bad handshake" url="wss://172.17.0.2:6443/v1-rke2/connect"

Types of Changes

bugfix

Verification

requires pull-through to rke2

Testing

Linked Issues

User-Facing Change


Further Comments

Fix issue where rke2 tunnel was trying to connect to apiserver port instead of supervisor

Signed-off-by: Brad Davidson <[email protected]>
@brandond brandond requested a review from a team as a code owner December 7, 2024 00:34
dereknola
dereknola previously approved these changes Dec 7, 2024
Copy link

codecov bot commented Dec 7, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 43.19%. Comparing base (e9cf3a7) to head (0cbfe94).
Report is 4 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master   #11427      +/-   ##
==========================================
- Coverage   47.66%   43.19%   -4.48%     
==========================================
  Files         181      181              
  Lines       18797    18794       -3     
==========================================
- Hits         8960     8118     -842     
- Misses       8490     9477     +987     
+ Partials     1347     1199     -148     
Flag Coverage Δ
e2etests 35.48% <100.00%> (-7.34%) ⬇️
inttests 18.73% <0.00%> (-16.09%) ⬇️
unittests 14.26% <0.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

vitorsavian
vitorsavian previously approved these changes Dec 9, 2024
@brandond brandond dismissed stale reviews from vitorsavian and dereknola via 7d7f90a December 9, 2024 18:32
@brandond brandond force-pushed the fix-supervisor-port branch from 7d7f90a to dbd7786 Compare December 9, 2024 18:40
@brandond brandond changed the title Fix agent tunnel address on rke2 Fix agent tunnel address with dedicated supervisor port Dec 9, 2024
@brandond brandond requested review from vitorsavian, dereknola and a team December 9, 2024 18:48
@brandond brandond force-pushed the fix-supervisor-port branch 2 times, most recently from c41a335 to af8abe9 Compare December 9, 2024 19:26
dereknola
dereknola previously approved these changes Dec 9, 2024
dereknola
dereknola previously approved these changes Dec 9, 2024
vitorsavian
vitorsavian previously approved these changes Dec 9, 2024
@brandond brandond force-pushed the fix-supervisor-port branch 2 times, most recently from c28b6ec to ff4cc0e Compare December 9, 2024 22:22
Add flags supervisor and apiserver ports and bind address so that we can add an e2e to cover supervisor and apiserver on separate ports, as used by rke2

Signed-off-by: Brad Davidson <[email protected]>
@brandond brandond force-pushed the fix-supervisor-port branch from ff4cc0e to 0cbfe94 Compare December 10, 2024 04:57
@brandond brandond requested review from vitorsavian, dereknola and a team December 10, 2024 05:54
@brandond
Copy link
Member Author

OK, all done poking at this one.

@brandond brandond merged commit e143e0f into k3s-io:master Dec 10, 2024
38 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants