Skip to content

feat(scheduler): correct resource accounting for init containers#1773

Open
maishivamhoo123 wants to merge 16 commits into
Project-HAMi:masterfrom
maishivamhoo123:fix/nodelock-time-parsec
Open

feat(scheduler): correct resource accounting for init containers#1773
maishivamhoo123 wants to merge 16 commits into
Project-HAMi:masterfrom
maishivamhoo123:fix/nodelock-time-parsec

Conversation

@maishivamhoo123

@maishivamhoo123 maishivamhoo123 commented Apr 18, 2026

Copy link
Copy Markdown
Member

I fixed the resource accounting logic for pods with Init Containers: the scheduler now correctly calculates the effective request as $max(\sum \text{App Containers}, \text{max}(\text{Init Containers}))$. This prevents incorrect "node full" errors or quota denials for pods that reuse GPU resources during initialization.Technically, I modernized the codebase for Go 1.22+ by:Using the built-in max() function instead of manual if blocks.Implementing range over integers for cleaner loops.Removing redundant type declarations to satisfy staticcheck.Finally, I updated the unit tests in scheduler_test.go and score_test.go. Since the scoring logic now accurately reflects node utilization under the Binpack strategy, I adjusted the expected device UUIDs (e.g., device1 $\rightarrow$ device3) to match the scheduler's optimized selection. These changes ensure the HAMi scheduler is both logically sound and compliant with modern Go standards.
Fixes :- #1667

Summary by CodeRabbit

  • Bug Fixes

    • Improved device scheduling, scoring, and allocation for pods with init containers, including safer usage accounting/rollback, correct slot handling, and clearer failure reporting.
    • Updated admission and resource quota logic to properly evaluate init-container resource requirements and reflect more accurate denial reasons.
    • Made generated reason output deterministic for consistent messaging.
  • Tests

    • Expanded scheduler filtering/scoring and webhook quota tests for init-container scenarios (including insufficiency and tie-handling), with updated expected failure reasons.

@hami-robot

hami-robot Bot commented Apr 18, 2026

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: maishivamhoo123
Once this PR has been reviewed and has the lgtm label, please assign archlitchi for approval. For more information see the Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@hami-robot hami-robot Bot requested a review from lengrongfu April 18, 2026 20:07
@github-actions github-actions Bot added the kind/bug Something isn't working label Apr 18, 2026
@hami-robot hami-robot Bot added the size/L label Apr 18, 2026

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces support for Kubernetes InitContainers within the scheduler and admission webhook. It updates the resource calculation logic in the Filter and fitResourceQuota functions to use the maximum of the largest init container's request and the sum of regular containers' requests, aligning with standard Kubernetes behavior. Additionally, the scoring logic in calcScore now utilizes a node state cloning mechanism to ensure init containers are evaluated against the node's full capacity. Review feedback suggests handling potential errors during JSON unmarshaling and optimizing the cloning process to avoid unnecessary performance overhead for pods that do not contain init containers.

Comment thread pkg/scheduler/score.go Outdated
Comment thread pkg/scheduler/score.go Outdated
@codecov

codecov Bot commented Apr 18, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 69.93464% with 92 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
pkg/scheduler/score.go 74.50% 54 Missing and 11 partials ⚠️
pkg/scheduler/webhook.go 46.15% 12 Missing and 2 partials ⚠️
pkg/scheduler/scheduler.go 50.00% 9 Missing and 3 partials ⚠️
pkg/device/common/common.go 0.00% 1 Missing ⚠️
Flag Coverage Δ
unittests 59.64% <69.93%> (+0.11%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
pkg/device/common/common.go 50.00% <0.00%> (-3.34%) ⬇️
pkg/scheduler/scheduler.go 52.84% <50.00%> (-0.05%) ⬇️
pkg/scheduler/webhook.go 67.61% <46.15%> (-8.58%) ⬇️
pkg/scheduler/score.go 77.67% <74.50%> (-14.70%) ⬇️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@maishivamhoo123

Copy link
Copy Markdown
Member Author

@archlitchi , @DSFans2014 , @Shouren and @member can you please review this PR.

@Shouren

Shouren commented Apr 21, 2026

Copy link
Copy Markdown
Member

@archlitchi , @DSFans2014 , @Shouren and @member can you please review this PR.

@maishivamhoo123 I am busy testing the recent updates for k8s-dra-driver, i will be back when the tests are finished.

@maishivamhoo123

maishivamhoo123 commented Apr 26, 2026

Copy link
Copy Markdown
Member Author

@Shouren can you please check this google docs.

@maishivamhoo123

Copy link
Copy Markdown
Member Author
Screenshot 2026-04-27 021917

@Shouren can you please check this [https://docs.google.com/document/d/1nX1FlJEiZ8lNKOAOuZHtiUs4OSwj5VJxVE1cU0y1LEU/edit?usp=sharing](Google Docs).

@Shouren

Shouren commented Apr 28, 2026

Copy link
Copy Markdown
Member

@Shouren can you please check this google docs.

@maishivamhoo123 Can you show me the Pod Annotations after a successful scheduling?

Comment thread pkg/scheduler/score.go Outdated
@maishivamhoo123

Copy link
Copy Markdown
Member Author

@Shouren can you please review this PR?

@archlitchi

Copy link
Copy Markdown
Member

hi, since i just got this PR merged:#1818, does this one needs to adjust?

@maishivamhoo123

Copy link
Copy Markdown
Member Author

hi, since i just got this PR merged:#1818, does this one needs to adjust?

Yes i need to change the JSON serialization logic to deep copy function i will change and let you know . Thank you!

Signed-off-by: maishivamhoo123 <maishivamhoo@gmail.com>
Signed-off-by: maishivamhoo123 <maishivamhoo@gmail.com>
Signed-off-by: maishivamhoo123 <maishivamhoo@gmail.com>
Signed-off-by: maishivamhoo123 <maishivamhoo@gmail.com>
Signed-off-by: maishivamhoo123 <maishivamhoo@gmail.com>
@maishivamhoo123 maishivamhoo123 force-pushed the fix/nodelock-time-parsec branch from d443f9e to f6cc3d6 Compare May 6, 2026 09:28
Signed-off-by: maishivamhoo123 <maishivamhoo@gmail.com>
@archlitchi

Copy link
Copy Markdown
Member

CC @DSFans2014

@wawa0210

wawa0210 commented Jul 2, 2026

Copy link
Copy Markdown
Member

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


CC @DSFans2014

@DSFans2014 DSFans2014 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@maishivamhoo123 It looks like the PR title doesn't correspond to the changes being made.

Comment thread pkg/scheduler/scheduler.go Outdated
Comment thread pkg/scheduler/score.go Outdated
Comment thread pkg/scheduler/score.go Outdated

@DSFans2014 DSFans2014 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we need add special handling before AddPod? Otherwise, resources from both initContainers and containers will be counted.

for _, val := range device.GetDevices() {
val.PatchAnnotations(args.Pod, &annotations, m.Devices)
}
added := s.podManager.AddPod(args.Pod, m.NodeID, m.Devices)
if added {
s.quotaManager.AddUsage(args.Pod, m.Devices)
}

@maishivamhoo123 maishivamhoo123 changed the title fix/nodelock-time-parsec-panic feat(scheduler): correct resource accounting for init containers Jul 3, 2026
@github-actions github-actions Bot added kind/feature new function and removed kind/bug Something isn't working labels Jul 3, 2026

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 3

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@pkg/scheduler/scheduler.go`:
- Around line 161-176: The init-container alias stripping path in scheduler
logic is calling stripInitContainerAliasSlots with nil resource requirements,
which disables the slot-count guard and can misalign pod quota accounting.
Update the allInitDone branch in scheduler’s pod handling to pass the existing
resourceReqs into stripInitContainerAliasSlots instead of nil so the guard
remains active for both onAddPod and onUpdatePod paths.

In `@pkg/scheduler/score.go`:
- Around line 360-371: The peak/commit accounting in score.go is using slice
position from nodeCopy.Devices.DeviceLists, but fitInDevices can reorder that
slice in place and cause updates to land on the wrong device. Update the
init-container peak loop and the final commit loop to look up and write usage by
Device.ID instead of the pi index, using the existing fitInDevices/device
bookkeeping in score.go to keep peakUsage and committed usage aligned with the
correct device regardless of sort order or heterogeneous nodes.
- Around line 105-124: Restore the rollback logic in score.go so it does not
depend on the current DeviceLists order after sort.Sort(node.Devices) mutates
it. Update the devSnapshot captured in the score function to store the
*device.DeviceUsage for each entry, and change rollbackAll to write Used,
Usedcores, and Usedmem back through that saved pointer instead of
node.Devices.DeviceLists[i].Device.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 44b832f3-8107-4868-a0ae-19df1b048733

📥 Commits

Reviewing files that changed from the base of the PR and between b28b135 and 55556da.

📒 Files selected for processing (5)
  • pkg/device/common/common.go
  • pkg/scheduler/scheduler.go
  • pkg/scheduler/scheduler_test.go
  • pkg/scheduler/score.go
  • pkg/scheduler/score_test.go
🚧 Files skipped from review as they are similar to previous changes (1)
  • pkg/scheduler/scheduler_test.go

Comment thread pkg/scheduler/scheduler.go
Comment thread pkg/scheduler/score.go
Comment thread pkg/scheduler/score.go Outdated

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (2)
pkg/scheduler/webhook.go (2)

189-195: 🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

Avoid pre-scaling memoryReq here. FitQuota already multiplies the quota limit by memoryFactor, so scaling the request again makes the admission check stricter than intended when memoryFactor > 1. Pass the raw request through and let FitQuota apply the factor.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@pkg/scheduler/webhook.go` around lines 189 - 195, The quota admission path in
webhook.go is double-applying the memory factor by pre-scaling memoryReq before
calling FitQuota. Update the logic around the memory adjustment and the FitQuota
call so memoryReq remains the raw request value, and rely on FitQuota to apply
memoryFactor itself; keep the existing logging in sync with the unscaled request
for the relevant webhook flow.

160-171: 🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

Init-container GPU requests above 1 are skipped in quota accounting pkg/scheduler/webhook.go:160-171
The req == 1 guard drops init containers requesting 2+ GPUs, so their memory/CPU never contributes to initMemoryReq/initCoresReq. Match the regular-container branch here, or reject multi-GPU init requests consistently.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@pkg/scheduler/webhook.go` around lines 160 - 171, The init-container handling
in webhook logic is skipping any container whose GPU request is greater than 1
because of the req == 1 guard, so its memory and CPU never get counted into
initMemoryReq/initCoresReq. Update the InitContainers loop in getRequest-based
quota accounting to match the regular-container branch by including multi-GPU
init containers, or apply the same validation/rejection consistently before this
block so the scheduler behavior stays aligned.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Outside diff comments:
In `@pkg/scheduler/webhook.go`:
- Around line 189-195: The quota admission path in webhook.go is double-applying
the memory factor by pre-scaling memoryReq before calling FitQuota. Update the
logic around the memory adjustment and the FitQuota call so memoryReq remains
the raw request value, and rely on FitQuota to apply memoryFactor itself; keep
the existing logging in sync with the unscaled request for the relevant webhook
flow.
- Around line 160-171: The init-container handling in webhook logic is skipping
any container whose GPU request is greater than 1 because of the req == 1 guard,
so its memory and CPU never get counted into initMemoryReq/initCoresReq. Update
the InitContainers loop in getRequest-based quota accounting to match the
regular-container branch by including multi-GPU init containers, or apply the
same validation/rejection consistently before this block so the scheduler
behavior stays aligned.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: d31b7e7f-12a3-418e-93ff-38a7331885bb

📥 Commits

Reviewing files that changed from the base of the PR and between 55556da and 3b3ca97.

📒 Files selected for processing (4)
  • pkg/scheduler/scheduler.go
  • pkg/scheduler/scheduler_test.go
  • pkg/scheduler/webhook.go
  • pkg/scheduler/webhook_test.go
🚧 Files skipped from review as they are similar to previous changes (3)
  • pkg/scheduler/webhook_test.go
  • pkg/scheduler/scheduler_test.go
  • pkg/scheduler/scheduler.go

Signed-off-by: maishivamhoo123 <maishivamhoo@gmail.com>
Signed-off-by: maishivamhoo123 <maishivamhoo@gmail.com>
Comment thread pkg/scheduler/webhook.go Outdated
if ok {
if memReq, ok := getRequest(&ctr, memResourceName); ok {
memoryReq += memReq * req
appMemoryReq += memReq

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why delete the req

@maishivamhoo123 maishivamhoo123 Jul 6, 2026

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@DSFans2014 Fixed – the regular container loop now multiplies memory/core requests by the GPU count (req). The init container loop also uses max(..., memReq * req). The test TestFitResourceQuota confirms correct accounting for multi‑GPU pods.

Comment thread pkg/scheduler/score.go
}

// stripInitContainerAliasSlots removes the device allocations of init containers from the
// PodDevices structure, keeping only regular (non-init) container allocations.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here we exclude init containers when calculating resources. If an init container requests more resources than the regular containers, it might cause the quota to be exceeded.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@DSFans2014 The stripping is safe because the admission quota check already uses max(initReq, appReq), so the worst‑case resource demand is covered. Stripping only happens after all init containers have terminated, so ongoing usage correctly reflects only the running regular containers. The scheduler also validates both stages independently, preventing any oversubscription.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@maishivamhoo123 reminder: pls adhere to the new rules regarding PRs, descriptions, responses, and codes.

#1998 (comment)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Currently, AddUsage and AddPod only accounts for resource usage from regular containers. Consider a scenario where the quota is set to 30G. An init container requests 20G, and the regular containers request 10G, but we only count the 10G. When the init container is running, if another pod requests 20G, would that exceed the quota?

usageDevices := stripInitContainerAliasSlots(args.Pod, resourceReqs, m.Devices)

added := s.podManager.AddPod(args.Pod, m.NodeID, usageDevices)
if added {
	s.quotaManager.AddUsage(args.Pod, usageDevices)
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Stripping only happens after all init containers have terminated

How do we ensure this works?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you @DSFans2014 for raising this issue i am really sorry. I didn't get this thought ,
i generated this issue on my fake gpu environment ya it is there i will see it and let you know ?

apiVersion: v1
kind: ResourceQuota
metadata:
  name: test-quota
  namespace: default
spec:
  hard:
    nvidia.com/gpumem: "30000"

resourcequota/test-quota created

apiVersion: v1
kind: Pod
metadata:
  name: test-init-quota-pod1
spec:
  initContainers:
  - name: init-heavy
    image: busybox
    command: ["sleep", "120"]   # keep init running long enough
    env:
    - name: CUDA_DISABLE_CONTROL
      value: "true"
    resources:
      limits:
        nvidia.com/gpu: 1
        nvidia.com/gpumem: "20000"
  containers:
  - name: app
    image: busybox
    command: ["sleep", "3600"]
    env:
    - name: CUDA_DISABLE_CONTROL
      value: "true"
    resources:
      limits:
        nvidia.com/gpu: 1
        nvidia.com/gpumem: "10000"
  restartPolicy: Never

pod/test-init-quota-pod1 created

apiVersion: v1
kind: Pod
metadata:
  name: test-init-quota-pod2
spec:
  initContainers:
  - name: init-heavy
    image: busybox
    command: ["sleep", "120"]
    env:
    - name: CUDA_DISABLE_CONTROL
      value: "true"
    resources:
      limits:
        nvidia.com/gpu: 1
        nvidia.com/gpumem: "20000"
  containers:
  - name: app
    image: busybox
    command: ["sleep", "3600"]
    env:
    - name: CUDA_DISABLE_CONTROL
      value: "true"
    resources:
      limits:
        nvidia.com/gpu: 1
        nvidia.com/gpumem: "10000"
  restartPolicy: Never

shivam_kumar@LAPTOP-NMKA92EB:~/HAMi$ kubectl get pods test-init-quota-pod1 test-init-quota-pod2
kubectl describe pod test-init-quota-pod2 | grep -A5 Events
NAME READY STATUS RESTARTS AGE
test-init-quota-pod1 0/1 Init:0/1 0 18s
test-init-quota-pod2 0/1 Init:0/1 0 7s
Events:
Type Reason Age From Message


Normal Scheduled 7s hami-scheduler Successfully assigned default/test-init-quota-pod2 to nvml-mock-test-control-plane
Normal FilteringSucceed 8s hami-scheduler find fit node(nvml-mock-test-control-plane), 0 nodes not fit, 1 nodes fit(nvml-mock-test-control-plane:1.17)
Normal BindingSucceed 8s hami-scheduler Successfully binding node [nvml-mock-test-control-plane] to default/test-init-quota-pod2
shivam_kumar@LAPTOP-NMKA92EB:~/HAMi$

i will fix it and let you know?
Thank you!

Signed-off-by: maishivamhoo123 <maishivamhoo@gmail.com>

@saiyam1814 saiyam1814 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for driving this — the max-vs-sum split for init containers is the right core idea, and it fixes a real over-reservation problem (#1942). One design gap and one PR-hygiene note, neither raised in the existing threads:

1. Restartable init containers (sidecars) break the max-pool assumption.

Since Kubernetes 1.28 (stable in 1.33), an init container with restartPolicy: Always is a sidecar: it keeps running for the pod's entire lifetime, concurrently with app containers. Kubernetes' own effective-request accounting therefore sums sidecars with app containers instead of max-pooling them with regular init containers.

This PR treats all entries of pod.Spec.InitContainers uniformly, which breaks in two places:

  • podInitContainerMaxRequest max-pools a GPU-requesting sidecar with the other init containers. A sidecar holds its GPU while the app containers run, so its request must be added to the app-container sum. As written, a pod with a GPU sidecar under-reserves and can overcommit the node — the same class of bug this PR is fixing for the opposite direction.
  • stripInitContainerAliasSlots is gated on every InitContainerStatuses entry being Terminated with exit code 0. A sidecar never terminates, so for any pod containing one, the strip never fires — the max-pool reservation for the other (terminated) init containers is held for the pod's lifetime.

Suggestion: given sidecar + GPU is likely rare today, the minimal correct v1 is to detect restartPolicy: Always on GPU-requesting init containers and treat them as app containers in both the accounting (podAppContainerTotalRequest) and the strip logic (never strip their slots, and exclude them from the all-terminated gate). Alternatively, explicitly reject GPU requests in restartable init containers at admission with a clear error and a TODO — silent mis-accounting is the only option that shouldn't ship.

Either way, a test case with restartPolicy: Always would lock the chosen semantics in.

2. Consider splitting the unrelated cleanups out of this PR.

The comment deletions in NewScheduler, the klog.Warningklog.ErrorS change, and the removal of recordScheduleFilterResultEvent for pods with no HAMi resources are all reasonable on their own, but they're invisible inside a 1.7k-line feature diff — and the last one is a user-visible behavior change (pods no longer get a FilteringFailed event) that deserves its own review. A small separate PR would merge quickly and keep this one focused on the init-container semantics.

@mesutoezdil

Copy link
Copy Markdown
Contributor

Thanks for driving this — the max-vs-sum split for init containers is the right core idea, and it fixes a real over-reservation problem (#1942). One design gap and one PR-hygiene note, neither raised in the existing threads:

1. Restartable init containers (sidecars) break the max-pool assumption.

Since Kubernetes 1.28 (stable in 1.33), an init container with restartPolicy: Always is a sidecar: it keeps running for the pod's entire lifetime, concurrently with app containers. Kubernetes' own effective-request accounting therefore sums sidecars with app containers instead of max-pooling them with regular init containers.

This PR treats all entries of pod.Spec.InitContainers uniformly, which breaks in two places:

  • podInitContainerMaxRequest max-pools a GPU-requesting sidecar with the other init containers. A sidecar holds its GPU while the app containers run, so its request must be added to the app-container sum. As written, a pod with a GPU sidecar under-reserves and can overcommit the node — the same class of bug this PR is fixing for the opposite direction.
  • stripInitContainerAliasSlots is gated on every InitContainerStatuses entry being Terminated with exit code 0. A sidecar never terminates, so for any pod containing one, the strip never fires — the max-pool reservation for the other (terminated) init containers is held for the pod's lifetime.

Suggestion: given sidecar + GPU is likely rare today, the minimal correct v1 is to detect restartPolicy: Always on GPU-requesting init containers and treat them as app containers in both the accounting (podAppContainerTotalRequest) and the strip logic (never strip their slots, and exclude them from the all-terminated gate). Alternatively, explicitly reject GPU requests in restartable init containers at admission with a clear error and a TODO — silent mis-accounting is the only option that shouldn't ship.

Either way, a test case with restartPolicy: Always would lock the chosen semantics in.

2. Consider splitting the unrelated cleanups out of this PR.

The comment deletions in NewScheduler, the klog.Warningklog.ErrorS change, and the removal of recordScheduleFilterResultEvent for pods with no HAMi resources are all reasonable on their own, but they're invisible inside a 1.7k-line feature diff — and the last one is a user-visible behavior change (pods no longer get a FilteringFailed event) that deserves its own review. A small separate PR would merge quickly and keep this one focused on the init-container semantics.

@saiyam1814 reminder: pls adhere to the new rules regarding responses (and codes, prs, descriptions).

#1998 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants