-
Notifications
You must be signed in to change notification settings - Fork 0
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
make hostname stable, check if sonic is initialized #89
Conversation
This reverts commit 0ee0c0b.
…ed vrf names even for route-maps
return fmt.Errorf("switch is not yet initialized, retrying") | ||
}, | ||
retry.Attempts(20), | ||
retry.Delay(1*time.Second), |
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.
My gut tells me that twenty seconds may be too low. Maybe one minute?
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.
DefaultDelayType = CombineDelay(BackOffDelay, RandomDelay)
so the delay basically doubles on every try ... with 20 attempts this would result at the end to a couple of weeks? :-)
# Conflicts: # cmd/internal/switcher/cumulus/cumulus.go # cmd/internal/switcher/templates/applier.go # cmd/internal/switcher/templates/frr.go # cmd/internal/switcher/templates/frr_test.go # cmd/internal/switcher/templates/interfaces.go
This reverts commit f4d9e11.
…ll Nexthop into kernel"" This reverts commit 1086616.
@@ -40,6 +40,15 @@ func newConfigDB(addr string, id int, separator string) *ConfigDB { | |||
} | |||
} | |||
|
|||
func (c *ConfigDB) IsInitialized(ctx context.Context) (bool, error) { | |||
key := "CONFIG_DB_INITIALIZED" | |||
result, err := c.rdb.Get(ctx, key).Result() |
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.
Get
will return an error of type redis.Nil if the key doesn't exist. We should use Exists
.
not required anymore since #81 was merged |
This requires also to set hostname during metal-core deployment, will be done next.
Fallback is still os.Hostname()
depend on metal-stack/metal-roles#155
TODO: