Skip to content

Enable strict node scheduling for cluster app instances.#5508

Merged
eriknordmark merged 1 commit intolf-edge:masterfrom
andrewd-zededa:eve-k-node-affinity
Jan 22, 2026
Merged

Enable strict node scheduling for cluster app instances.#5508
eriknordmark merged 1 commit intolf-edge:masterfrom
andrewd-zededa:eve-k-node-affinity

Conversation

@andrewd-zededa
Copy link
Copy Markdown
Contributor

@andrewd-zededa andrewd-zededa commented Dec 23, 2025

Description

Currently VM app instances are set with a default node affinity 'preferred' which attempts to schedule to the DesignatedNodeID but can allow the app instance to fail over to another heathy node.

This PR enhances DesignatedNodeID with an affinity type to allow for required node affinity which will only run the app instance if the DesignatedNodeID is available and healthy, this also disables failover for the app instance.

PR dependencies

EVE-API: lf-edge/eve-api#130

How to test and validate this PR

  • deploy 3 eve HV=k nodes.
  • configure an EVE-API EdgeNodeCluster config for the nodes.
  • deploy a VM app instance with Affinity=Required.
  • initiate a node failure of the node hosting the app instance eg. disable the cluster network.
  • The app should not fail over to another node.

Changelog notes

Enable strict node scheduling for app instances on clustered HV=k EVE-OS nodes.

PR Backports

  • 14.5-stable: No, as the feature is not available there.
  • 13.4-stable: No, as the feature is not available there.

Checklist

  • I've provided a proper description
  • I've added the proper documentation
  • I've tested my PR on amd64 device
  • I've tested my PR on arm64 device
  • I've written the test verification instructions
  • I've set the proper labels to this PR

And the last but not least:

  • I've checked the boxes above, or I've provided a good reason why I didn't
    check them.

Please, check the boxes above after submitting the PR in interactive mode.

@codecov
Copy link
Copy Markdown

codecov Bot commented Dec 24, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 28.43%. Comparing base (2281599) to head (7a62abd).
⚠️ Report is 225 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #5508      +/-   ##
==========================================
+ Coverage   19.52%   28.43%   +8.90%     
==========================================
  Files          19       18       -1     
  Lines        3021     2247     -774     
==========================================
+ Hits          590      639      +49     
+ Misses       2310     1466     -844     
- Partials      121      142      +21     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@andrewd-zededa
Copy link
Copy Markdown
Contributor Author

Replaced the placeholder commit with the real vendored eve-api which recently merged.

@andrewd-zededa
Copy link
Copy Markdown
Contributor Author

Rebased off master

@andrewd-zededa andrewd-zededa marked this pull request as ready for review January 21, 2026 17:52
@andrewd-zededa
Copy link
Copy Markdown
Contributor Author

Will rebase to resolve conflicts

Comment thread pkg/pillar/cmd/zedkube/failover.go
Copy link
Copy Markdown
Contributor

@naiming-zededa naiming-zededa left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Copy Markdown
Contributor

@eriknordmark eriknordmark left a comment

Choose a reason for hiding this comment

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

LGTM

@andrewd-zededa
Copy link
Copy Markdown
Contributor Author

@zedi-pramodh added the requested log entry in latest push, and some docs to failover.md

App wil only run if scheduling succeeds for the requested node id.
Set DesignatedNodeID and AffinityType Required.

With strict node scheduling the app will not failover to other cluster nodes.

Signed-off-by: Andrew Durbin <andrewd@zededa.com>
@andrewd-zededa
Copy link
Copy Markdown
Contributor Author

Pushed again to fix yetus tab issue

@eriknordmark eriknordmark merged commit 0283728 into lf-edge:master Jan 22, 2026
47 checks passed
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.

4 participants