Commit graph

13351 commits

Author SHA1 Message Date
Danielle Tomlinson 2f13e34888
Merge pull request #4859 from hashicorp/b-rawexec-cgroups-root
rawexec: Only use cgroups when running as root.
2018-11-12 13:47:07 -08:00
Mahmood Ali 8513b3cccb Comment public functions and batch write txn 2018-11-12 16:09:39 -05:00
Preetha Appan 20af09a1ef
Fix logic bug in tracking sum of matched affinity weights
We need to track the sum of matching weights per device, but only
change the final return value if its the highest scoring choice
2018-11-12 15:06:45 -06:00
Preetha Appan 3a10a589d7
Fix failing test 2018-11-10 19:53:47 -06:00
Preetha Appan 7ef126a027
Smaller methods, and added tests for RPC layer 2018-11-10 17:37:33 -06:00
Preetha Appan 75662b50d1
Use response object/querymeta/writemeta in scheduler config API 2018-11-10 10:31:10 -06:00
Danielle Tomlinson 880e5015f2 rawexec: Only use cgroups when running as root.
If Nomad is not running as root, we should not try to use cgroups for pid
freezing.

This originally was implemented pre-driver-support in
https://github.com/hashicorp/nomad/blob/v0.8.6/client/driver/raw_exec.go#L120-L130
2018-11-10 06:45:11 -08:00
Mahmood Ali 9c0a15f3ce Run job deregistering in a single transaction
Fixes https://github.com/hashicorp/nomad/issues/4299

Upon investigating this case further, we determined the issue to be a race between applying `JobBatchDeregisterRequest` fsm operation and processing job-deregister evals.

Processing job-deregister evals should wait until the FSM log message finishes applying, by using the snapshot index.  However, with `JobBatchDeregister`, any single individual job deregistering was applied accidentally incremented the snapshot index and resulted into processing job-deregister evals.  When a Nomad server receives an eval for a job in the batch that is yet to be deleted, we accidentally re-run it depending on the state of allocation.

