mirror of
https://github.com/tailscale/tailscale.git
synced 2025-12-02 01:51:59 +00:00
envknob: support changing envknobs post-init
Updates #5114 Change-Id: Ia423fc7486e1b3f3180a26308278be0086fae49b Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
This commit is contained in:
committed by
Brad Fitzpatrick
parent
33ee2c058e
commit
74674b110d
@@ -325,7 +325,7 @@ func OverallError() error {
|
||||
return overallErrorLocked()
|
||||
}
|
||||
|
||||
var fakeErrForTesting = envknob.String("TS_DEBUG_FAKE_HEALTH_ERROR")
|
||||
var fakeErrForTesting = envknob.RegisterString("TS_DEBUG_FAKE_HEALTH_ERROR")
|
||||
|
||||
func overallErrorLocked() error {
|
||||
if !anyInterfaceUp {
|
||||
@@ -383,7 +383,7 @@ func overallErrorLocked() error {
|
||||
for _, s := range controlHealth {
|
||||
errs = append(errs, errors.New(s))
|
||||
}
|
||||
if e := fakeErrForTesting; len(errs) == 0 && e != "" {
|
||||
if e := fakeErrForTesting(); len(errs) == 0 && e != "" {
|
||||
return errors.New(e)
|
||||
}
|
||||
sort.Slice(errs, func(i, j int) bool {
|
||||
|
||||
Reference in New Issue
Block a user