Commit Graph

313 Commits

Author SHA1 Message Date
Alex Dadgar
694d9c450a Revert api 2017-04-20 11:14:06 -07:00
Alex Dadgar
b8b18dbe62 Structs 2017-04-20 11:14:06 -07:00
Michael Schurter
7c67166510 Add TLSSkipVerify support to api and parser 2017-04-19 12:45:34 -07:00
Alex Dadgar
f8828a5a50 Fix some tests 2017-04-17 19:39:20 -07:00
Alex Dadgar
376e177836 Status shows type of job 2017-04-15 17:08:05 -07:00
Alex Dadgar
950171f094 non-purge deregisters 2017-04-15 17:08:05 -07:00
Alex Dadgar
330800f683 Agent API + api package 2017-04-15 17:08:05 -07:00
Alex Dadgar
0c94d4822b Upsert Job Histories 2017-04-15 17:08:05 -07:00
Alex Dadgar
e0d165812b Fix api.NetworkResource fields 2017-04-07 18:36:43 -07:00
Alex Dadgar
d212f6fe94 Track task start/finish time & improve logs errors
This PR adds tracking to when a task starts and finishes and the logs
API takes advantage of this and returns better errors when asking for
logs that do not exist.
2017-03-31 16:14:11 -07:00
Michael Schurter
26e6073760 Remove overly clever code 2017-03-27 20:54:43 -07:00
Michael Schurter
73da65d566 Fix TLS use in AllocFS API and region/dc detection 2017-03-27 17:38:16 -07:00
Michael Schurter
ec25a5633c Merge pull request #2412 from barnardb/agent-self
Return AgentSelf struct from Agent.Self() instead of map
2017-03-13 13:29:15 -07:00
Alex Dadgar
4fbe182372 Add metrics to show allocations on the client
This PR adds the following metrics to the client:
client.allocations.migrating
client.allocations.blocked
client.allocations.pending
client.allocations.running
client.allocations.terminal

Also adds some missing fields to the API version of the evaluation.
2017-03-09 12:37:41 -08:00
Ben Barnard
ce1fa4651a Remove duplicate check 2017-03-08 16:19:38 +01:00
Ben Barnard
350934f03b Return AgentSelf struct from Agent.Self() instead of map
api.AgentSelf mirrors command.agent.agentSelf, and makes it easier to
work with the results of a call to Agent.Self()
2017-03-08 15:59:10 +01:00
Alex Dadgar
8eb9a5d819 Make validate work without a Nomad agent 2017-03-03 15:02:03 -08:00
Alex Dadgar
8b1359c2d0 Fix canonicalization of services 2017-03-01 15:30:01 -08:00
Alex Dadgar
07f7e19578 Fix vet script and fix vet problems
This PR fixes our vet script and fixes all the missed vet changes.

It also fixes pointers being printed in `nomad stop <job>` and `nomad
node-status <node>`.
2017-02-27 16:00:19 -08:00
Alex Dadgar
a2fbe09c6d fix check 2017-02-24 15:01:09 -08:00
Alex Dadgar
6799c7667d ensure spec is set 2017-02-24 14:18:09 -08:00
Alex Dadgar
6346b3c9ec Merge pull request #2336 from hashicorp/b-fix-api-panic
Fix API panic and bad missing port check
2017-02-24 13:07:09 -08:00
Michael Schurter
fe4537e1f3 Add Canonicalize test mimicing example job + template 2017-02-24 12:08:31 -08:00
Michael Schurter
d1794c1714 Missed initializing another field in Template! 2017-02-24 10:47:50 -08:00
Michael Schurter
24f5ec3e09 Template.Canonicalize wasn't initializing all fields 2017-02-24 10:31:05 -08:00
Alex Dadgar
c89d8247e6 Merge pull request #2302 from hashicorp/f-task-state-setup
Adding a task event for setup
2017-02-22 18:42:57 -08:00
Diptanu Choudhury
c80bdd9f5f Adding a task event for setup 2017-02-22 18:28:07 -08:00
Alex Dadgar
55e7ad7fd9 Remove defaulting from parse and fix parser tests
This PR removes defaulting from the parse, fixes some regressions that
existed as part of the parser refactor and fixes the tests.
2017-02-22 12:30:05 -08:00
Alex Dadgar
ee76b78922 rebase 2017-02-20 16:43:28 -08:00
Alex Dadgar
69aa5db628 Add leader and timezone to conversion 2017-02-20 16:36:41 -08:00
Alex Dadgar
503746c7c4 Add defaulting test and fix types on the agent job endpoint tests 2017-02-20 15:53:56 -08:00
Alex Dadgar
76ab4b6448 Merge branch 'master' into refactor-parser 2017-02-20 15:13:21 -08:00
Michael Schurter
2b7e091424 Fix API panic and bad missing port check
The format of the missing port error message changed from Go 1.7 to 1.8.
The fix is to just use strings.Contains instead of strings.HasPrefix
when looking for the "missing port" part.

Also add an error return to Client.newRequest as parsing the path
processes arbitrary user input and would panic if given an invalid URL.

See: https://groups.google.com/d/topic/nomad-tool/gi3-CTE7oXo/discussion
2017-02-20 11:12:34 -08:00
Alex Dadgar
fb4b6bdeb2 Merge pull request #2321 from hashicorp/f-timezone
Allow specification of timezones in Periodic Jobs
2017-02-17 11:32:14 -08:00
Alex Dadgar
11e9a10378 Fix embedded meta in dispatch response 2017-02-16 15:47:36 -08:00
Diptanu Choudhury
592bc73a4c Making the job register endpoint use api.Job 2017-02-16 13:52:39 -08:00
Diptanu Choudhury
67e6098f87 Removing un-neccessary conversions 2017-02-16 13:52:39 -08:00
Diptanu Choudhury
5502a669e8 Added tests 2017-02-16 13:52:39 -08:00
Diptanu Choudhury
f551dcb83e Making the job spec return api.Job 2017-02-16 13:52:39 -08:00
Alex Dadgar
8d101c0d25 Allow specification of timezones 2017-02-15 14:37:06 -08:00
Alex Dadgar
cdce86251e Merge pull request #2308 from hashicorp/f-leader-task
Leader task
2017-02-14 11:03:32 -08:00
Alex Dadgar
81c412cda0 Api Leader becomes a pointer 2017-02-13 10:43:33 -08:00
Alex Dadgar
edbc84087c Add Leader support to client 2017-02-10 17:55:19 -08:00
Alex Dadgar
a22f1647f9 Add leader task to api and server side 2017-02-10 16:57:47 -08:00
Alex Dadgar
24995a6749 Operator command/endpoint/documentation 2017-02-09 18:04:46 -08:00
Alex Dadgar
9afa48310e Template destination file permissions.
This PR allows setting the file permissions of the rendered template.
2017-01-31 20:10:01 -08:00
Alex Dadgar
314435261d Rename dispatch_input to dispatch_payload 2017-01-25 21:27:44 -08:00
Michael Schurter
1a845561dd Rename Constructor -> Parameterized Job 2017-01-20 12:43:10 -08:00
Jason Hancock
c6f562249c fix a copy/paste error on api.Regions() comment 2017-01-17 22:48:01 -08:00
Diptanu Choudhury
fca8c2eb9a Added the API for GC of allocations and nodes 2017-01-12 16:18:29 -08:00