This change ensures that we delete deregister all of the jobs and inserts all evals in a single transactions, thus blocking processing related evals until deregistering complete.
2018-11-09 22:35:26 -05:00
Michael Lange aa0cbadb30 Improve mirage modeling of allocations
Pending allocations never have tasks
2018-11-09 17:11:47 -08:00
Michael Lange 4e21366714
Merge pull request #4852 from hashicorp/b-ui-dispatched-job-page
UI: Show the correct template for dispatched jobs
2018-11-09 14:36:35 -08:00
Michael Lange ec21bab24d
Merge pull request #4833 from hashicorp/b-ui-gracefully-handle-stat-errors
UI: Gracefully handle stat errors
2018-11-09 14:35:48 -08:00
Michael Lange 7c9c099bf0 Add missing module dependencies to the node adapter tests 2018-11-09 14:25:32 -08:00
Michael Lange cf93e1a40c Get error messages closer to Structure designs 2018-11-09 13:23:44 -08:00
Mahmood Ali 9c76a7d9b8 handle nil resources limits
Config may not express resource constraints on the job!
2018-11-09 15:52:44 -05:00
Preetha 8e831fb5fb
Update CHANGELOG.md 2018-11-09 12:29:12 -06:00
Preetha 4b70f64ac9
Update CHANGELOG.md 2018-11-09 12:28:11 -06:00
Preetha 3739713ce1
Merge pull request #4839 from hashicorp/b-gc-alloc-jobversion
Remove terminal allocations associated with older job modify index
2018-11-09 12:21:42 -06:00
Preetha Appan 39072977d6
Use create index as trigger condition to gc old terminal allocs 2018-11-09 11:44:21 -06:00
Preetha Appan 285b9b6001
Normalize scores correctly 2018-11-08 17:01:58 -06:00
Alex Dadgar a81dfdd59d changelog 2018-11-08 14:27:44 -08:00
Alex Dadgar 2f06d88f47
Merge pull request #4847 from hashicorp/b-blocked-eval
Blocked evaluation fixes
2018-11-08 13:40:01 -08:00
Alex Dadgar 98398a8a44
Merge pull request #4842 from hashicorp/b-deployment-progress-deadline
Fix multiple bugs with progress deadline handling
2018-11-08 13:31:54 -08:00
Alex Dadgar 991791a513 typo fix 2018-11-08 13:28:27 -08:00
Danielle Tomlinson f0c798d8bf
Merge pull request #4838 from dantoml/dani/fix-docs-typo
docs: Fix broken link to cloud auto join
2018-11-08 10:59:31 -08:00
Mahmood Ali 1ed53ca478 shorter health descriptions 2018-11-08 10:00:49 -08:00
Mahmood Ali 032f86bc78 Add a helper functions for checking unix root 2018-11-08 10:00:49 -08:00
Mahmood Ali 21d126cd68 Update exec driver to match rawexec
Update exec driver with latest patterns used by rawexec, and eliminate
accidental diffs.
2018-11-08 10:00:49 -08:00
Alex Dadgar be54e56570 review fixes 2018-11-08 09:48:36 -08:00
Preetha Appan f20f2ca8e9
Fixes device scheduling unit tests
Also changes the logic for score when there is more than one task
requesting a device. Since inter task affinities are already normalized,
we take the average of the scores across tasks.
2018-11-08 10:31:19 -06:00
Charlie Voiselle 0247399142
Merge pull request #4851 from pgiles/patch-1
typo fix
2018-11-08 10:56:26 -05:00
Preetha 47a32abd31
Merge pull request #4823 from hashicorp/f-preemption-plan-cli
show preemptions in nomad plan CLI
2018-11-08 09:55:07 -06:00
Preetha Appan f1a69e529c
Fix vet error 2018-11-08 09:48:43 -06:00
Preetha Appan da75388a9b
review feedback 2018-11-08 09:48:43 -06:00
Preetha Appan d88ec0267f
Comments 2018-11-08 09:48:43 -06:00
Preetha Appan 5f0a9d2cfd
Show preemption output in plan CLI 2018-11-08 09:48:43 -06:00
Michael Lange 8e18903996 Show the correct template for parameterized job children 2018-11-07 21:04:27 -08:00
Paul Giles d9a26e910a
typo fix 2018-11-07 17:47:23 -08:00
Michael Lange 5057574c69 Correctly mark parameterized children as parameterized: true 2018-11-07 17:07:40 -08:00
Michael Lange f3110f978e Test coverage for error page escape hatch links 2018-11-07 16:19:45 -08:00
Michael Lange 177a998b1d Add escape hatch links to the error page 2018-11-07 16:09:23 -08:00
Michael Lange 738efdfb04 Fix a bug where with-watchers wasn't bubbling the willTransition event
The impact was the application error was no longer being nulled out,
causing the application error to continue to be shown after
transitioning.

This never happened in apps since it's not possible to transition away
from the error screen.
2018-11-07 16:08:26 -08:00
Michael Lange 777d693632 Add support for link in error containers 2018-11-07 16:08:05 -08:00
Alex Dadgar fcb06c9982
Merge pull request #4830 from hashicorp/f-device-manager
Device Manager
2018-11-07 13:58:32 -08:00
Alex Dadgar c4f9e22aeb fix race 2018-11-07 12:22:07 -08:00
Alex Dadgar dbb05357bc fix test 2018-11-07 11:59:24 -08:00
Alex Dadgar 47fd4d2bf7 remove unused struct field 2018-11-07 11:55:06 -08:00
Alex Dadgar a7c9ba2fa7 seperate struct and proto generation 2018-11-07 11:51:03 -08:00
Alex Dadgar a7ca737fb6 review comments 2018-11-07 11:31:52 -08:00
Michael Lange ab06a22954
Merge pull request #4841 from hashicorp/f-ui-error-handling-on-all-pages
UI: Error handling on all pages
2018-11-07 11:16:06 -08:00
Alex Dadgar b4661df231 reserve uses donectx 2018-11-07 10:43:15 -08:00