Michael Schurter
72e5c0c0aa
Fix whitespace
2017-09-14 16:47:41 -07:00
Michael Schurter
ade29ecbed
Improve check watcher logging and add tests
...
Also expose a mock Consul Agent to allow testing ServiceClient and
checkWatcher from TaskRunner without actually talking to a real Consul.
2017-09-14 16:47:41 -07:00
Michael Schurter
99f4aa999a
Default grace period to 1s
2017-09-14 16:46:54 -07:00
Michael Schurter
a137676358
Add comments and move delay calc to TaskRunner
2017-09-14 16:46:54 -07:00
Michael Schurter
a180c00fc3
on_warning=false -> ignore_warnings=false
...
Treat warnings as unhealthy by default
2017-09-14 16:46:54 -07:00
Michael Schurter
8a87475498
Use existing restart policy infrastructure
2017-09-14 16:46:54 -07:00
Michael Schurter
22690c5f4c
Add check watcher for restarting unhealthy tasks
2017-09-14 16:46:54 -07:00
Michael Schurter
b35d208428
Nest restart fields in CheckRestart
2017-09-14 16:46:54 -07:00
Michael Schurter
bf34505509
Add restart fields
2017-09-14 16:46:54 -07:00
Alex Dadgar
01180fec58
use assert
2017-09-14 14:20:22 -07:00
Alex Dadgar
c55b7ce4d6
Sort /v1/agent/servers output
...
This PR sorts the output of the endpoint since its results are used as
part of Consul checks to avoid the value changing unnecessarily.
Fixes https://github.com/hashicorp/nomad/issues/3211
2017-09-14 14:20:22 -07:00
Chelsea Holland Komlo
c014cb014f
fix bug to return prometheus sink
2017-09-13 19:21:21 +00:00
Chelsea Holland Komlo
fcc3071e52
fixups from code review
2017-09-13 19:21:21 +00:00
Chelsea Holland Komlo
faabf61c6d
updated documentation
2017-09-13 19:21:21 +00:00
Chelsea Holland Komlo
f5975dceb7
refactoring prometheus endpoint
2017-09-13 19:21:21 +00:00
Chelsea Holland Komlo
035fab0c8d
enabling prometheus metrics should be a config option
2017-09-13 19:21:21 +00:00
Chelsea Holland Komlo
d8e9f2fef7
add endpoint for prometheus
2017-09-13 19:21:21 +00:00
Alex Dadgar
109504f4bc
Merge pull request #3192 from hashicorp/f-acl-cli
...
Add ACL Bootstrap CLI
2017-09-13 11:46:15 -07:00
Alex Dadgar
5aa8f1a82e
pass in uid to codecgen
2017-09-11 15:40:27 -07:00
Armon Dadgar
2cacddeff5
command: Add ACL bootstrap command
2017-09-11 10:47:39 -07:00
Armon Dadgar
c234e09d9e
website: document ACL bootstrap reset process
2017-09-10 16:18:39 -07:00
Alex Dadgar
84d06f6abe
Sync namespace changes
2017-09-07 17:04:21 -07:00
Chelsea Komlo
187c1568aa
Merge pull request #3162 from hashicorp/f-tagged-metrics-api
...
Tagged metrics API
2017-09-07 18:03:15 -04:00
Alex Dadgar
9dc8264f32
Add testing around nomad job deployments command
2017-09-06 17:16:46 -07:00
Chelsea Holland Komlo
1238efc2a8
improve documentation
...
move metrics to telemetry; copy to client config
2017-09-06 21:38:06 +00:00
piotr.krolikowski
4f575830ec
Fix panic while running latest deployment command
2017-09-06 20:26:22 +02:00
Chelsea Holland Komlo
66fa05405a
tagged metrics config options should be on telemetry config
...
better api example, add telemetry documentation
2017-09-06 15:25:36 +00:00
Chelsea Holland Komlo
751fc5324e
add http endpoint for in memory metrics
...
prevent against flaky test due to timing/initialization issues
2017-09-06 13:51:19 +00:00
Alex Dadgar
d8b0a37a6b
Merge pull request #3140 from hashicorp/f-round-trip-test
...
Integration test for round tripping a job.
2017-09-05 16:38:41 -07:00
Alex Dadgar
38c0453e68
update test to use assert
2017-09-05 16:38:15 -07:00
Chelsea Holland Komlo
0ef43c3c5f
final code review fixups
2017-09-05 18:47:44 +00:00
Chelsea Holland Komlo
a8cbd0b559
fixups from code review
2017-09-05 14:13:34 +00:00
Chelsea Holland Komlo
b4d21869ca
update comments
2017-09-05 14:13:34 +00:00
Chelsea Holland Komlo
ba4abbe09c
remove prints during test
2017-09-05 14:13:34 +00:00
Chelsea Holland Komlo
5c10a9325e
parse config for metrics fields
2017-09-05 14:13:34 +00:00
Armon Dadgar
0dabcb8659
agent: fix routing for token-specific request
2017-09-04 13:07:44 -07:00
Armon Dadgar
af9caef4b9
Adding a comment to address @dadgar
2017-09-04 13:05:53 -07:00
Armon Dadgar
f1c4143a62
agent: thread ACLs for Job Register
2017-09-04 13:05:53 -07:00
Armon Dadgar
5c94e7e99f
agent: thread through token for ACL endpoint tests
2017-09-04 13:05:53 -07:00
Armon Dadgar
3e46094cee
Passthrough replication token for token/policy replication
2017-09-04 13:05:53 -07:00
Armon Dadgar
4107335cb2
agent: Adding X-Nomad-Token header parsing
2017-09-04 13:05:53 -07:00
Armon Dadgar
4bda2fa9e9
nomad: ACL endpoints check support enabled and redirect to authority
2017-09-04 13:05:53 -07:00
Armon Dadgar
866fe5e216
nomad: adding ACL bootstrapping endpoint
2017-09-04 13:05:53 -07:00
Armon Dadgar
792f176a44
agent: thread ACL config to client
2017-09-04 13:04:45 -07:00
Armon Dadgar
3efdf1f7d9
Address @chelseakomlo comments
2017-09-04 13:04:45 -07:00
Armon Dadgar
018973aea8
Address @dadgar feedback
2017-09-04 13:04:45 -07:00
Armon Dadgar
5b3d6c0a52
Fixing intent
2017-09-04 13:04:45 -07:00
Armon Dadgar
7d4aa1975f
agent: thread through ACL config to Server
2017-09-04 13:04:45 -07:00
Armon Dadgar
9cd8ac832f
agent: Adding ACL block configuration
2017-09-04 13:04:45 -07:00
Armon Dadgar
a45bd0d2a2
agent: fixing ACL endpoint, return updated tokens
2017-09-04 13:04:45 -07:00
Armon Dadgar
bd2db18c80
agent: Adding HTTP endpoints for ACL tokens
2017-09-04 13:04:45 -07:00
Armon Dadgar
18e6053b58
agent: Adding ACL Policy endpoints
2017-09-04 13:03:15 -07:00
Alex Dadgar
cbe8e357e1
Integration test for round tripping a job.
...
This PR adds a test that does:
1) nomad init
2) nomad run example.nomad
3) nomad inspect example
4) Equivalent of `curl -XPUT -d @job.json nomad/v1/job/example
2017-08-30 14:01:42 -07:00
Alex Dadgar
3899aa3211
Sort task groups when displaying a deployment
...
Fixes https://github.com/hashicorp/nomad/issues/3131
2017-08-30 10:41:34 -07:00
Alex Dadgar
96e226f1ee
Merge pull request #3127 from hashicorp/b-tls-api
...
Fix TLSServerName for Node API Client
2017-08-29 16:10:58 -07:00
Alex Dadgar
93add81844
Check for errors initializing client for autocomplete
2017-08-29 14:29:32 -07:00
Alex Dadgar
4b4e6ffa6a
Merge pull request #3120 from hashicorp/b-multi-match
...
Fix exact job match when prefix of other job
2017-08-29 10:15:48 -07:00
Alex Dadgar
f99b13c141
add prefix tests
2017-08-29 10:09:30 -07:00
Alex Dadgar
52fa3396e7
use helper
2017-08-29 10:04:02 -07:00
Alex Dadgar
242d7794b6
respond to comments
2017-08-29 09:46:14 -07:00
Alex Dadgar
8c1573642d
status commands handle uuid prefixes with hyphens
2017-08-29 09:43:28 -07:00
Alex Dadgar
cd613dfaa5
Status honors exact match and displays matches when more than one is available
2017-08-29 08:42:09 -07:00
Michael Schurter
ad9c80e285
Merge pull request #3110 from hashicorp/f-commit-generated
...
Welcome to the brave new world
2017-08-28 16:23:29 -07:00
Alex Dadgar
ac2e20d511
Document new status command
...
This PR documents the new status and job status command.
2017-08-28 16:05:58 -07:00
Michael Schurter
28e9fa73f6
Welcome to the brave new world
...
Committing generated code to help ensure reproducible builds.
2017-08-28 15:51:18 -07:00
Alex Dadgar
e4581f0354
Remove tests checking autocomplete only does 1 arg
2017-08-28 15:42:32 -07:00
Alex Dadgar
5182ebb8cf
don't limit on one arg
2017-08-28 13:40:04 -07:00
Alex Dadgar
1df249f1fb
Reduce startup time on Mac
...
This PR moves creating the API client into the returned predict
function. The creation of the client causes a lookup of all the system
certificates and doing that for each command on mac was extremely slow.
2017-08-28 11:29:27 -07:00
Alex Dadgar
d7d8661485
Search respects QueryOptions and returns QueryMeta
...
@chelseakomlo heads up on this change
2017-08-27 22:17:51 -07:00
Chelsea Holland Komlo
2edf966a62
get status of deployment via status cli command
2017-08-25 21:06:33 +00:00
Chelsea Holland Komlo
8cdc1ece99
add global flags to status; re-order functions
2017-08-25 19:47:21 +00:00
Chelsea Holland Komlo
bd569bc4b9
refactor and fixups from code review
2017-08-25 17:34:05 +00:00
Chelsea Holland Komlo
f32c90cfc0
cli help and logging formatting
2017-08-25 16:42:11 +00:00
Chelsea Holland Komlo
9968689344
fix up formatting of error message
...
fixups from code review
2017-08-25 16:42:11 +00:00
Chelsea Holland Komlo
2f0df8cd80
limit argument autocompletion to one
2017-08-25 16:42:11 +00:00
Chelsea Holland Komlo
7cdf28d303
use existing arg parsing functionality
2017-08-25 16:42:11 +00:00
Chelsea Holland Komlo
3d743a476a
small fixups
2017-08-25 16:42:11 +00:00
Chelsea Holland Komlo
d231b4aa0f
fix autocomplete to list all matches
2017-08-25 16:42:11 +00:00
Chelsea Holland Komlo
a05d7a2a20
default to job status if no arguments are provided
2017-08-25 16:42:11 +00:00
Chelsea Holland Komlo
ffe95a1a62
adds any resource autocomplete
...
defaults to listing jobs if no id is provided
2017-08-25 16:42:11 +00:00
Alex Dadgar
cf7a3fdf51
Autocomplete global flags
2017-08-23 23:29:29 +00:00
Chelsea Holland Komlo
8d4b963151
small fixes and cleanup
2017-08-23 23:04:47 +00:00
Chelsea Holland Komlo
ed2a544502
add global flags to autocomplete
2017-08-23 22:58:44 +00:00
Chelsea Holland Komlo
35f5c8f2dd
use PredictAnything when an flag accepts an argument
2017-08-23 22:58:44 +00:00
Chelsea Holland Komlo
2721e5890f
enable autocompletion of flags
2017-08-23 22:57:07 +00:00
Alex Dadgar
2ee5b6c39d
Change tty detection library
2017-08-23 14:35:50 -07:00
Alex Dadgar
3f0fc016e5
Detect STDOUT isn't a TTY and disable color
...
This PR disables color output when the STDOUT is not a TTY. This makes
running commands under `watch` or other commands nicer.
2017-08-23 14:35:26 -07:00
Alex Dadgar
00947f3ff4
move autocomplete functions to top for consistency of placement
2017-08-22 13:41:42 -07:00
Alex Dadgar
f79c14ac4c
flesh out the rest of the job subcommands
2017-08-22 13:39:06 -07:00
Alex Dadgar
b41be1f85b
update older autocomplete tests to inject state
2017-08-22 13:33:12 -07:00
Alex Dadgar
e3a71f6c53
nomad stop
2017-08-22 13:22:29 -07:00
Alex Dadgar
c172972b61
inspect
2017-08-22 13:19:29 -07:00
Alex Dadgar
554e17c3e9
node drain
2017-08-22 13:13:44 -07:00
Alex Dadgar
17e362e162
logs and fs
2017-08-22 13:11:32 -07:00
Alex Dadgar
02f26f3384
Autocomplete deployment commands
2017-08-22 13:05:24 -07:00
Alex Dadgar
422332c8bf
Merge pull request #3002 from jrasell/gh_2993
...
Add the Nomad agent version to the node-status CLI output.
2017-08-22 10:43:25 -07:00
Chelsea Komlo
49542712f9
Merge pull request #3068 from hashicorp/f-add-deployments-search-api
...
Add deployments to search api
2017-08-21 16:34:00 -04:00
Chelsea Holland Komlo
50c20b1801
add deployments to search api
2017-08-21 15:20:55 +00:00
Michael Schurter
7f6e1f3a9c
Initializing embedded structs is weird
2017-08-17 16:49:14 -07:00
Michael Schurter
0634eef12a
Test createCheckReg
2017-08-17 16:49:14 -07:00