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

job update stanza #3878

Closed
Garagoth opened this issue Feb 16, 2018 · 4 comments
Closed

job update stanza #3878

Garagoth opened this issue Feb 16, 2018 · 4 comments

Comments

@Garagoth
Copy link

Garagoth commented Feb 16, 2018

Nomad version

0.7.1

Operating system and Environment details

CentOS 7

Issue

Placing an update stanza on job level and not adding it on group level emits a message "A best effort conversion to new update stanza introduced in v0.6.0 applied. Please update upgrade stanza before v0.7.0."

Taken from nomad/nomad/structs/structs.go, line 1657 (master branch):

// COMPAT: Remove in 0.7.0
	// Rewrite any job that has an update block with pre 0.6.0 syntax.
	jobHasOldUpdate := j.Update.Stagger > 0 && j.Update.MaxParallel > 0
	if jobHasOldUpdate && j.Type != JobTypeBatch {
		// Build an appropriate update block and copy it down to each task group
		base := DefaultUpdateStrategy.Copy()
		base.MaxParallel = j.Update.MaxParallel
		base.MinHealthyTime = j.Update.Stagger

Stagger is set by default to 30s and just setting max_parallel will cause jobHasOldUpdate to be set to true.
Then it sets min healthy time to value of stagger, ignoring my value set in min_healthy_time.
Setting stagger to 0 is not allowed.

Maybe just see it there is MinHealthyTime set on j.Update and if it is consider it to be a new syntax?

Job file (if appropriate)

job "test" {
  datacenters = ["dc1", "dc2"]
  update {
    canary = 0
    max_parallel = 1
    health_check  = "checks"
    min_healthy_time = "1m"
    healthy_deadline = "20m"
    auto_revert = true
    stagger = 0
  }
  group "group1" {
    # anything except update element
    count = 2
    task "task1" {
      # ...
    }
  }
}
@preetapan
Copy link
Contributor

@Garagoth could you try removing stagger from the update stanza above? That should fix things for you.

We will remove that compatibility block in the next release, that should have been removed in 0.7.0 itself.

@Garagoth
Copy link
Author

Garagoth commented Feb 21, 2018 via email

@preetapan
Copy link
Contributor

This was addressed with #3979

@github-actions
Copy link

github-actions bot commented Dec 1, 2022

I'm going to lock this issue because it has been closed for 120 days ⏳. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Dec 1, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants