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

nomad does not reevaluate system jobs after 'node-drain -disable' #1104

Closed
bastiaanb opened this issue Apr 18, 2016 · 1 comment
Closed

nomad does not reevaluate system jobs after 'node-drain -disable' #1104

bastiaanb opened this issue Apr 18, 2016 · 1 comment

Comments

@bastiaanb
Copy link
Contributor

Nomad version

Nomad v0.3.2-rc1 ('36fa82654df4e9c487da6af419dd4530f5af9d8e+CHANGES')

Operating system and Environment details

Linux localhost.localdomain 4.4.6-201.fc22.x86_64 #1 SMP Wed Mar 30 18:30:16 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux

Issue

Upon a nomad node-drain -enable -self comand Nomad terminates all system tasks on that node.
After a subsequent nomad node-drain -disable -self Nomad does not reevaluate system jobs, so they will not be restarted automatically.
I would expect an automatic restart of system tasks, as the may be necessary for proper functioning of service and batch tasks that might be scheduled on the reenabled node.

Reproduction steps

1 start Nomad agent:

nomad agent -dev

2 generate example system job:

nomad init
perl -pi -e 's/# type = "service"/type = "system"/' example2.nomad

3 submit job:

nomad run example.nomad 
==> Monitoring evaluation "8d7876db"
    Evaluation triggered by job "example"
    Allocation "23dcc9ba" created: node "55321c75", group "cache"
    Evaluation status changed: "pending" -> "complete"
==> Evaluation "8d7876db" finished with status "complete"

4 drain node:

nomad node-drain -enable -self

5 check that job has been stopped:

nomad node-status -verbose -allocs
ID                                    DC   Name                   Class   Drain  Status  Running Allocs
55321c75-d319-5e76-3c26-3d116783c4ef  dc1  localhost.localdomain  <none>  true   ready   0

6 disable node drain:

nomad node-drain -disable -self

7 check that system job is not restarted:

nomad node-status -verbose -allocs
ID                                    DC   Name                   Class   Drain  Status  Running Allocs
55321c75-d319-5e76-3c26-3d116783c4ef  dc1  localhost.localdomain  <none>  false  ready   0

Nomad Server logs (if appropriate)

...
    2016/04/18 21:53:42 [DEBUG] http: Request /v1/node/55321c75-d319-5e76-3c26-3d116783c4ef/drain?enable=false (91.903µs)
    2016/04/18 21:53:56 [DEBUG] http: Request /v1/nodes (82.369µs)
    2016/04/18 21:53:56 [DEBUG] http: Request /v1/node/55321c75-d319-5e76-3c26-3d116783c4ef/allocations (162.484µs)

Nomad Client logs (if appropriate)

see above

Job file (if appropriate)

see above

@github-actions
Copy link

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 23, 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