Commit Graph

434 Commits

Author SHA1 Message Date
Michael Schurter
9b9a4af182 Invert and test CheckRestart merge logic 2018-01-09 15:17:07 -08:00
Michael Schurter
304a037e39 Fix service.check_restart stanza propagation
There was a bug in jobspec parsing, a bug in CheckRestart merging, and a
bug in CheckRestart canonicalization. All are now tested.
2018-01-09 15:15:36 -08:00
Preetha
781408bbf4 Merge branch 'master' into 0.8 2018-01-03 16:06:38 -06:00
Fabian Holler
957712c587 revert change to increase min. CPU resource value from 20 to 100
In the commit 622d3ddb92
"Fixed test and moved constants into standalone func" the minimum CPU
resource value for a job was increased from 100 to 20.

This can break the nomad setup for people that used lower CPU
values and are at the maximum MHz value of the available CPU on a
machine.
Change the minimum back to 20 MHz to ensure downwards compatibility.
2018-01-02 16:09:44 +01:00
Kyle Havlovitz
de90db139a Added support for v2 raft APIs and -raft-protocol option 2017-12-12 10:17:16 -06:00
Michael Schurter
25569282b9 Allow custom ports for services and checks
Fixes #3380

Adds address_mode to checks (but no auto) and allows services and checks
to set literal port numbers when using address_mode=driver.

