open-nomad/client/allocwatcher
Tim Gross 1335543731
ephemeral disk: migrate should imply sticky (#16826)
The `ephemeral_disk` block's `migrate` field allows for best-effort migration of
the ephemeral disk data to new nodes. The documentation says the `migrate` field
is only respected if `sticky=true`, but in fact if client ACLs are not set the
data is migrated even if `sticky=false`.

The existing behavior when client ACLs are disabled has existed since the early
implementation, so "fixing" that case now would silently break backwards
compatibility. Additionally, having `migrate` not imply `sticky` seems
nonsensical: it suggests that if we place on a new node we migrate the data but
if we place on the same node, we throw the data away!

Update so that `migrate=true` implies `sticky=true` as follows:

* The failure mode when client ACLs are enabled comes from the server not passing
  along a migration token. Update the server so that the server provides a
  migration token whenever `migrate=true` and not just when `sticky=true` too.
* Update the scheduler so that `migrate` implies `sticky`.
* Update the client so that we check for `migrate || sticky` where appropriate.
* Refactor the E2E tests to move them off the old framework and make the intention
  of the test more clear.
2023-04-07 16:33:45 -04:00
..
alloc_watcher.go ephemeral disk: migrate should imply sticky (#16826) 2023-04-07 16:33:45 -04:00
alloc_watcher_test.go deps: Update ioutil deprecated library references to os and io respectively in the client package (#16318) 2023-03-08 13:25:10 -06:00
alloc_watcher_unix_test.go deps: Update ioutil deprecated library references to os and io respectively in the client package (#16318) 2023-03-08 13:25:10 -06:00
doc.go implement stopping, destroying, and disk migration 2018-10-16 16:53:30 -07:00
group_alloc_watcher.go client: Unify handling of previous and preempted allocs 2018-12-11 13:12:35 +01:00
group_alloc_watcher_test.go ci: swap ci parallelization for unconstrained gomaxprocs 2022-03-15 12:58:52 -05:00