fix(host): move the hostInstance.Init() step after InitAuth (#23622)

This commit is contained in:
Zexi Li
2025-10-28 19:28:46 +08:00
committed by GitHub
parent 78fa396097
commit cd68e4c156
+5 -5
View File
@@ -85,16 +85,16 @@ func (host *SHostService) RunService() {
log.Fatalf("failed set qemuimg preallocation to %s: %s", options.HostOptions.Qcow2Preallocation, err)
}
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!!")
})
common_options.StartOptionManager(&options.HostOptions.CommonOptions, options.HostOptions.ConfigSyncPeriodSeconds, "", "", common_options.OnCommonOptionsChange)
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)