-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Remove deprecated code #5894
Remove deprecated code #5894
Conversation
This removes compat code for namespaces (0.7), Drain(0.8) and other older features from releases older than Nomad 0.7
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
overall look good to me but some questions to understand implication:
- Should "Remove in 0.9" sections be removed right before 0.10 or anytime after 0.9.0? Given that the drain request format changed in 0.8, it'd feel a bit odd dropping support for old format in 0.9.4.
- For the FSM 0.7 compatibility changes - does dropping these means long running nomad servers must at least snapshot once between upgrading from 0.7 to 0.9.4?
@@ -169,7 +169,7 @@ func (c *JobStatusCommand) Run(args []string) int { | |||
basic := []string{ | |||
fmt.Sprintf("ID|%s", *job.ID), | |||
fmt.Sprintf("Name|%s", *job.Name), | |||
fmt.Sprintf("Submit Date|%s", formatTime(getSubmitTime(job))), | |||
fmt.Sprintf("Submit Date|%s", formatTime(time.Unix(0, *job.SubmitTime))), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like the utility function here, as it's not obvious that job.Submit
is in nano seconds.
That's fair, perhaps one major version is too short of a deprecation cycle for node drain. I could roll back these changes. In 0.9.4 we could start emitting a warning when servicing requests that use the old format. .
Nomad 0.7 added namespaces and introduced code to fix up older state store objects that were missing namespaces. As long as the servers were making raft transactions it should have corrected old objects that don't have namespace set (not necessarily tied to snapshots) |
Cool, let me clarify: Would nomad 0.7 edit the raft log old persisted entries in place in file and how do we do that? I was expecting Nomad 0.7 to parse old log entries and populate missing namespace fields in memory, and then storing updated entries to raft snapshot without updating old entries. |
AFAICT we use the canonicalize method in restore to fix up jobs, but we dont do that consistently for all objects. You are right about your understanding though - The code I removed in various upsert methods would handle processing old log entries - when upserting those entries into the state store Nomad 0.7 would add the namespace field. At that point the statestore in memory would have namespace in it, but not the old log entries on disk. Once we are past the snapshot threshold (8192 entries) we would take a snapshot which saves the statestore (now with namespace in it) to disk, and delete old log entries. |
Decided to remove that in 0.10
I'm going to lock this pull request because it has been closed for 120 days ⏳. This helps our maintainers find and focus on the active contributions. |
Removed upgrade path code and tests related to: