eve-k: add config-property 'storage.longhorn.node-drain-policy'#6000
eve-k: add config-property 'storage.longhorn.node-drain-policy'#6000andrewd-zededa wants to merge 1 commit into
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #6000 +/- ##
==========================================
+ Coverage 20.25% 20.68% +0.42%
==========================================
Files 490 500 +10
Lines 91670 93419 +1749
==========================================
+ Hits 18572 19320 +748
- Misses 71544 72367 +823
- Partials 1554 1732 +178 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
e14add3 to
7a92fe6
Compare
| | storage.zfs.reserved.percent | integer percent | 20 | 1 | 99 | min. percent of persist partition reserved for zfs performance | | ||
| | storage.longhorn.disk.reserved.gigabytes | integer GB | 2 | 0 | 1048576 | per-disk storage reserved by Longhorn on the local node; overrides Longhorn's default 25% reservation. 0 sets storageReserved to 0 bytes (no reservation). 1048576 disables EVE's override, leaving Longhorn's current value in place | | ||
| | storage.longhorn.snapshot.cron | cron string | `0 0 * * *` | - | - | cron schedule for Longhorn recurring snapshots; empty string disables. Snapshots bound delta rebuilds after node power loss to writes since the last snapshot. Default daily at midnight UTC. Standard 5-field cron syntax. EVE-k only. | | ||
| | storage.longhorn.node-drain-policy | string | `allow-if-replica-is-stopped` | - | - | Longhorn cluster-wide node-drain-policy setting. Controls whether a node drain is permitted when the node holds Longhorn replicas. Valid values: `block-for-eviction`, `block-for-eviction-if-contains-last-replica`, `allow-if-replica-is-stopped`, `always-allow`. EVE-k only. | |
There was a problem hiding this comment.
cluster-wide
Does it mean that every node should have the same value configured?
Is it enough if only one of the nodes has this value set in the device config, and other keep the empty default?
There was a problem hiding this comment.
All nodes should have this value set identically
There was a problem hiding this comment.
What happens if they are configured differently?
There was a problem hiding this comment.
On every boot event of a node, the cluster-wide setting would switch to the config prop value set for that node.
Keep default at longhorn recommended default: 'block-for-eviction-if-contains-last-replica' Which blocks until another node has a replica, other than the node being drained. See longhorn docs for more info: https://longhorn.io/docs/1.9.1/maintenance/maintenance/#node-drain-policy-recommendations zedkube.go applies this in the kubeCfgTimer as well as on any global config changes. Signed-off-by: Andrew Durbin <andrewd@zededa.com>
7a92fe6 to
5a0be55
Compare
|
Rebased and resolved conflict |
Description
Keep default at longhorn recommended default:
'block-for-eviction-if-contains-last-replica'
Which blocks until another node has a replica,
other than the node being drained.
See longhorn docs for more info:
https://longhorn.io/docs/1.9.1/maintenance/maintenance/#node-drain-policy-recommendations
zedkube.go applies this in the kubeCfgTimer as well as on any global config changes.
PR dependencies
None
How to test and validate this PR
eve enter kubekubectl -n longhorn-system get settings.longhorn.io/node-drain-policyChangelog notes
Support configurable drain policy for longhorn volumes.
PR Backports
Checklist
And the last but not least:
check them.
Please, check the boxes above after submitting the PR in interactive mode.