Skip to content

docs(troubleshooting): add scheduler filter reason code reference - #767

Open
ipsitapp8 wants to merge 1 commit into
Project-HAMi:masterfrom
ipsitapp8:docs/scheduler-filter-reason-reference
Open

docs(troubleshooting): add scheduler filter reason code reference#767
ipsitapp8 wants to merge 1 commit into
Project-HAMi:masterfrom
ipsitapp8:docs/scheduler-filter-reason-reference

Conversation

@ipsitapp8

@ipsitapp8 ipsitapp8 commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

What

Adds a troubleshooting page for the reason codes the HAMi scheduler puts in FilteringFailed events when a Pod won't schedule.

Why

When a Pod that requests HAMi resources stays Pending, the scheduler has already said why:

Warning  FilteringFailed  16s  hami-scheduler  2 nodes CardInsufficientMemory(node-a,node-b)

There are 17 of these codes in pkg/device/common/common.go and the site documents none of them. The closest page is developers/scheduler-event-log.md, but that one is a design proposal written in future tense and it only lists 7. So if you hit CardTimeSlicingExhausted or AllocatedCardsInsufficientRequest, there is nowhere to look it up.

What's in the page

  • All 17 codes with what triggers each one and how to fix it, grouped by the stage where the scheduler rejects the card.
  • How to read both formats: the event (N nodes <Code>(node-a,node-b)) and the scheduler log line (NodeUnfitPod ... reason="3/8 CardInsufficientMemory").
  • Three things that are easy to get wrong. One event is emitted per reason code, so there is usually more than one to read. The events only appear when no node fits at all. And AllocatedCardsInsufficientRequest counts the cards that fit, not the ones that didn't.
  • Turning on -v=5 for per-device detail, how much log volume that costs, and how to revert.

Notes

Everything was checked against HAMi v2.9.0 source and the page says which version it reflects. Added as a new file instead of editing troubleshooting.md so it doesn't clash with #728. Chinese translation included. Not backported to versioned_docs/ since it's new content.

markdownlint, prettier --check and docusaurus build (en + zh) all pass locally.

@hami-robot

hami-robot Bot commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: ipsitapp8
Once this PR has been reviewed and has the lgtm label, please assign wawa0210 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

@netlify

netlify Bot commented Aug 12, 2026

Copy link
Copy Markdown

Deploy Preview for project-hami ready!

Name Link
🔨 Latest commit 3e72faa
🔍 Latest deploy log https://app.netlify.com/projects/project-hami/deploys/6a7c3723d5182500084c4b73
😎 Deploy Preview https://deploy-preview-767--project-hami.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

@coderabbitai

coderabbitai Bot commented Aug 12, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@ipsitapp8, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 58 minutes

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 5a3247da-6356-4210-97c9-839f74c26fb1

📥 Commits

Reviewing files that changed from the base of the PR and between fb6398d and 3e72faa.

📒 Files selected for processing (1)
  • docs/troubleshooting/scheduling-failures.md
📝 Walkthrough

Walkthrough

Added English and Chinese documentation for diagnosing HAMi scheduling failures. The changes cover Pending Pods, FilteringFailed events, reason codes, scheduler logs, device-level diagnostics, remediation steps, related links, and sidebar navigation.

Changes

Scheduling Failure Documentation

Layer / File(s) Summary
Scheduling failure diagnostic guide
docs/troubleshooting/scheduling-failures.md
Added guidance for inspecting events and logs, interpreting reason codes, enabling -v=5 diagnostics, handling messages without reason codes, and following the diagnostic flow.
Documentation links and navigation
docs/developers/scheduler-event-log.md, sidebars.js
Linked Pending Pod troubleshooting guidance from the scheduler event log page and added the troubleshooting page to the sidebar.
Chinese troubleshooting localization
i18n/zh/docusaurus-plugin-content-docs/current/developers/scheduler-event-log.md, i18n/zh/docusaurus-plugin-content-docs/current/troubleshooting/scheduling-failures.md
Added Chinese translations for the scheduler event log link and the scheduling failure troubleshooting guide.

Estimated code review effort: 2 (Simple) | ~10 minutes

