17bd930ca9
When the server restarts for the upgrade, it loads the `structs.Job` from the Raft snapshot/logs. The jobspec has long since been parsed, so none of the guards around the default value are in play. The empty field value for `Enabled` is the zero value, which is false. This doesn't impact any running allocation because we don't replace running allocations when either the client or server restart. But as soon as any allocation gets rescheduled (ex. you drain all your clients during upgrades), it'll be using the `structs.Job` that the server has, which has `Enabled = false`, and logs will not be collected. This changeset fixes the bug by adding a new field `Disabled` which defaults to false (so that the zero value works), and deprecates the old field. Fixes #17076 |
||
---|---|---|
.. | ||
test-fixtures | ||
helper.go | ||
helper_test.go | ||
parse.go | ||
parse_group.go | ||
parse_job.go | ||
parse_multiregion.go | ||
parse_network.go | ||
parse_service.go | ||
parse_task.go | ||
parse_test.go | ||
utils.go | ||
utils_test.go |