Skip to content

[2212] Refactoring migration scheduling and validations - #2224

Open
meghansh-pf9 wants to merge 3 commits into
mainfrom
private/main/megh/agent-scheduling
Open

[2212] Refactoring migration scheduling and validations#2224
meghansh-pf9 wants to merge 3 commits into
mainfrom
private/main/megh/agent-scheduling

Conversation

@meghansh-pf9

@meghansh-pf9 meghansh-pf9 commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

What this PR does / why we need it

A VM with no matching OpenStack flavor used to abort the whole MigrationPlan — every VM behind it in the list never got a ConfigMap or Job, and the plan retried forever on the same VM.

Now the failure is contained to that VM:

  • Flavors are resolved in pre-flight validation, once per plan instead of once per VM (and lazily, so operator-pinned plans still never call Nova).
  • ErrNoSuitableFlavor sentinel + errors.Is so only an unschedulable shape is treated as a skip; auth/connectivity errors still requeue. Replaces a strings.Contains check.
  • The unschedulable VM gets a Migration in ValidationFailed with an actionable reason, so it stays visible in the UI (no UI changes needed).
  • processMigrationPhases accumulates per-VM failures instead of returning on the first one; the plan is marked PodFailed only once nothing is still running, so post-migration still runs for the VMs that succeeded.

Which issue(s) this PR fixes

fixes #2212

Testing Done

image

@meghansh-pf9
meghansh-pf9 force-pushed the private/main/megh/agent-scheduling branch from 6f9babb to a1bc087 Compare July 28, 2026 12:06
@meghansh-pf9
meghansh-pf9 marked this pull request as ready for review July 28, 2026 12:06
@github-actions

Copy link
Copy Markdown
Contributor

✅ Security Vulnerability Summary

No change in security posture

📊 Overall Changes

Metric Count
Total Added 0
Total Fixed 0
Net Change 0

🔍 Detailed Breakdown

📦 Gosec (Static Analysis)

Current Baseline Added Fixed Method
0 0 0 0 artifact

📦 Trivy (Dependency Scan)

Current Baseline Added Fixed Method
78 78 0 0 artifact

📋 Baseline Methods

  • 📦 artifact: Used stored report from main branch
  • 🔄 live_scan: Scanned base branch in real-time
  • ⚠️ no_baseline: No baseline available (all vulnerabilities treated as new)

Only HIGH and CRITICAL severity vulnerabilities are tracked
Baseline: 3348a95cafb80aaa932c92e2d1ed418410962787

1 similar comment
@github-actions

Copy link
Copy Markdown
Contributor

✅ Security Vulnerability Summary

No change in security posture

📊 Overall Changes

Metric Count
Total Added 0
Total Fixed 0
Net Change 0

🔍 Detailed Breakdown

📦 Gosec (Static Analysis)

Current Baseline Added Fixed Method
0 0 0 0 artifact

📦 Trivy (Dependency Scan)

Current Baseline Added Fixed Method
78 78 0 0 artifact

📋 Baseline Methods

  • 📦 artifact: Used stored report from main branch
  • 🔄 live_scan: Scanned base branch in real-time
  • ⚠️ no_baseline: No baseline available (all vulnerabilities treated as new)

Only HIGH and CRITICAL severity vulnerabilities are tracked
Baseline: 3348a95cafb80aaa932c92e2d1ed418410962787

@meghansh-pf9
meghansh-pf9 enabled auto-merge (squash) July 28, 2026 12:55
@meghansh-pf9
meghansh-pf9 requested a review from sarika-pf9 July 29, 2026 06:11
@meghansh-pf9
meghansh-pf9 disabled auto-merge July 29, 2026 06:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Scheduling Issue in Agents

1 participant