Suggested labels: kind/documentation

Suggested reviewers: rootsongjc, windsonsea

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the main change: adding a scheduler filter reason-code reference for troubleshooting.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot added the kind/documentation Improvements or additions to documentation label Aug 12, 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 `@docs/troubleshooting/scheduling-failures.md`:
- Line 12: Align the HAMi reason-code documentation with v2.9.0: in
docs/troubleshooting/scheduling-failures.md at lines 12 and 95-96, update the
introduction to link to the v2.9.0 source and state 16 codes, then remove
CardMigTopologyInfeasible from the table. Apply the same introduction and table
changes in
i18n/zh/docusaurus-plugin-content-docs/current/troubleshooting/scheduling-failures.md
at lines 13 and 96-97.
- Around line 115-119: Update all four documented Helm upgrade commands in
docs/troubleshooting/scheduling-failures.md lines 115-119 and 131-136, and
i18n/zh/docusaurus-plugin-content-docs/current/troubleshooting/scheduling-failures.md
lines 115-119 and 132-137: pin each chart with the documented version and
preserve the complete existing scheduler.extender.extraArgs array while adding
the -v=5 or -v=4 flag, rather than replacing the array.
- Around line 106-107: Update the ExclusiveDeviceAllocateConflict description in
docs/troubleshooting/scheduling-failures.md lines 106-107 and
i18n/zh/docusaurus-plugin-content-docs/current/troubleshooting/scheduling-failures.md
lines 107-108 to describe only the v2.9.0 case where k.Coresreq == 100 is
requested on a card that already has tasks; remove the mutex scheduler trigger
and unsupported general shared-request wording from both locales.
🪄 Autofix

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: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: ad886529-4457-4b7c-adaa-7db0e2d3b81c

📥 Commits

Reviewing files that changed from the base of the PR and between cc9cf48 and fb6398d.

📒 Files selected for processing (5)
  • docs/developers/scheduler-event-log.md
  • docs/troubleshooting/scheduling-failures.md
  • i18n/zh/docusaurus-plugin-content-docs/current/developers/scheduler-event-log.md
  • i18n/zh/docusaurus-plugin-content-docs/current/troubleshooting/scheduling-failures.md
  • sidebars.js


:::info

