Commit Graph

445 Commits

Author SHA1 Message Date
Kyle Havlovitz
d5d719e5a0 Merge pull request #3812 from hashicorp/autopilot-config-change
Refactor redundancy_zone/upgrade_version out of client meta
2018-01-30 16:14:26 -08:00
Kyle Havlovitz
2c873adba4 Refactor redundancy_zone/upgrade_version out of client meta 2018-01-29 20:03:38 -08:00
Alex Dadgar
bb5120fe98 Merge pull request #3684 from jrasell/f_gh_3678
Update `node-status` verbose command to include node address.
2018-01-29 15:32:14 -08:00
Preetha Appan
64e9cf9733 Add a field to track the next allocation during a replacement 2018-01-24 17:55:05 -06:00
Kyle Havlovitz
0dab89f9ac Merge pull request #3670 from hashicorp/autopilot
Add Autopilot feature from Consul
2018-01-19 12:52:56 -08:00
Kyle Havlovitz
4962c8bd26 Formatting/test adjustments 2018-01-18 15:03:35 -08:00
Kyle Havlovitz
4e9735d69f Merge branch 'master' into autopilot 2018-01-18 13:29:25 -08:00
Michael Schurter
94e6b9cff6 Make example service name make sense
Switch from global-redis-check for the example job's service name to
redis-cache. The former name is really confusing and someone finally
called us out on it:

https://groups.google.com/d/msg/nomad-tool/3RTh6CyYkWk/vEe_Sj7lAAAJ

Also specifically mention that the `service.name` parameter is what is
advertised in Consul.
2018-01-17 14:08:30 -08:00
Kyle Havlovitz
254458703b Add raft remove by id endpoint/command 2018-01-16 13:35:32 -08:00
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
James Rasell
3868e88518 Update node-status verbose command to include node address.
This change updates the `nomad node-status -verbose` command to
also include the addreess of the node. This is helpful for cluster
administrators to quickly discover information and access nodes
when required.
2017-12-21 08:58:35 +00:00
Kyle Havlovitz
c2d0c11f9e Add autopilot functionality based on Consul's autopilot 2017-12-18 14:29:41 -08: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