diff --git a/server/controller/recorder/domain.go b/server/controller/recorder/domain.go index 891f2d03c77..d7b6f4536b8 100644 --- a/server/controller/recorder/domain.go +++ b/server/controller/recorder/domain.go @@ -107,7 +107,7 @@ func (d *domain) tryRefresh(cloudData cloudmodel.Resource) error { func (d *domain) shouldRefresh(cloudData cloudmodel.Resource) error { if cloudData.Verified { - if len(cloudData.Networks) == 0 || len(cloudData.VInterfaces) == 0 { + if (d.metadata.Domain.Type != common.CLOUD_TOWER && len(cloudData.Networks) == 0) || len(cloudData.VInterfaces) == 0 { log.Info(d.metadata.Logf("domain has no networks or vinterfaces, does nothing")) return DataMissingError } diff --git a/server/controller/trisolaris/vtap/vtap_discovery.go b/server/controller/trisolaris/vtap/vtap_discovery.go index 5bc60509e03..6f206f062b8 100644 --- a/server/controller/trisolaris/vtap/vtap_discovery.go +++ b/server/controller/trisolaris/vtap/vtap_discovery.go @@ -606,9 +606,17 @@ func (l *VTapLKData) LookUpMirrorVTapByIP(db *gorm.DB) *VTapLKResult { return nil } + var domainType int + domain, err := dbmgr.DBMgr[models.Domain](db).GetFromLcuuid(host.Domain) + if err != nil { + log.Warning(l.Logf("host(%s) domain(%s) not found", host.Name, host.Domain)) + } else { + domainType = domain.Type + } + var vTapName, launchServer, az, region, lcuuid string var vTapType, launchServerID int - if host.HType == HOST_HTYPE_ESXI { + if host.HType == HOST_HTYPE_ESXI || domainType == CLOUD_TOWER { vTapName = fmt.Sprintf("%s-H%d", host.Name, host.ID) vTapType = VTAP_TYPE_ESXI launchServer = host.IP