Reason codes are defined in `pkg/device/common/common.go` in the [HAMi repository](https://github.com/Project-HAMi/HAMi). The list below reflects HAMi v2.9.0. Older versions emit a subset of these codes; a Pod scheduled by an older scheduler may show free-form messages instead.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -e
printf '%s\n' '--- tracked documentation files ---'
git ls-files 'docs/troubleshooting/scheduling-failures.md' 'i18n/zh/docusaurus-plugin-content-docs/current/troubleshooting/scheduling-failures.md'
printf '%s\n' '--- English context ---'
sed -n '1,110p' docs/troubleshooting/scheduling-failures.md
printf '%s\n' '--- Chinese context ---'
sed -n '1,110p' i18n/zh/docusaurus-plugin-content-docs/current/troubleshooting/scheduling-failures.md
printf '%s\n' '--- HAMi v2.9.0 reason constants ---'
curl -fsSL https://raw.githubusercontent.com/Project-HAMi/HAMi/v2.9.0/pkg/device/common/common.go |
  grep -n -E 'Reason|Card|Mig|const|iota' | head -120
printf '%s\n' '--- HAMi v2.9.0 source status ---'
curl -fsSL -o /tmp/hami-v2.9.0-common.go \
  https://raw.githubusercontent.com/Project-HAMi/HAMi/v2.9.0/pkg/device/common/common.go
sha256sum /tmp/hami-v2.9.0-common.go

Repository: Project-HAMi/website

Length of output: 15122


🏁 Script executed:

#!/bin/bash
set -e
printf '%s\n' '--- complete HAMi v2.9.0 declaration block ---'
sed -n '20,42p' /tmp/hami-v2.9.0-common.go
printf '%s\n' '--- parsed string-valued constants in the block ---'
python3 - <<'PY'
from pathlib import Path
import re
text = Path('/tmp/hami-v2.9.0-common.go').read_text()
block = re.search(r'const\s*\((.*?)\n\)', text, re.S).group(1)
items = re.findall(r'^\s*(\w+)\s*=\s*"([^"]+)"', block, re.M)
print(f'count={len(items)}')
for name, value in items:
    print(f'{name}={value}')
print('CardMigTopologyInfeasible present:', 'CardMigTopologyInfeasible' in text)
PY
printf '%s\n' '--- referenced documentation targets ---'
for f in \
  docs/userguide/device-supported.md \
  docs/userguide/nvidia-device/dynamic-mig-support.md \
  i18n/zh/docusaurus-plugin-content-docs/current/userguide/device-supported.md \
  i18n/zh/docusaurus-plugin-content-docs/current/userguide/nvidia-device/dynamic-mig-support.md
do
  if git ls-files --error-unmatch "$f" >/dev/null 2>&1; then
    printf 'present %s\n' "$f"
  else
    printf 'missing %s\n' "$f"
  fi
done
printf '%s\n' '--- matching reason-code uses in v2.9.0 source ---'
grep -R -n --exclude-dir=.git 'CardMigTopologyInfeasible' /tmp/hami-v2.9.0-common.go docs i18n/zh/docusaurus-plugin-content-docs/current 2>/dev/null || true

Repository: Project-HAMi/website

Length of output: 3039


Align the reason-code documentation with HAMi v2.9.0.

HAMi v2.9.0 defines 16 reason constants and does not define CardMigTopologyInfeasible. Update the English and Chinese introductions to link to the v2.9.0 source and state 16 codes. Remove the unsupported row from both tables or move it to a matching HAMi version.

🧰 Tools
🪛 LanguageTool

[grammar] ~12-~12: Ensure spelling is correct
Context: ...ommon/common.go` in the HAMi repository. The list below reflects HAMi v2.9.0. Ol...

(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)

📍 Affects 2 files
  • docs/troubleshooting/scheduling-failures.md#L12-L12 (this comment)
  • docs/troubleshooting/scheduling-failures.md#L95-L96
  • i18n/zh/docusaurus-plugin-content-docs/current/troubleshooting/scheduling-failures.md#L13-L13
  • i18n/zh/docusaurus-plugin-content-docs/current/troubleshooting/scheduling-failures.md#L96-L97
🤖 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 `@docs/troubleshooting/scheduling-failures.md` at line 12, Align the HAMi
reason-code documentation with v2.9.0: in
docs/troubleshooting/scheduling-failures.md at lines 12 and 95-96, update the
introduction to link to the v2.9.0 source and state 16 codes, then remove
CardMigTopologyInfeasible from the table. Apply the same introduction and table
changes in
i18n/zh/docusaurus-plugin-content-docs/current/troubleshooting/scheduling-failures.md
at lines 13 and 96-97.

Source: MCP tools

Comment on lines +106 to +107
| `ExclusiveDeviceAllocateConflict` | Exclusive use was requested for a card that is already shared, or a shared request hit a card held exclusively. | Raised either when `nvidia.com/gpucores: 100` is requested on a card with existing tasks, or when the `mutex` GPU scheduler policy is in effect. See [Scheduling policy](../userguide/nvidia-device/scheduling-policy.md). |
| `ResourceQuotaNotFit` | The allocation would exceed the namespace's HAMi `ResourceQuota`. | A cluster-capacity problem in disguise: the cards are free, the namespace budget is not. See [Using ResourceQuota](../userguide/nvidia-device/using-resourcequota.md). |

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -eu
printf '%s\n' '--- candidate files ---'
git ls-files | rg '(^|/)(scheduling-failures\.md|device\.go)$|nvidia/.*/device\.go$' | head -80
printf '%s\n' '--- documentation context ---'
for f in docs/troubleshooting/scheduling-failures.md \
  i18n/zh/docusaurus-plugin-content-docs/current/troubleshooting/scheduling-failures.md; do
  if [ -f "$f" ]; then
    printf '\n--- %s ---\n' "$f"
    sed -n '1,145p' "$f"
  fi
done
printf '%s\n' '--- local reason-code references ---'
rg -n -C 3 'ExclusiveDeviceAllocateConflict|ResourceQuotaNotFit|mutex|gpucores' --glob '*.go' --glob '*.md' --glob '*.yaml' --glob '*.yml' . | head -300

Repository: Project-HAMi/website

Length of output: 48176


🏁 Script executed:

#!/bin/bash
set -eu
tmpdir="$(mktemp -d)"
trap 'rm -rf "$tmpdir"' EXIT

for spec in \
  "device.go|https://raw.githubusercontent.com/Project-HAMi/HAMi/refs/tags/v2.9.0/pkg/device/nvidia/device.go" \
  "score.go|https://raw.githubusercontent.com/Project-HAMi/HAMi/refs/tags/v2.9.0/pkg/scheduler/score.go" \
  "common.go|https://raw.githubusercontent.com/Project-HAMi/HAMi/refs/tags/v2.9.0/pkg/device/common/common.go"; do
  name="${spec%%|*}"
  url="${spec#*|}"
  if curl -fsSL "$url" -o "$tmpdir/$name"; then
    printf '\n--- %s ---\n' "$url"
    rg -n -C 8 'ExclusiveDeviceAllocateConflict|mutex|gpucores|used' "$tmpdir/$name" || true
  else
    printf '\n--- unavailable: %s ---\n' "$url"
  fi
done

printf '\n--- all v2.9.0 source paths mentioning the reason ---\n'
api='https://api.github.com/repos/Project-HAMi/HAMi/git/trees/v2.9.0?recursive=1'
curl -fsSL "$api" |
  jq -r '.tree[] | select(.type == "blob") | .path' |
  while read -r path; do
    case "$path" in
      *.go)
        url="https://raw.githubusercontent.com/Project-HAMi/HAMi/refs/tags/v2.9.0/$path"
        body="$(curl -fsSL "$url" 2>/dev/null || true)"
        if printf '%s' "$body" | grep -q 'ExclusiveDeviceAllocateConflict'; then
          printf '%s\n' "$path"
          printf '%s' "$body" | grep -n -C 8 'ExclusiveDeviceAllocateConflict'
        fi
        ;;
    esac
  done

Repository: Project-HAMi/website

Length of output: 4657


🌐 Web query:

site:github.com/Project-HAMi/HAMi v2.9.0 "ExclusiveDeviceAllocateConflict" mutex

💡 Result:

In the context of the Project-HAMi (HAMi) project, ExclusiveDeviceAllocateConflict is a scheduling failure reason indicating that a container’s request for exclusive device access cannot be satisfied because the targeted device is already in use [1][2][3]. The mention of mutex in relation to this conflict refers to a specific GPU scheduling policy introduced to enforce exclusive access [4]. When a pod sets the annotation hami.io/gpu-scheduler-policy to mutex, the HAMi scheduler is instructed to allocate only those GPUs that have no existing users (where the usage count is 0) [4]. Key points regarding this functionality include: 1. Policy Enforcement: The mutex policy ensures that if a device is already occupied (Used > 0), the scheduler's Fit function will reject that device, triggering the ExclusiveDeviceAllocateConflict reason [4][3]. 2. Diagnostic Clarity: In earlier versions, this conflict was sometimes misreported as other errors (such as NumaNotFit) [4]. Updates were implemented to ensure that the ExclusiveDeviceAllocateConflict reason is explicitly reported when the mutex policy restricts device allocation, improving diagnostic clarity for users [4][5]. 3. Reporting: This reason appears in scheduler logs and event messages when the system determines that a node or device cannot fulfill the pod's requirement for exclusive access due to current device occupancy [1][6]. While v2.9.0 is a specific release version of HAMi [7], the ExclusiveDeviceAllocateConflict reason is a persistent part of the HAMi scheduling diagnostic framework, used across multiple versions to signify that a requested exclusive device is unavailable [1][8][2].

Citations:


🏁 Script executed:

#!/bin/bash
set -eu
base='https://api.github.com/repos/Project-HAMi/HAMi'
commit='06d9b907f19e78551d616e106209d2a98ec20f01'

printf '%s\n' '--- cited commit metadata ---'
curl -fsSL "$base/commits/$commit" |
  jq -r '[.sha, .commit.message, (.files | length | tostring)] | `@tsv`'

printf '%s\n' '--- cited commit file patches ---'
curl -fsSL "$base/commits/$commit" |
  jq -r '.files[] | select((.patch // "") | test("ExclusiveDeviceAllocateConflict|gpu-scheduler-policy|mutex")) |
    "\nFILE: \(.filename)\n\(.patch)"'

printf '%s\n' '--- v2.9.0 tag resolution ---'
curl -fsSL "$base/git/ref/tags/v2.9.0" |
  jq -r '"type=\(.object.type) sha=\(.object.sha)"'

Repository: Project-HAMi/website

Length of output: 399


🏁 Script executed:

#!/bin/bash
set -eu
tmp="$(mktemp)"
trap 'rm -f "$tmp"' EXIT

for url in \
  'https://github.com/Project-HAMi/HAMi/commit/06d9b907f19e78551d616e106209d2a98ec20f01.patch' \
  'https://github.com/Project-HAMi/HAMi/commit/06d9b907f19e78551d616e106209d2a98ec20f01.diff'; do
  printf '\n--- %s ---\n' "$url"
  if curl -fsSL "$url" -o "$tmp"; then
    rg -n -C 12 'ExclusiveDeviceAllocateConflict|gpu-scheduler-policy|mutex|Fit\(' "$tmp" || cat "$tmp"
  else
    printf '%s\n' 'unavailable'
  fi
done

printf '\n--- v2.9.0 NVIDIA policy-related source references ---\n'
for path in \
  pkg/device/nvidia/device.go \
  pkg/device/nvidia/nvidia.go \
  pkg/device/nvidia/nvidia_test.go \
  pkg/device/common/common.go \
  pkg/device/device.go \
  pkg/scheduler/scheduler.go \
  pkg/scheduler/score.go; do
  url="https://raw.githubusercontent.com/Project-HAMi/HAMi/refs/tags/v2.9.0/$path"
  body="$(curl -fsSL "$url" 2>/dev/null || true)"
  if [ -n "$body" ]; then
    hits="$(printf '%s' "$body" | rg -n -C 6 'ExclusiveDeviceAllocateConflict|gpu-scheduler-policy|mutex|NodeLockNvidia' || true)"
    if [ -n "$hits" ]; then
      printf '\nFILE: %s\n%s\n' "$path" "$hits"
    fi
  fi
done

Repository: Project-HAMi/website

Length of output: 50377


🏁 Script executed:

#!/bin/bash
set -eu
python3 - <<'PY'
from urllib.request import urlopen

tag_url = "https://raw.githubusercontent.com/Project-HAMi/HAMi/refs/tags/v2.9.0/pkg/device/nvidia/device.go"
patch_url = "https://github.com/Project-HAMi/HAMi/commit/06d9b907f19e78551d616e106209d2a98ec20f01.patch"

tag = urlopen(tag_url).read().decode()
patch = urlopen(patch_url).read().decode()

tag_conflict = "if dev.Totalcore == 100 && k.Coresreq == 100 && dev.Used > 0"
tag_mutex_guard = "if isMutex && dev.Used > 0"
patch_nvidia_mutex = "+\t\tif isMutex && dev.Used > 0"
patch_reason = "+\t\t\treason[common.ExclusiveDeviceAllocateConflict]++"

print("v2.9.0 contains exclusive-used guard:", tag_conflict in tag)
print("v2.9.0 contains mutex guard:", tag_mutex_guard in tag)
print("later patch adds NVIDIA mutex guard:", patch_nvidia_mutex in patch)
print("later patch reports ExclusiveDeviceAllocateConflict for mutex:", patch_reason in patch)
print("v2.9.0 conflict-branch count:", tag.count("reason[common.ExclusiveDeviceAllocateConflict]++"))
PY

Repository: Project-HAMi/website

Length of output: 2444


Remove the unsupported mutex trigger from both locales.

In HAMi v2.9.0, the NVIDIA implementation emits ExclusiveDeviceAllocateConflict only when k.Coresreq == 100 and the card already has tasks. The mutex rejection path was added later and is absent from v2.9.0. The general shared-request wording is also unsupported.

  • docs/troubleshooting/scheduling-failures.md#L106-L107: describe only the v2.9.0 exclusive request on a used card.
  • i18n/zh/docusaurus-plugin-content-docs/current/troubleshooting/scheduling-failures.md#L107-L108: apply the same correction.
📍 Affects 2 files
  • docs/troubleshooting/scheduling-failures.md#L106-L107 (this comment)
  • i18n/zh/docusaurus-plugin-content-docs/current/troubleshooting/scheduling-failures.md#L107-L108
🤖 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 `@docs/troubleshooting/scheduling-failures.md` around lines 106 - 107, Update
the ExclusiveDeviceAllocateConflict description in
docs/troubleshooting/scheduling-failures.md lines 106-107 and
i18n/zh/docusaurus-plugin-content-docs/current/troubleshooting/scheduling-failures.md
lines 107-108 to describe only the v2.9.0 case where k.Coresreq == 100 is
requested on a card that already has tasks; remove the mutex scheduler trigger
and unsupported general shared-request wording from both locales.

Source: MCP tools

Comment on lines +115 to +119
helm upgrade hami hami-charts/hami \
--namespace kube-system \
--reuse-values \
--set-json 'scheduler.extender.extraArgs=["--debug","-v=5"]'

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🩺 Stability & Availability | 🟠 Major | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -eu

printf '%s\n' '--- target files ---'
for f in \
  docs/troubleshooting/scheduling-failures.md \
  i18n/zh/docusaurus-plugin-content-docs/current/troubleshooting/scheduling-failures.md
do
  printf '\n### %s\n' "$f"
  nl -ba "$f" | sed -n '1,155p'
done

printf '\n--- chart references and extraArgs definitions ---\n'
rg -n --hidden -S \
  'scheduler\.extender\.extraArgs|extraArgs:|hami-charts/hami|version:' \
  --glob '!node_modules' --glob '!dist' --glob '!build' .

Repository: Project-HAMi/website

Length of output: 36028


🏁 Script executed:

#!/bin/bash
set -eu

for f in \
  docs/troubleshooting/scheduling-failures.md \
  i18n/zh/docusaurus-plugin-content-docs/current/troubleshooting/scheduling-failures.md \
  docs/developers/profiling-scheduler.md \
  i18n/zh/docusaurus-plugin-content-docs/current/developers/profiling-scheduler.md \
  docs/installation/upgrade.md
do
  printf '\n### %s\n' "$f"
  sed -n '1,155p' "$f" | awk '{printf "%5d  %s\n", NR, $0}'
done

printf '\n--- all repository definitions/usages of scheduler.extender.extraArgs ---\n'
rg -n -C 8 --hidden -S \
  'scheduler\.extender\.extraArgs|extraArgs:' \
  --glob '!node_modules' --glob '!dist' --glob '!build' .

printf '\n--- available Helm tooling ---\n'
command -v helm || true

Repository: Project-HAMi/website

Length of output: 50378


🌐 Web query:

Helm upgrade --reuse-values --set-json array override precedence official documentation

💡 Result:

When using helm upgrade with --reuse-values, the behavior regarding precedence and merging is defined by how Helm handles existing versus new values [1][2][3]. Precedence and Merging Behavior 1. --reuse-values takes the computed values from the previous release, rather than the default values.yaml from the new chart [3][4]. 2. Any values provided via --set, --set-json, --values, or other override flags are then merged into these existing values [1][2][5]. 3. In this merge, the new values from your command-line flags take precedence over the previously stored values [1][2]. Array Handling with --set-json When using --set-json or --set to override arrays, it is important to understand that Helm treats arrays as single entities during the merge process [6]. Unlike maps (which are merged key-by-key), arrays are typically overwritten entirely by the new value provided [6]. If you provide an array via --set-json, that array will replace the entire array currently stored in the release values [6]. It will not perform a partial merge or append items to an existing array unless you explicitly include the original items in your new JSON input [6]. Summary of Precedence - New overrides (--set, --set-json, --values) always take priority over the values reused from the previous release [1][2]. - When multiple override flags are used in the same command, the right-most (last) flag specified takes precedence [2]. - Because --reuse-values explicitly excludes the new chart's default values.yaml, any changes to default values in a new chart version will be ignored unless you explicitly apply those values via a -f or --set flag [3][4].

Citations:


🏁 Script executed:

#!/bin/bash
set -eu

python3 - <<'PY'
import json
import re
from pathlib import Path

files = [
    Path("docs/troubleshooting/scheduling-failures.md"),
    Path("i18n/zh/docusaurus-plugin-content-docs/current/troubleshooting/scheduling-failures.md"),
]

found = []
for path in files:
    text = path.read_text()
    for match in re.finditer(
        r"helm upgrade hami hami-charts/hami \\\n"
        r"\s+--namespace kube-system \\\n"
        r"\s+--reuse-values \\\n"
        r"\s+--set-json 'scheduler\.extender\.extraArgs=(\[[^']+\])'",
        text,
    ):
        args = json.loads(match.group(1))
        found.append((str(path), args, "--version" in match.group(0)))

assert len(found) == 4, found
assert {tuple(args) for _, args, _ in found} == {
    ("--debug", "-v=5"),
    ("--debug", "-v=4"),
}
assert all(not has_version for _, _, has_version in found)

for path, args, _ in found:
    print(f"{path}: extraArgs={args}; chart_version_pinned=False")
PY

Repository: Project-HAMi/website

Length of output: 654


Pin the chart version and preserve the complete extraArgs array.

Without --version, each command can upgrade to the latest chart. --set-json replaces the existing scheduler.extender.extraArgs array and can remove custom flags. Apply both safeguards to the -v=5 and -v=4 commands in the English and Chinese files.

📍 Affects 2 files
  • docs/troubleshooting/scheduling-failures.md#L115-L119 (this comment)
  • docs/troubleshooting/scheduling-failures.md#L131-L136
  • i18n/zh/docusaurus-plugin-content-docs/current/troubleshooting/scheduling-failures.md#L115-L119
  • i18n/zh/docusaurus-plugin-content-docs/current/troubleshooting/scheduling-failures.md#L132-L137
🤖 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 `@docs/troubleshooting/scheduling-failures.md` around lines 115 - 119, Update
all four documented Helm upgrade commands in
docs/troubleshooting/scheduling-failures.md lines 115-119 and 131-136, and
i18n/zh/docusaurus-plugin-content-docs/current/troubleshooting/scheduling-failures.md
lines 115-119 and 132-137: pin each chart with the documented version and
preserve the complete existing scheduler.extender.extraArgs array while adding
the -v=5 or -v=4 flag, rather than replacing the array.

Source: MCP tools

A Pod that requests HAMi resources and stays Pending gets a
`FilteringFailed` event carrying one of the reason codes defined in
`pkg/device/common/common.go`, but the website documents none of them.
The only page that mentions any of these codes,
`developers/scheduler-event-log.md`, is a design proposal written in
future tense and covers 7 of the 17 codes the scheduler emits today.

Add a user-facing troubleshooting page that:

- explains the two message formats a user actually sees: the aggregated
  event `N nodes <Code>(node-a,node-b)` and the per-node scheduler log
  `NodeUnfitPod ... reason="3/8 CardInsufficientMemory, ..."`
- documents all 17 reason codes with the condition that triggers each
  one and the corresponding fix, grouped by the stage at which the
  scheduler rejects the card
- flags three behaviours that are easy to misread: one event is emitted
  per reason code (so a single failure can produce several events),
  events appear only when no node fits at all, and
  `AllocatedCardsInsufficientRequest` inverts the numerator to count
  cards that fit rather than cards rejected
- covers the messages emitted before per-device filtering runs, which
  carry no reason code at all
- shows how to raise the extender to `-v=5` for device-level detail,
  with the cost of doing so and how to revert

Verified against HAMi v2.9.0. Links added from the existing scheduler
event log design page in both locales.

Signed-off-by: ipsitapp8 <ipsitapp8@gmail.com>
@ipsitapp8
ipsitapp8 force-pushed the docs/scheduler-filter-reason-reference branch from b1f3b11 to 3e72faa Compare August 12, 2026 09:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant