@@ -211,12 +211,15 @@ part of this proposal.
211
211
Perhaps `kubectl describe resourceslices` can be extended to include the
212
212
additional information. For now this is out of scope.
213
213
214
- Creating a ResourceSlicePatch is racing with on-going scheduling attempts,
215
- which is unavoidable. Removing a device from a ResourceSlice has the same
216
- problem.
217
-
218
214
### Risks and Mitigations
219
215
216
+ Creating a ResourceSlicePatch is racing with on-going scheduling attempts.
217
+ This is unavoidable. Removing a device from a ResourceSlice has the same
218
+ problem: updates need to reach the scheduler before it can consider them.
219
+ Evaluating a patch on the client-side instead of [having a controller update
220
+ slices]((#storing-result-of-patching-in-resourceslice) mitigates this risk by
221
+ shortening the time window where updates must be sent to the scheduler.
222
+
220
223
From a security perspective, permission to patch device attributes is
221
224
expected to be limited to privileged users who already have the ability to add
222
225
or remove DRA drivers, so there won't be a substantial difference.
@@ -277,9 +280,14 @@ type DevicePatch struct {
277
280
// capacity, the value of the DevicePatch is used. If multiple
278
281
// different DevicePatches match the same device, then the one with
279
282
// the highest priority wins. If priorities are equal, the older
280
- // patch wins. This ensures that adding a new patch does not
283
+ // patch wins, where "older" is determined based on the creation time.
284
+ // This ensures that adding a new patch does not
281
285
// accidentally change the effect of some existing patch unless
282
- // that is clearly intended according to the priority.
286
+ // that is clearly intended according to the priority. Updates
287
+ // do not change the creation time, so it could still happen that
288
+ // a more recent change is preferred because it happens to be in
289
+ // an older DevicePatch. Overall it is better to set the
290
+ // priority to different values to avoid such ambiguities.
283
291
//
284
292
// +optional
285
293
Priority *int
0 commit comments