Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Backport of logs: fix missing allocation logs after update to Nomad 1.5.4 into release/1.5.x #17089

Conversation

hc-github-team-nomad-core
Copy link
Contributor

Backport

This PR is auto-generated from #17087 to be assessed for backporting due to the inclusion of the label backport/1.5.x.

The below text is copied from the body of the original PR.


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

@hc-github-team-nomad-core hc-github-team-nomad-core force-pushed the backport/fix-log-collection-upgrade/infinitely-deep-grub branch from ee996e6 to e967b58 Compare May 4, 2023 20:01
@hc-github-team-nomad-core hc-github-team-nomad-core merged commit 74ff6d1 into release/1.5.x May 4, 2023
@hc-github-team-nomad-core hc-github-team-nomad-core force-pushed the backport/fix-log-collection-upgrade/infinitely-deep-grub branch from a8298e5 to 178f7a0 Compare May 4, 2023 20:01
@hc-github-team-nomad-core hc-github-team-nomad-core deleted the backport/fix-log-collection-upgrade/infinitely-deep-grub branch May 4, 2023 20:01
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.

2 participants