mirror of
https://github.com/yunionio/cloudpods.git
synced 2026-09-24 16:03:43 +08:00
Merge pull request #8383 from wanyaoqi/bugfix/wyq/keystone-init-etcd-backend
bugfix: keystone init etcd backend
This commit is contained in:
@@ -30,6 +30,7 @@ type SEndpointChangeManager struct {
|
||||
func newEndpointChangeManager() *SEndpointChangeManager {
|
||||
man := &SEndpointChangeManager{}
|
||||
man.InitSync(man)
|
||||
man.FirstSync()
|
||||
return man
|
||||
}
|
||||
|
||||
|
||||
@@ -631,3 +631,13 @@ func (endpoint *SEndpoint) ValidateUpdateData(
|
||||
}
|
||||
return data, nil
|
||||
}
|
||||
|
||||
func TrySetInformerBackend() {
|
||||
endpoint, err := EndpointManager.FetchByName(nil, apis.SERVICE_TYPE_ETCD)
|
||||
if err != nil {
|
||||
log.Errorf("Failed fetch etcd service endpoint: %s", err)
|
||||
return
|
||||
}
|
||||
ep := endpoint.(*SEndpoint)
|
||||
ep.trySetInformerBackend()
|
||||
}
|
||||
|
||||
@@ -70,6 +70,7 @@ func StartService() {
|
||||
|
||||
InitHandlers(app)
|
||||
db.EnsureAppInitSyncDB(app, &opts.DBOptions, models.InitDB)
|
||||
models.TrySetInformerBackend()
|
||||
|
||||
app_common.InitBaseAuth(&opts.BaseOptions)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user