mirror of
https://github.com/yunionio/cloudpods.git
synced 2026-09-19 02:37:24 +08:00
fix(host): move the hostInstance.Init() step after InitAuth (#23624)
This commit is contained in:
@@ -88,6 +88,11 @@ func (host *SHostService) RunService() {
|
||||
log.Fatalf("failed set qemuimg preallocation to %s: %s", options.HostOptions.Qcow2Preallocation, err)
|
||||
}
|
||||
|
||||
app_common.InitAuth(&options.HostOptions.CommonOptions, func() {
|
||||
log.Infof("Auth complete!!")
|
||||
})
|
||||
common_options.StartOptionManager(&options.HostOptions.CommonOptions, options.HostOptions.ConfigSyncPeriodSeconds, "", "", common_options.OnCommonOptionsChange)
|
||||
|
||||
hostInstance := hostinfo.Instance()
|
||||
if err := hostInstance.Init(app.GetContext()); err != nil {
|
||||
log.Errorf("Host instance init error: %s, wait 3 minutes to retry", err)
|
||||
@@ -95,11 +100,6 @@ func (host *SHostService) RunService() {
|
||||
log.Fatalf("Host instance init error: %s, reboot now", err)
|
||||
}
|
||||
|
||||
app_common.InitAuth(&options.HostOptions.CommonOptions, func() {
|
||||
log.Infof("Auth complete!!")
|
||||
})
|
||||
common_options.StartOptionManager(&options.HostOptions.CommonOptions, options.HostOptions.ConfigSyncPeriodSeconds, "", "", common_options.OnCommonOptionsChange)
|
||||
|
||||
deployclient.Init(options.HostOptions.DeployServerSocketPath)
|
||||
if err := storageman.Init(hostInstance); err != nil {
|
||||
log.Fatalf("Storage manager init error: %v", err)
|
||||
|
||||
Reference in New Issue
Block a user