Preetha Appan
33e170c15d
s/linear/constant/g
2018-03-26 14:45:09 -05:00
Alex Dadgar
d7f246efe1
Drain cli, api, http
2018-03-21 20:27:32 -07:00
Michael Schurter
a854c7bdae
docs: improve DrainRequest.MarkEligible comment
2018-03-21 16:55:22 -07:00
Michael Schurter
a7ab75d853
test: index no longer guaranteed on job list
...
Also switch to require and add t.Helper to appropriate funcs.
2018-03-21 16:55:22 -07:00
Michael Schurter
1cc012966b
api: fix tests to expect default migrate strategy
2018-03-21 16:51:45 -07:00
Michael Schurter
2832853bfa
Add DesiredTransition.ShouldMigrate to api pkg
2018-03-21 16:51:45 -07:00
Alex Dadgar
92b636dd32
Fix deadline handling
2018-03-21 16:51:44 -07:00
Alex Dadgar
7b2bad8c5e
Toggle Drain allows resetting eligibility
...
This PR allows marking a node as eligible for scheduling while toggling
drain. By default the `nomad node drain -disable` commmand will mark it
as eligible but the drainer will maintain in-eligibility.
2018-03-21 16:51:44 -07:00
Alex Dadgar
02019f216a
Correct defaulting
2018-03-21 16:51:44 -07:00
Alex Dadgar
a37329189a
Improve DeadlineTime helper
2018-03-21 16:51:44 -07:00
Alex Dadgar
d47c68f764
Add eligibility to node view
2018-03-21 16:51:44 -07:00
Alex Dadgar
8289cc3c6f
HTTP and API
2018-03-21 16:51:44 -07:00
Alex Dadgar
010228577e
Drain cli, api, http
2018-03-21 16:51:43 -07:00
Michael Schurter
d1ec65d765
switch to new raft DesiredTransition message
2018-03-21 16:49:48 -07:00
Alex Dadgar
db4a634072
RPC, FSM, State Store for marking DesiredTransistion
...
fix build tag
2018-03-21 16:49:48 -07:00
Michael Schurter
c0542474db
drain: initial drainv2 structs and impl
2018-03-21 16:49:48 -07:00
Chelsea Komlo
6fc9231dac
Merge pull request #3856 from hashicorp/f-client-add-health-checks
...
Client driver health checks for Docker
2018-03-21 18:05:00 -04:00
Chelsea Holland Komlo
0bde357731
add concept of health checks to fingerprinters and nodes
...
fix up feedback from code review
add driver info for all drivers to node
2018-03-21 15:15:25 -04:00
Preetha Appan
26b6e70d13
Addressed code review feedback
2018-03-21 09:15:29 -05:00
Preetha Appan
30fff15de7
Show reschedule policy in addition to when the eval will get rescheduled
2018-03-20 13:34:29 -05:00
Alex Dadgar
d498fa950a
Remove fake advertise address and fix TestAPI_OperatorAutopilotServerHealth
2018-03-19 15:49:12 -07:00
Preetha
6df57c177c
Merge pull request #4002 from hashicorp/b-reschedule-systemjob-panic
...
Fix incorrect initialization of reschedule policy for system jobs.
2018-03-19 13:06:55 -05:00
Preetha Appan
1d748663ce
Fix linting
2018-03-19 12:46:55 -05:00
Preetha Appan
161bc66355
Fix incorrect initialization of reschedule policy for system jobs.
2018-03-19 12:16:13 -05:00
Alex Dadgar
9e05c9a50e
Merge pull request #3997 from hashicorp/b-serf-addr
...
RPC Advertise used exclusively for Clients
2018-03-19 09:30:20 -07:00
Alex Dadgar
7e69d16c15
relax timing
2018-03-19 09:30:00 -07:00
Preetha Appan
462b431291
Fix ineffectual assignment lint warnings
2018-03-17 10:49:48 -05:00
Alex Dadgar
6448523b21
fix api job tests
2018-03-16 16:46:22 -07:00
Preetha Appan
9a5e6edf1f
Rename DelayCeiling to MaxDelay
2018-03-14 16:10:32 -05:00
Preetha Appan
342c3fb961
Added FollowupEvalID field and helper methods to calculate reschedule eligibility based on delay
2018-03-14 16:10:32 -05:00
Preetha Appan
5f50c3d618
Add new reschedule options to API layer and unit tests
2018-03-14 16:10:32 -05:00
Alex Dadgar
de6ebb6e6c
small cleanup
2018-03-13 18:08:22 -07:00
Alex Dadgar
63e14b7d63
nodeevents -> events
2018-03-13 18:08:22 -07:00
Chelsea Holland Komlo
d30c269fbe
code review feedback
2018-03-13 18:05:40 -07:00
Chelsea Holland Komlo
00d9923454
Ensure node updates don't strip node events
...
Add node events to CLI
2018-03-13 18:05:40 -07:00
Michael Schurter
7dd7fbcda2
non-Existent -> nonexistent
...
Reverting from #3963
https://www.merriam-webster.com/dictionary/existent
2018-03-12 11:59:33 -07:00
Josh Soref
e2167ef047
spelling: unmarshal
2018-03-11 19:07:44 +00:00
Josh Soref
85fabc63c8
spelling: expected
2018-03-11 17:57:01 +00:00
Josh Soref
7f6e4012a0
spelling: existent
2018-03-11 18:30:37 +00:00
Josh Soref
1c07f37d37
spelling: describing
2018-03-11 17:54:04 +00:00
Josh Soref
79e6481463
spelling: configurations
2018-03-11 17:47:24 +00:00
Josh Soref
95f8098e99
spelling: configuration
2018-03-11 17:48:04 +00:00
Josh Soref
dfec2cb25e
spelling: canonicalize
2018-03-11 17:46:20 +00:00
Alex Dadgar
0715a4884b
fix test
2018-02-15 13:59:03 -08:00
Alex Dadgar
57a0b7a774
allow setting timeout on any api config
2018-02-15 13:59:03 -08:00
Alex Dadgar
aa98f8ba7b
Enhance API pkg to utilize Server's Client Tunnel
...
This PR enhances the API package by having client only RPCs route
through the server when they are low cost and for filesystem access to
first attempt a direct connection to the node and then falling back to
a server routed request.
2018-02-15 13:59:03 -08:00
Kyle Havlovitz
54b691f538
Merge pull request #3852 from hashicorp/autopilot-cleanup
...
Clean up some leftover autopilot differences from Consul
2018-02-14 10:42:32 -08:00
Kyle Havlovitz
709b693d39
Clean up some leftover autopilot differences from Consul
2018-02-08 10:27:26 -08:00
Preetha Appan
12da54ae2b
Fix tests broken by default change to RestartPolicy
2018-02-02 19:25:45 -06:00
Preetha Appan
8ac05d4462
Reuse default policy structs in api, and other code review feedback
2018-01-31 16:33:00 -06:00
Preetha Appan
9d15e0c05b
Code review feedback
2018-01-31 09:58:05 -06:00
Preetha Appan
5714a6b8bf
Add method on API alloc to calculate attempted and remaining reschedule events
2018-01-31 09:58:05 -06:00
Preetha Appan
13444c08a4
Remove unused method
2018-01-31 09:58:05 -06:00
Preetha Appan
e09ea8c0b0
Address code review comments
2018-01-31 09:58:05 -06:00
Preetha Appan
0c56a12a77
Add RescheduleTracker to allocations API struct
2018-01-31 09:56:53 -06:00
Preetha Appan
1f834d1a31
Add reschedule policy to API, and HCL parsing support.
2018-01-31 09:56:53 -06:00
Kyle Havlovitz
cb2321353c
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
2ccf565bf6
Refactor redundancy_zone/upgrade_version out of client meta
2018-01-29 20:03:38 -08:00
Alex Dadgar
31e212f467
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
fd2fbefa4c
Add a field to track the next allocation during a replacement
2018-01-24 17:55:05 -06:00
Kyle Havlovitz
901c8791f4
Merge pull request #3670 from hashicorp/autopilot
...
Add Autopilot feature from Consul
2018-01-19 12:52:56 -08:00
Kyle Havlovitz
8d41f4ad40
Formatting/test adjustments
2018-01-18 15:03:35 -08:00
Kyle Havlovitz
12ff22ea70
Merge branch 'master' into autopilot
2018-01-18 13:29:25 -08:00
Michael Schurter
9fcda9c5aa
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
7b980c42d8
Add raft remove by id endpoint/command
2018-01-16 13:35:32 -08:00
Michael Schurter
224046ece8
Invert and test CheckRestart merge logic
2018-01-09 15:17:07 -08:00
Michael Schurter
7c282f174b
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
1712b03705
Merge branch 'master' into 0.8
2018-01-03 16:06:38 -06:00
Fabian Holler
f99aaa9134
revert change to increase min. CPU resource value from 20 to 100
...
In the commit 622d3ddb92ea7e656ef831641c02024cb5a5d6d1
"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
45e8f977f7
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
1c07066064
Add autopilot functionality based on Consul's autopilot
2017-12-18 14:29:41 -08:00
Kyle Havlovitz
b775fc7b33
Added support for v2 raft APIs and -raft-protocol option
2017-12-12 10:17:16 -06:00
Michael Schurter
4ae115dc59
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
021336eaee
fix up test fixture to properly parse
2017-12-06 16:23:55 -05:00
Chelsea Holland Komlo
b08611cfac
move kill_signal to task level, extend to docker
2017-12-06 14:36:39 -05:00
Preetha
0e6484a397
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
1419e7a1c3
gofmt and goimports
2017-11-13 12:25:02 -05:00
Preetha Appan
be5fd87b9a
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
26acd7f025
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
b68f18bcc5
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
18750980ff
Simplified based on review comments
2017-11-09 20:09:37 -05:00
Charlie Voiselle
c15e91951b
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
eda45a0cee
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
bb96d79cae
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
ff5d1a90a4
Rolled back documentation change in favor of correcting the default
2017-11-07 17:17:49 -05:00
Preetha Appan
61a49e08af
Fix formatting
2017-11-03 12:48:55 -05:00
Preetha Appan
56574ed87d
Adds deprecation notice to API struct definition.
2017-11-03 10:12:37 -05:00
Preetha Appan
5f09c968b3
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
39d70be009
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
7432676e87
jobs tests were sending invalid jobs
2017-11-01 18:29:15 +07:00
Michael Schurter
916682f8a0
Merge pull request #3387 from hashicorp/f-aclless-health
...
Agent Health Endpoint
2017-10-16 11:05:09 -07:00
Alex Dadgar
c3f06b2134
Merge pull request #3384 from hashicorp/f-self-policies
...
Ability to introspect self token
2017-10-13 17:11:22 -07:00
Michael Schurter
f141bf3fe5
Add Agent.Health to api package
2017-10-13 16:43:00 -07:00
Alex Dadgar
c1cc51dbee
sync
2017-10-13 14:36:02 -07:00
Alex Dadgar
dd3920d681
Self token lookup
2017-10-13 13:12:20 -07:00
Michael Schurter
84d8a51be1
SecretID -> AuthToken
2017-10-12 15:16:33 -07:00
Alex Dadgar
68d1a61e8e
fix test
2017-10-11 18:11:03 -07:00
Alex Dadgar
ea4e9ed027
Change vault_grace default to match vaults
2017-10-11 17:20:12 -07:00
Alex Dadgar
6d3d0a9391
Nomad UI Command
2017-10-09 23:01:55 -07:00
Michael Schurter
a66c53d45a
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