mirror of
https://github.com/yunionio/cloudpods.git
synced 2026-09-21 14:19:49 +08:00
fix: host init before auth
This commit is contained in:
@@ -86,6 +86,11 @@ func (host *SHostService) RunService() {
|
||||
cronManager := cronman.InitCronJobManager(false, options.HostOptions.CronJobWorkerCount)
|
||||
hostutils.Init()
|
||||
|
||||
hostInstance := hostinfo.Instance()
|
||||
if err := hostInstance.Init(); err != nil {
|
||||
log.Fatalf("Host instance init error: %v", err)
|
||||
}
|
||||
|
||||
app_common.InitAuth(&options.HostOptions.CommonOptions, func() {
|
||||
log.Infof("Auth complete!!")
|
||||
|
||||
@@ -101,11 +106,6 @@ func (host *SHostService) RunService() {
|
||||
}
|
||||
})
|
||||
|
||||
hostInstance := hostinfo.Instance()
|
||||
if err := hostInstance.Init(); err != nil {
|
||||
log.Fatalf("Host instance init error: %v", err)
|
||||
}
|
||||
|
||||
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