diff options
| author | Irbe Krumina <irbe@tailscale.com> | 2024-05-31 23:27:52 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-05-31 23:27:52 +0100 |
| commit | dff1de72641f85ac7365a9489ca789f947299689 (patch) | |
| tree | b1a21dc6046b2a73e4a19f96b5977acdce98ff5b | |
| parent | e64efe4f777cb5b4d9efd603ad1360a509006cd1 (diff) | |
| download | tailscale-release-branch/1.66.tar.xz tailscale-release-branch/1.66.zip | |
cmd/tailscale/cli: allow 'tailscale up' to succeed if --stateful-filtering is not explicitly set on linux (#12312) (#12314)release-branch/1.66
This fixes an issue where, on containerized environments an upgrade
1.66.3 -> 1.66.4 failed with default containerboot configuration.
This was because containerboot by default runs 'tailscale up'
that requires all previously set flags to be explicitly provided
on subsequent runs and we explicitly set --stateful-filtering
to true on 1.66.3, removed that settingon 1.66.4.
Updates tailscale/tailscale#12307
Signed-off-by: Irbe Krumina <irbe@tailscale.com>
Co-authored-by: Andrew Lytvynov <awly@tailscale.com>
(cherry picked from commit c2a4719e9eed1641b7743b384feb13d54416b097)
| -rw-r--r-- | cmd/tailscale/cli/up.go | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/cmd/tailscale/cli/up.go b/cmd/tailscale/cli/up.go index 5a70285e1..c927c9946 100644 --- a/cmd/tailscale/cli/up.go +++ b/cmd/tailscale/cli/up.go @@ -876,11 +876,26 @@ func checkForAccidentalSettingReverts(newPrefs, curPrefs *ipn.Prefs, env upCheck // Issue 6811. Ignore on Synology. continue } + if flagName == "stateful-filtering" && valCur == true && valNew == false && env.goos == "linux" { + // See https://github.com/tailscale/tailscale/issues/12307 + // Stateful filtering was on by default in tailscale 1.66.0-1.66.3, then off in 1.66.4. + // This broke Tailscale installations in containerized + // environments that use the default containerboot + // configuration that configures tailscale using + // 'tailscale up' command, which requires that all + // previously set flags are explicitly provided on + // subsequent restarts. + continue + } missing = append(missing, fmtFlagValueArg(flagName, valCur)) } if len(missing) == 0 { return nil } + + // Some previously provided flags are missing. This run of 'tailscale + // up' will error out. + sort.Strings(missing) // Compute the stringification of the explicitly provided args in flagSet |
