diff --git a/pkg/cloudcommon/options/manager.go b/pkg/cloudcommon/options/manager.go index 6a37c8f3f43..a429451c42d 100644 --- a/pkg/cloudcommon/options/manager.go +++ b/pkg/cloudcommon/options/manager.go @@ -60,12 +60,12 @@ func StartOptionManager(option interface{}, refreshSeconds int, serviceType, ser } func StartOptionManagerWithSessionDriver(options interface{}, refreshSeconds int, serviceType, serviceVersion string, onChange TOptionsChangeFunc, session IServiceConfigSession) { - log.Infof("OptionManager start to fetch service configs ...") if refreshSeconds <= MIN_REFRESH_INTERVAL_SECONDS { // a minimal 30 seconds refresh interval refreshSeconds = MIN_REFRESH_INTERVAL_SECONDS } refreshInterval := time.Duration(refreshSeconds) * time.Second + log.Infof("OptionManager start to fetch service configs with interval %s ...", refreshInterval) OptionManager = &SOptionManager{ serviceType: serviceType, serviceVersion: serviceVersion, @@ -77,7 +77,9 @@ func StartOptionManagerWithSessionDriver(options interface{}, refreshSeconds int OptionManager.InitSync(OptionManager) - OptionManager.FirstSync() + if err := OptionManager.FirstSync(); err != nil { + log.Errorf("OptionManager.FirstSync error: %v", err) + } if session.IsRemote() { var opts *CommonOptions diff --git a/pkg/cloudcommon/options/options.go b/pkg/cloudcommon/options/options.go index 01b9fc98517..2bb0c58ceef 100644 --- a/pkg/cloudcommon/options/options.go +++ b/pkg/cloudcommon/options/options.go @@ -137,7 +137,7 @@ type CommonOptions struct { TenantCacheExpireSeconds int `help:"expire seconds of cached tenant/domain info. defailt 15 minutes" default:"900"` - SessionEndpointType string `help:"Client session end point type"` + SessionEndpointType string `help:"Client session end point type" default:"internal"` BaseOptions }