Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Automated cherry pick of #17606: fix(region): set scheduler failed brand unknown #17608

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions pkg/compute/models/disks.go
Original file line number Diff line number Diff line change
Expand Up @@ -2452,6 +2452,11 @@ func (manager *SDiskManager) FetchCustomizeColumns(
snps, _ := snapshots[diskIds[i]]
rows[i].ManualSnapshotCount = len(snps)
}
disk := objs[i].(*SDisk)
if len(disk.StorageId) == 0 && disk.Status == api.VM_SCHEDULE_FAILED {
rows[i].Brand = "Unknown"
rows[i].Provider = "Unknown"
}
}

return rows
Expand Down
6 changes: 5 additions & 1 deletion pkg/compute/models/guest_queries.go
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,11 @@ func (manager *SGuestManager) FetchCustomizeColumns(
}

for i := range rows {
rows[i] = objs[i].(*SGuest).moreExtraInfo(ctx, rows[i], userCred, query, fields, isList)
rows[i] = guests[i].moreExtraInfo(ctx, rows[i], userCred, query, fields, isList)
if len(guests[i].HostId) == 0 && guests[i].Status == api.VM_SCHEDULE_FAILED {
rows[i].Brand = "Unknown"
rows[i].Provider = "Unknown"
}
}

return rows
Expand Down