Commit graph

13147 commits

Author SHA1 Message Date
Mahmood Ali 343df28165 Fix java driver tests 2018-11-13 10:21:40 -05:00
Mahmood Ali 03148e3167
Merge pull request #4871 from hashicorp/r-job-rerun-bug-changelog
changelog job re-run fix
2018-11-13 10:18:54 -05:00
Mahmood Ali 1403ad21b9 Changelog job re-run fix 2018-11-13 07:52:51 -05:00
Mahmood Ali e2d668f21c
Merge pull request #4861 from hashicorp/b-batch-deregister-transaction
Run job deregistering in a single transaction
2018-11-12 20:59:44 -05:00
Mahmood Ali e506ebbc24
Merge pull request #4845 from hashicorp/r-exec-refactor
Update exec driver to match rawexec
2018-11-12 20:59:32 -05:00
Preetha 8218e197be
Merge pull request #4855 from hashicorp/b-device-scheduling-fixtest
Fixes device scheduling unit tests
2018-11-12 16:55:23 -06:00
Preetha 103bc03467
Merge pull request #4865 from hashicorp/b-preemption-config
improvements to scheduler config API
2018-11-12 16:54:58 -06:00
Preetha Appan fd0ba320da
change path to v1/scheduler/configuration 2018-11-12 15:57:45 -06:00
Preetha Appan de890b9d5c
blank line 2018-11-12 15:50:14 -06:00
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 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
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 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
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
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 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