Chelsea Holland Komlo
424e475333
if no context is specified, set maximum index for available contexts
2017-08-04 20:16:49 +00:00
Chelsea Holland Komlo
0b38704392
fix up tests to intantiate assertion test helper
...
add http tests for remaining contexts
2017-08-04 19:48:20 +00:00
Michael Schurter
5794e5ece7
Use int32 for atomic ops to avoid alignment issues
...
From https://golang.org/pkg/sync/atomic/#pkg-note-BUG :
On both ARM and x86-32, it is the caller's responsibility to arrange for
64-bit alignment of 64-bit words accessed atomically. The first word in
a global variable or in an allocated struct or slice can be relied upon
to be 64-bit aligned.
2017-08-04 10:14:16 -07:00
Chelsea Holland Komlo
111019642b
resources are expected by state store to be plural
2017-08-04 15:07:34 +00:00
Chelsea Holland Komlo
b2b4c5d7af
add documentation
...
extract magic number into variable
2017-08-04 14:34:25 +00:00
Chelsea Holland Komlo
b6f459a7a9
refactor rpc endpoint and tests
...
add test for when no prefixes are matched
add test for no context at HTTP api
2017-08-04 14:34:25 +00:00
Chelsea Holland Komlo
7b7a80d6ce
resources list endpoint accepts http POST and PUT
...
set the index for a resources response
2017-08-04 14:34:25 +00:00
Chelsea Holland Komlo
312bb19e1c
refactor and add error handling for invalid context type
2017-08-04 14:34:25 +00:00
Chelsea Holland Komlo
ef5a62aaa1
use upsert as a test helper
2017-08-04 14:34:25 +00:00
Chelsea Holland Komlo
0026a308ec
add truncation boolean to response
2017-08-04 14:34:25 +00:00
Chelsea Holland Komlo
06f10d2e5f
adds evaluations
...
makes context singular
2017-08-04 14:34:25 +00:00
Chelsea Holland Komlo
92cc40f1de
change resources endpoint from http get to post
2017-08-04 14:34:25 +00:00
Chelsea Holland Komlo
64a83edd9f
remove resourceliststub, no need for another layer of abstraction
2017-08-04 14:34:25 +00:00
Chelsea Holland Komlo
36285a4b23
test resources endpoint will return matching prefixes
2017-08-04 14:34:25 +00:00
Chelsea Holland Komlo
ecd0d85a4e
adding test validation that received resources matches requested
2017-08-04 14:34:25 +00:00
Chelsea Holland Komlo
4dd6b46198
Retrieve job information for resources endpoint
...
requires further refactoring and logic for more contexts
2017-08-04 14:34:25 +00:00
Alex Dadgar
067a638478
Allow template to set Vault grace
...
This PR allows a template to specify the Vault grace duration.
Fixes https://github.com/hashicorp/nomad/issues/2922
2017-08-01 14:14:08 -07:00
Dom Udall
cde3da569e
Fixing spelling mistake
...
Updating `deregistraion` -> `deregistration`
2017-08-01 10:26:52 +01:00
Alex Dadgar
7cd6040bdf
Merge pull request #2929 from hashicorp/b-status-panic
...
Ensure backwards compatibility between 0.6.X CLI and 0.5.X
2017-07-31 11:23:37 -07:00
James Nugent
bf13a0cd90
meta: Fix goimports for command/agent/syslog.go
2017-07-30 08:56:40 -05:00
Alex Dadgar
eef3b15005
Ensure backwards compatibility between 0.6.X CLI and 0.5.X
...
This PR goes through the CLI commands and ensures that a 0.6.X cli
gracefully handles interacting with a 0.5.X Nomad Agent.
Fixes https://github.com/hashicorp/nomad/issues/2918
2017-07-28 10:20:47 -07:00
Michael Schurter
7cbae6e168
Merge pull request #2899 from hashicorp/d-mention-env-in-init
...
Mention env templates in nomad init
2017-07-26 11:17:47 -07:00
Alex Dadgar
e0beda704a
New commands docs and small fixes
...
This PR adds the command documentations and has small CLI fixes.
2017-07-25 17:37:09 -07:00
Alex Dadgar
a271b8fc22
inspect
2017-07-25 17:37:09 -07:00
Alex Dadgar
f8b9fc4124
Fix eval-status bug
2017-07-25 17:37:09 -07:00
Michael Schurter
9099371a42
Mention restart
2017-07-25 16:26:42 -07:00
Michael Schurter
d2f8fdcad5
Fix comment
2017-07-25 12:13:05 -07:00
Michael Schurter
3e6231842d
Forgot to setcmdenv
...
This would leak a consul agent
2017-07-25 12:09:57 -07:00
Michael Schurter
da6a5ddaf0
Mention env templates in nomad init
2017-07-25 10:28:50 -07:00
Michael Schurter
4b83eba599
Use seen more conservatively
2017-07-24 16:48:40 -07:00
Michael Schurter
cdf138eb27
Always increment failures...
...
...as it's used in calculating the backoff
2017-07-24 15:37:53 -07:00
Michael Schurter
809724ad8d
Track whether Consul has ever been seen
...
Need a way to squelch Consul operation errors on shutdown. If it's never
been seen don't log errors about deregs failing.
2017-07-24 12:12:02 -07:00
Michael Schurter
edbe62a879
Synchronously deregister agent on shutdown
...
Fixes #2891
Previously the agent services and checks were being asynchrously
deregistered on shutdown, so it was a race between the sync goroutine
deregistering them and Nomad shutting down.
This switches to synchronously deregister agent serivces and checks
which doesn't really have a downside since the sync goroutines retry
behavior doesn't help on shutdown anyway.
2017-07-24 11:40:37 -07:00
Alex Dadgar
553bc91725
Parallel client tests ( #2890 )
...
* alloc_runner
* Random tests
* parallel task_runner and no exec compatible check
* Parallel client
* Fail fast and use random ports
* Fix docker port mapping
* Make concurrent pull less timing dependant
* up parallel
* Fixes
* don't build chroots in parallel on travis
* Reduce parallelism on travis with lxc/rkt
* make java test app not run forever
* drop parallelism a little
* use docker ports that are out of the os's ephemeral port range
* Limit even more on travis
* rkt deadline
2017-07-22 19:04:36 -07:00
Alex Dadgar
4dd5d943c7
remove root requirement on consul integration check
2017-07-21 19:32:41 -07:00
Alex Dadgar
56f9cf86df
Speed up client startup
2017-07-20 22:34:24 -07:00
Alex Dadgar
d7fee07ebc
Parallel
2017-07-20 21:24:21 -07:00
Alex Dadgar
c106df9215
Switch to in-process agent
2017-07-20 21:07:32 -07:00
Alex Dadgar
d019eed363
Merge pull request #2874 from hashicorp/f-command-agent-tests
...
Parallelize the command/agent tests and add new test agent
2017-07-20 20:27:49 -07:00
Alex Dadgar
5df9be0ccb
Fix bootstrapping and waiting
2017-07-20 20:15:37 -07:00
Alex Dadgar
15fad96c21
Merge pull request #2868 from hashicorp/f-feedback
...
Variety of UX fixes
2017-07-20 17:43:42 -07:00
Alex Dadgar
da13d5a61c
Fix test
2017-07-20 17:42:58 -07:00
Alex Dadgar
40ca1298b3
Multiple matched objects now treated as an error condition.
2017-07-20 17:31:07 -07:00
Michael Schurter
6b2cb6bb23
Don't display UNIX epoch dates
...
Submitted times are UNIX epoch for jobs created before 0.6 which is
confusing in the CLI. Display nothing instead (formatted as "<none>").
2017-07-20 15:43:00 -07:00
Alex Dadgar
4e90d56098
More parallel
2017-07-20 09:36:34 -07:00
Alex Dadgar
9037693436
New test agent
2017-07-19 22:14:36 -07:00
Alex Dadgar
9a2a5af608
Don't print atlas
2017-07-19 20:25:06 -07:00
Alex Dadgar
d5278a62e7
Job promote command
2017-07-19 15:39:32 -07:00
Alex Dadgar
5a526d9f37
Inspect job at a particular version
2017-07-19 13:44:30 -07:00
Alex Dadgar
39e7a26e5d
Small fixes and UX changes
2017-07-19 13:34:24 -07:00
Alex Dadgar
18c7043a30
Merge pull request #2866 from hashicorp/f-autocomplete-agent
...
Agent command autocompletes to hcl/json files
2017-07-19 13:18:32 -07:00
Michael Schurter
c9e4c041b3
Too lazy to remember the right formatter for floats
2017-07-19 11:53:18 -07:00
Alex Dadgar
b4b50b636f
Fix predictor
2017-07-19 11:51:01 -07:00
Alex Dadgar
871cdcb932
Agent command autocompletes to hcl/json files
2017-07-19 11:28:16 -07:00
Michael Schurter
40c2d4e5eb
Merge pull request #2858 from hashicorp/b-2849-deploy-json
...
Implement -json for job deployments
2017-07-19 10:15:01 -07:00
Michael Schurter
125a3fb2f9
Error -> Errof
2017-07-19 10:00:57 -07:00
Alex Dadgar
747d67eb3f
Allow tuning of heartbeat ttls
...
This PR allows tuning of heartbeat TTLs. An example of very aggressive
settings is as follows:
```
server {
heartbeat_grace = "1s"
min_heartbeat_ttl = "1s"
max_heartbeats_per_second = 200.0
}
```
2017-07-19 09:38:35 -07:00
Michael Schurter
3eaa3b2ec3
Implement -json for job deployments
...
Fixes #2849
2017-07-18 17:28:44 -07:00
Michael Schurter
dbcb19c6d9
Merge pull request #2854 from hashicorp/b-2827-agent-services
...
Never remove unknown agent services
2017-07-18 14:48:36 -07:00
Michael Schurter
99d1486f32
Never remove unknown agent services
...
Fixes #2827
This is a tradeoff. The pro is that you can run separate client and
server agents on the same node and advertise both. The con is that if a
Nomad agent crashes and isn't restarted on that node in the same mode
its entry will not be cleaned up.
That con scenario seems far less likely to occur than the scenario on
the pro side, and even if we do leak an agent entry the checks will be
failing so nothing should attempt to use it.
2017-07-18 13:23:01 -07:00
Alex Dadgar
484e9f2693
Autocomplete files
...
This PR makes run, validate and plan autocomplete their arg to
appropriate files.
2017-07-18 13:18:17 -07:00
Alex Dadgar
c10b6c0560
Merge pull request #2842 from hashicorp/d-init
...
Update init command to show new update stanza.
2017-07-17 15:04:49 -07:00
Alex Dadgar
53bcc6a2cc
spelling errors
2017-07-17 11:19:37 -07:00
Alex Dadgar
df3d9229fe
Allow cli package to handle version.
...
This PR removes our custom handling of the version flag and updates job
history to use a version flag instead of `-job-version`.
2017-07-17 11:04:07 -07:00
Alex Dadgar
129d5fd4c3
Update init command to show new update stanza.
2017-07-16 11:12:43 -07:00
Alex Dadgar
05894f4611
Small fixes
2017-07-07 17:34:50 -07:00
Alex Dadgar
45712c6ca3
test fixes
2017-07-07 14:11:27 -07:00
Alex Dadgar
bf2dafb8e9
check id method name changed
2017-07-07 12:15:09 -07:00
Alex Dadgar
ade9a7c768
@jippi Changed my mind! Good suggestion
2017-07-07 12:12:48 -07:00
Alex Dadgar
e6f5e3f301
deployment status in job status view
2017-07-07 12:12:48 -07:00
Alex Dadgar
770af68119
alloc-status
2017-07-07 12:12:48 -07:00
Alex Dadgar
40b04a5ea9
alloc-list shows version
2017-07-07 12:12:48 -07:00
Alex Dadgar
7867f2cdb8
deployment status indicates whether canaries were promoted
2017-07-07 12:12:48 -07:00
Alex Dadgar
4e014e36f7
Fix broken things on deployment promote
2017-07-07 12:12:48 -07:00
Alex Dadgar
9f016606aa
Fix some tests, eval monitor shows deployment id and deployment cancels based on version
2017-07-07 12:12:48 -07:00
Alex Dadgar
398c4a6be7
Vendor columnize
2017-07-07 12:11:39 -07:00
Alex Dadgar
91451228eb
Fix some commands test
2017-07-07 12:11:39 -07:00
Alex Dadgar
1cb877699a
Disallow update stanza on batch jobs
...
This PR:
* disallows update stanzas on batch jobs
* undeprecates the stagger field
* changes the way warnings are returned
2017-07-07 12:11:39 -07:00
Alex Dadgar
bfc22346d5
Return the reverted job version
2017-07-07 12:10:04 -07:00
Alex Dadgar
5457bb7962
Job stability
2017-07-07 12:10:04 -07:00
Alex Dadgar
09dfa2fc10
Rename CreateDeployments and remove cancelling behavior in state_store
2017-07-07 12:10:04 -07:00
Alex Dadgar
067ed86a47
Client watches for allocation health using task state and Consul checks
...
This PR adds watching of allocation health at the client. The client can
watch for health based on the tasks running on time and also based on
the consul checks passing.
2017-07-07 12:10:04 -07:00
Alex Dadgar
780de092ce
Formatting abilities
2017-07-07 12:07:07 -07:00
Alex Dadgar
9ee5540d3c
job deployments
2017-07-07 12:07:07 -07:00
Alex Dadgar
2aa6c13349
deployment promote
2017-07-07 12:07:07 -07:00
Alex Dadgar
58426f0055
fail,pause,resume commands
2017-07-07 12:07:07 -07:00
Alex Dadgar
e7034691ea
deployment status
2017-07-07 12:07:07 -07:00
Alex Dadgar
57cbbf87f8
deployment list
2017-07-07 12:07:07 -07:00
Alex Dadgar
57d07ecd89
small fixes
2017-07-07 12:07:07 -07:00
Alex Dadgar
7719306ef3
job revert
2017-07-07 12:07:07 -07:00
Alex Dadgar
2471b86dec
Show submit time
2017-07-07 12:07:07 -07:00
Alex Dadgar
95c7a5bcf3
job history
2017-07-07 12:05:57 -07:00
Alex Dadgar
abf34204cc
JobVersions returns struct with optional diff
2017-07-07 12:05:57 -07:00
Alex Dadgar
c643e6b0d1
Add config options
2017-07-07 12:05:56 -07:00
Alex Dadgar
f233629a4f
job deployment endpoint + api
2017-07-07 12:05:56 -07:00
Alex Dadgar
580eed5c88
HTTP Endpoints
2017-07-07 12:03:11 -07:00
Alex Dadgar
23dcd175ef
Show canaries on plan
2017-07-07 12:03:11 -07:00
Michael Schurter
cab28b2963
Fix api endpoint test
2017-07-06 10:45:44 -07:00
Michael Schurter
0d3bdf7210
Add support for go-getter modes
...
Fixes #2678
2017-07-06 10:45:44 -07:00
Michael Schurter
b9c9e6e557
Fix no_host_uuid parsing
...
Need to pointerify it to default to true since we can't tell false from
unset if it's not a pointer.
2017-07-03 17:41:20 -07:00