Skip to content

Commit

Permalink
Merge pull request #656 from sapcc/liquid-nova-more-debug-output
Browse files Browse the repository at this point in the history
liquid-nova: more debug output related to trait selection
  • Loading branch information
majewsky authored Feb 6, 2025
2 parents 7a7ed7e + 051259a commit 3a653c2
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions internal/liquids/nova/capacity.go
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,7 @@ func (l *Logic) ScanCapacity(ctx context.Context, req liquid.ServiceCapacityRequ
if err != nil {
return liquid.ServiceCapacityReport{}, err
}
logg.Debug("pooled extra specs = %v", pooledExtraSpecs)
if maxRootDiskSize == 0 {
return liquid.ServiceCapacityReport{}, errors.New("pooled capacity requested, but there are no matching flavors")
}
Expand Down Expand Up @@ -239,10 +240,10 @@ func (l *Logic) ScanCapacity(ctx context.Context, req liquid.ServiceCapacityRequ
hypervisorsByAZ[h.AvailabilityZone] = append(hypervisorsByAZ[h.AvailabilityZone], bh)

hc := h.PartialCapacity()
logg.Debug("%s in %s reports %s capacity, %s used, %d nodes, %s max unit", h.Hypervisor.Description(), h.AvailabilityZone,
logg.Debug("%s in %s reports %s capacity, %s used, %d nodes, %s max unit, traits: %v", h.Hypervisor.Description(), h.AvailabilityZone,
BinpackVector[uint64]{VCPUs: hc.VCPUs.Capacity, MemoryMB: hc.MemoryMB.Capacity, LocalGB: hc.LocalGB.Capacity},
BinpackVector[uint64]{VCPUs: hc.VCPUs.Usage, MemoryMB: hc.MemoryMB.Usage, LocalGB: hc.LocalGB.Usage},
len(bh.Nodes), bh.Nodes[0].Capacity,
len(bh.Nodes), bh.Nodes[0].Capacity, h.Traits,
)
} else {
shadowedHypervisorsByAZ[h.AvailabilityZone] = append(shadowedHypervisorsByAZ[h.AvailabilityZone], h)
Expand Down

0 comments on commit 3a653c2

Please sign in to comment.