mirror of
https://github.com/tailscale/tailscale.git
synced 2025-02-18 02:48:40 +00:00
cmd/tailscale/cli: allow 'tailscale up' to succeed if --stateful-filtering is not explicitly set on linux (#12312) (#12314)
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)
This commit is contained in:
parent
e64efe4f77
commit
dff1de7264
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user