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

check_restart within service block is not recognized #3713

Closed
c4milo opened this issue Jan 4, 2018 · 5 comments
Closed

check_restart within service block is not recognized #3713

c4milo opened this issue Jan 4, 2018 · 5 comments

Comments

@c4milo
Copy link
Contributor

c4milo commented Jan 4, 2018

Nomad version

$ nomad version
Nomad v0.7.1

Issue

check_restart not recognized at service block level as documented in https://www.nomadproject.io/docs/job-specification/check_restart.html

Reproduction steps

Define a check_restart block within a service block. You will get the following message:

* group: 'mygroup', task: 'mytask', service (0) -> invalid key: check_restart
@c4milo c4milo changed the title check_restart at the service block level doesn't seem to be recognized check_restart within service block is not recognized Jan 4, 2018
@chelseakomlo
Copy link
Contributor

Hi, thanks for letting us know about this issue. Do you mind including the job configuration where you see this error?

schmichael added a commit that referenced this issue Jan 4, 2018
This is currently broken and should be removed from docs until a fix is
released.

See #3713
@c4milo
Copy link
Contributor Author

c4milo commented Jan 5, 2018

@chelseakomlo hi! sure, here is an example job file that reproduces the issue:

job "test" {
	type = "service"
	region = "global"
	datacenters = ["dc1"]

	update {
		max_parallel     = 1
		canary           = 5
		min_healthy_time = "30s"
		healthy_deadline = "10m"
		auto_revert      = true
	}

	group "mygroup" {
		count = 2

		task "mytask" {
			driver = "exec"

			config {
				command = "/bin/sleep"
				args 	= ["1"]
			}

			resources {
				network {
					mbits = 1
					port "mytask" {}
				}
			}

			service {
				port = "mytask"

				check {
					type     = "tcp"
					port     = "mytask"
					interval = "10s"
					timeout  = "2s"
				}
				check_restart {
					limit = 3
					grace = "90s"
					ignore_warnings = false
				}
			}
		}
	}
}

@schmichael
Copy link
Member

Thanks for the update @c4milo! #3718 will fix it, but since it might not make it into a release for a while #3716 is going to (temporarily) remove that feature from the documentation.

Until the next release you'll have to put the check_restart stanza inside the check stanza.

schmichael added a commit that referenced this issue Jan 8, 2018
This is currently broken and should be removed from docs until a fix is
released.

See #3713
@schmichael
Copy link
Member

Fixed but forgot to close. Sorry!

@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

3 participants