-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Add commands to remove advertised routes of tailscale in k3s-killall.sh #7777
Conversation
Codecov ReportPatch coverage has no change and project coverage change:
Additional details and impacted files@@ Coverage Diff @@
## master #7777 +/- ##
===========================================
+ Coverage 19.85% 51.47% +31.61%
===========================================
Files 83 143 +60
Lines 7686 14509 +6823
===========================================
+ Hits 1526 7468 +5942
+ Misses 5930 5854 -76
- Partials 230 1187 +957
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm a little concerned that this will be a breaking change for anyone using tailscale standalone. I know from GH issues that there are users that are currently deploying tailscale by hand, and then installing k3s afterwards. Is there anything we can do to avoid breaking things? Is there some way to uniquely configure tailscale to indicate that it is managed by k3s, and check for that when uninstalling?
Ok, I did not think about this use case TBH. Instead of turning it off, we could remove the configured subnet route instead, which is what we basically do apart from starting and logging. That would still fix the issue. Let me update the PR |
946d5ef
to
25412f7
Compare
install.sh
Outdated
ip link delete flannel-wg-v6 | ||
|
||
# Restart tailscale | ||
if [[ -n $(command -v tailscale) ]]; then |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Single braces only, this isn't bash. And quote the potentially empty subshell output.
if [[ -n $(command -v tailscale) ]]; then | |
if [ -n "$(command -v tailscale)" ]; then |
Signed-off-by: Manuel Buil <mbuil@suse.com>
25412f7
to
d968e64
Compare
Removing the advertised routes is also somewhat breaking, if one is using manually created advertised routes. Is the |
It is never run automatically. An administrator has to chose to run the uninstall or killall script, although a killall is also run as part of the uninstall (for obvious reasons). |
We have this related issue in the backlog: #8012 |
Proposed Changes
When k3s gets removed from the node, the tailscale interface should remove the routes that it had advertised:
This PR adds those commands to k3s-killall.sh
Types of Changes
Bugfix
Verification
After running k3s-killall.sh, the tailscale interface should not have any IP and running
tailscale status --json
should not report anything because we logged outTesting
Linked Issues
#7772
User-Facing Change
Further Comments