This allows SDNs, overlays, etc to advertise internal and host addresses
as well as do checks against either.
2017-12-08 12:03:00 -08:00
Chelsea Holland Komlo
20d1a3b54d fix up test fixture to properly parse 2017-12-06 16:23:55 -05:00
Chelsea Holland Komlo
9e49836d4f move kill_signal to task level, extend to docker 2017-12-06 14:36:39 -05:00
Preetha
5acf776d1d Merge pull request #3536 from angrycub/b-resource-memory-test-fix
Fixed test and moved constants into standalone func
2017-11-13 17:00:14 -06:00
Charlie Voiselle
904d171108 gofmt and goimports 2017-11-13 12:25:02 -05:00
Preetha Appan
4e307587f0 Fixes bug with display message logic due to deprecating GenericSource. Also added more test cases to cover a bunch more edge cases 2017-11-13 11:14:57 -06:00
Charlie Voiselle
622d3ddb92 Fixed test and moved constants into standalone func
In #3520, work was done to true up the defaults for Nomad resource
stanzas with the documentation.  This fixes the tests that I
accidentally broke in the process.  Some questions were raised about
using dynamic elements as part of expects, which is why I opted to
copy the MinResources pattern.   During this refactor I also noticed
that structs.go had a similar issue and an inconsistent minium for CPU.
2017-11-13 12:05:30 -05:00
Alex Dadgar
55bf6851d4 Merge pull request #3520 from hashicorp/b-memory-default-incorrect
`memory` default is 10, not 300
2017-11-10 12:43:37 -08:00
Charlie Voiselle
892f34896b Simplified based on review comments 2017-11-09 20:09:37 -05:00
Charlie Voiselle
20ea6b25dc Adopted pattern from LogConfig to handle panic when no resource stanza at all
In testing realized that Resources night not be present at all.  Testing this case caused panic. Added in a means to collect clean defaults in that case.
2017-11-09 10:57:57 -05:00
Charlie Voiselle
1cb52865bc Canonicalize task and remove merge with MinResources
The current code would merge the job with the output of MinResources causing the nil to be replaced with MemoryMB=helper.IntToPtr(10).  When later `Canonicalize`d, the 10 would cause the default of 300 not to be applied. Running `Canonicalize` on the task itself guarantees that CPU, MemoryMB, and IOPS is set, so we can remove the Merge withMinResources.
2017-11-09 10:10:11 -05:00
Chelsea Komlo
c32486bba3 Merge pull request #3480 from loomnetwork/fix-jobs-tests
jobs tests were sending invalid jobs
2017-11-08 11:49:19 -05:00
Charlie Voiselle
7c98e466fc Rolled back documentation change in favor of correcting the default 2017-11-07 17:17:49 -05:00
Preetha Appan
48f90089d5 Fix formatting 2017-11-03 12:48:55 -05:00
Preetha Appan
aa253b07ab Adds deprecation notice to API struct definition. 2017-11-03 10:12:37 -05:00
Preetha Appan
d63e693679 Move logic for determinic event display message to task_runner, added two new fields DisplayMessage and Details. 2017-11-03 09:13:01 -05:00
Preetha Appan
acfe95887e Add ModifyTime to Allocation and update it both on plan applies and client initiated updates 2017-11-01 15:13:48 -05:00
Matthew Campbell
3b690ba8ef jobs tests were sending invalid jobs 2017-11-01 18:29:15 +07:00
Michael Schurter
cd177f1cbb Merge pull request #3387 from hashicorp/f-aclless-health
Agent Health Endpoint
2017-10-16 11:05:09 -07:00
Alex Dadgar
b973978040 Merge pull request #3384 from hashicorp/f-self-policies
Ability to introspect self token
2017-10-13 17:11:22 -07:00
Michael Schurter
0932f1f786 Add Agent.Health to api package 2017-10-13 16:43:00 -07:00
Alex Dadgar
f6fbb36054 sync 2017-10-13 14:36:02 -07:00
Alex Dadgar
792ffcb283 Self token lookup 2017-10-13 13:12:20 -07:00
Michael Schurter
fae8e7f699 SecretID -> AuthToken 2017-10-12 15:16:33 -07:00
Alex Dadgar
5fdadc9224 fix test 2017-10-11 18:11:03 -07:00
Alex Dadgar
61bcfff20a Change vault_grace default to match vaults 2017-10-11 17:20:12 -07:00
Alex Dadgar
2c4c6b6ff6 Nomad UI Command 2017-10-09 23:01:55 -07:00
Michael Schurter
04b8f8e7fc Remove structs import from api
Goes a step further and removes structs import from api's tests as well
by moving GenerateUUID to its own package.
2017-09-29 10:36:08 -07:00
Alex Dadgar
8750e2da3d Merge pull request #3284 from hashicorp/f-lint
Enable more linters
2017-09-26 15:46:42 -07:00
Alex Dadgar
a9e3a41407 Enable more linters 2017-09-26 15:26:33 -07:00
Michael Schurter
b381b5fff7 grace_period -> grace 2017-09-26 10:21:35 -07:00
Alex Dadgar
46ab2d69b1 handle errors when streaming logs 2017-09-19 10:37:49 -05:00
Alex Dadgar
ddc2efa4ac sync 2017-09-19 10:08:23 -05:00
Michael Schurter
c1cf162d83 Merge pull request #3105 from hashicorp/f-876-restart-unhealthy
Restart unhealthy tasks
2017-09-17 19:38:32 -07:00
Chelsea Holland Komlo
899e0eba7f add acl token as meta flag
add API test for job ACL
2017-09-15 23:33:43 +00:00
Michael Schurter
80147622c5 Add comments 2017-09-15 14:34:36 -07:00
Michael Schurter
092057a32b Canonicalize and Merge CheckRestart in api 2017-09-14 16:48:39 -07:00
Michael Schurter
78c72f8725 Default grace period to 1s 2017-09-14 16:46:54 -07:00
Michael Schurter
555d1e24dc on_warning=false -> ignore_warnings=false
Treat warnings as unhealthy by default
2017-09-14 16:46:54 -07:00
Michael Schurter
bd1a342a92 Nest restart fields in CheckRestart 2017-09-14 16:46:54 -07:00
Michael Schurter
a720bb5a91 Add restart fields 2017-09-14 16:46:54 -07:00
Alex Dadgar
de870afdd5 sync acls 2017-09-13 11:38:29 -07:00
Alex Dadgar
ac1539d5d9 Sync namespace changes 2017-09-07 17:04:21 -07:00
Armon Dadgar
425f0514a6 api: Fixing double region merge conflict 2017-09-04 13:20:51 -07:00
Armon Dadgar
04bcf3cb35 api: full CRUD for ACL token API 2017-09-04 13:09:34 -07:00