Skip to content

Conversation

@andrewd-zededa
Copy link
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

codecov bot commented Dec 24, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 28.08%. Comparing base (2281599) to head (05ce048).
⚠️ Report is 182 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #5508      +/-   ##
==========================================
+ Coverage   19.52%   28.08%   +8.55%     
==========================================
  Files          19       19              
  Lines        3021     2314     -707     
==========================================
+ Hits          590      650      +60     
+ Misses       2310     1520     -790     
- Partials      121      144      +23     

☔ 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
Contributor Author

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

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>
go get github.com/lf-edge/eve-api/go@4149b9d
go mod tidy
go mod vendor

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

Rebased off master

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.

1 participant