From 0c55f7df7f2dd578c3a0ef9bf7cbe8d6057f0c91 Mon Sep 17 00:00:00 2001 From: Gaurav Ghildiyal Date: Wed, 9 Jul 2025 01:10:19 -0700 Subject: [PATCH] fix: Ignore devices not managed by DraNet in ResourceClaim --- pkg/driver/dra_hooks.go | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/pkg/driver/dra_hooks.go b/pkg/driver/dra_hooks.go index 61bffb73..1c3cc141 100644 --- a/pkg/driver/dra_hooks.go +++ b/pkg/driver/dra_hooks.go @@ -125,6 +125,16 @@ func (np *NetworkDriver) prepareResourceClaim(ctx context.Context, claim *resour var errorList []error charDevices := sets.New[string]() for _, result := range claim.Status.Allocation.Devices.Results { + // A single ResourceClaim can have devices managed by distinct DRA + // drivers. One common use case for this is device topology alignment + // (think NIC and GPU alignment). In such cases, we should ignore the + // devices which are not managed by our driver. + // + // TODO: Test running a different driver alongside DraNet in e2e. This + // requires an easy way to spin up a mock DRA driver. + if result.Driver != np.driverName { + continue + } requestName := result.Request netconf := apis.NetworkConfig{} for _, config := range claim.Status.Allocation.Devices.Config {