fix(host): host register set isinit false on hostId not null (#19155)

Signed-off-by: wanyaoqi <d3lx.yq@gmail.com>
This commit is contained in:
wanyaoqi
2024-01-02 14:01:03 +08:00
committed by GitHub
parent 345a86f7c1
commit 30c3ecff61
+2
View File
@@ -1395,6 +1395,8 @@ func (h *SHostInfo) getSysInfo() *SSysInfo {
func (h *SHostInfo) updateOrCreateHost(hostId string) (*api.HostDetails, error) {
if len(hostId) == 0 {
h.isInit = true
} else {
h.isInit = false
}
masterIp := h.GetMasterIp()
if len(masterIp) == 0 {