fix(host): no vm_scaling_group_id in hostmetrics (#14977)

This commit is contained in:
Zexi Li
2022-09-15 01:16:35 +08:00
committed by GitHub
parent 6c7de082fd
commit 33a9cc1d1c
3 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -779,7 +779,7 @@ type GuestJsonDesc struct {
UserData string `json:"user_data"`
PendingDeleted bool `json:"pending_deleted"`
ScallingGroupId string `json:"scalling_group_id"`
ScalingGroupId string `json:"scaling_group_id"`
// baremetal
DiskConfig jsonutils.JSONObject `json:"disk_config"`
+1 -1
View File
@@ -4476,7 +4476,7 @@ func (self *SGuest) GetJsonDescAtHypervisor(ctx context.Context, host *SHost) *a
// add scaling group
sggs, err := ScalingGroupGuestManager.Fetch("", self.Id)
if err == nil && len(sggs) > 0 {
desc.ScallingGroupId = sggs[0].ScalingGroupId
desc.ScalingGroupId = sggs[0].ScalingGroupId
}
return desc
+1 -1
View File
@@ -188,7 +188,7 @@ func (s *SGuestMonitorCollector) GetGuests() map[string]*SGuestMonitor {
delete(s.monitors, guestId)
gm, err = NewGuestMonitor(guestName, guestId, pid, nicsDesc, int(vcpuCount))
if err != nil {
log.Errorln(err)
log.Errorf("NewGuestMonitor for %s(%s), pid: %d, nics: %s", guestName, guestId, pid, jsonutils.Marshal(nics).String())
return true
}
}