Michael Schurter
b4e40efa15
Fix shutdown when consul is down
2017-04-19 12:42:47 -07:00
Michael Schurter
80882f3e0e
Switch ServiceClient to synchronizing state
...
Previously it applied a stream of operations. Reconciling state is less
complex and error prone at the cost of slightly higher CPU/memory usage.
2017-04-19 12:42:47 -07:00
Michael Schurter
b6937912d8
Add UpdateTask method instead of Remove/Add
2017-04-19 12:42:47 -07:00
Michael Schurter
7930d35925
Remove some lies
2017-04-19 12:42:47 -07:00
Michael Schurter
e13b149628
Remove unused syncInterval
2017-04-19 12:42:47 -07:00
Michael Schurter
10cb924b2c
Refactor Consul Syncer into new ServiceClient
...
Fixes #2478 #2474 #1995 #2294
The new client only handles agent and task service advertisement. Server
discovery is mostly unchanged.
The Nomad client agent now handles all Consul operations instead of the
executor handling task related operations. When upgrading from an
earlier version of Nomad existing executors will be told to deregister
from Consul so that the Nomad agent can re-register the task's services
and checks.
Drivers - other than qemu - now support an Exec method for executing
abritrary commands in a task's environment. This is used to implement
script checks.
Interfaces are used extensively to avoid interacting with Consul in
tests that don't assert any Consul related behavior.
2017-04-19 12:42:47 -07:00
Alex Dadgar
ea15f4b05e
Diff code fixes
2017-04-16 16:54:40 -07:00
Alex Dadgar
376e177836
Status shows type of job
2017-04-15 17:08:05 -07:00
Alex Dadgar
5e1e7afc62
GC and some fixes
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
Adam Stankiewicz
4d465091dd
Remove unnecessary parameter from NewHTTPServer
2017-04-10 16:24:49 +02: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
Alex Dadgar
06135c50af
Fix dispatch of periodic job
...
This PR fixes an issue in which when a periodic and parameterized job
was dispatched, an allocation would be immediately created.
Fixes https://github.com/hashicorp/nomad/issues/2470
2017-03-27 16:55:17 -07:00
Alex Dadgar
456da65303
Fix output alignment and remove no-change DC
...
Old Output:
```
+/- Job: "example"
Datacenters {
Datacenters: "dc1"
}
+/- Task Group: "cache" (1 create/destroy update)
+/- RestartPolicy {
+/- Attempts: "10" => "9"
Delay: "25000000000"
Interval: "300000000000"
Mode: "delay"
}
+/- EphemeralDisk {
Migrate: "false"
+/- SizeMB: "300" => "301"
Sticky: "false"
}
+/- Task: "redis" (forces create/destroy update)
+ Meta[key]: "value"
+/- Config {
image: "redis:3.2"
+/- port_map[0][db]: "6379" => "6380"
}
+/- Resources {
CPU: "500"
DiskMB: "0"
IOPS: "0"
+/- MemoryMB: "256" => "257"
}
+/- Service {
Name: "global-redis-check"
PortLabel: "db"
+/- Check {
Command: ""
InitialStatus: ""
Interval: "10000000000"
Name: "alive"
Path: ""
PortLabel: ""
Protocol: ""
+/- Timeout: "2000000000" => "3000000000"
Type: "tcp"
}
}
```
New Output:
```
+/- Job: "example"
+/- Task Group: "cache" (1 create/destroy update)
+/- RestartPolicy {
+/- Attempts: "10" => "9"
Delay: "25000000000"
Interval: "300000000000"
Mode: "delay"
}
+/- EphemeralDisk {
Migrate: "false"
+/- SizeMB: "300" => "301"
Sticky: "false"
}
+/- Task: "redis" (forces create/destroy update)
+ Meta[key]: "value"
+/- Config {
image: "redis:3.2"
+/- port_map[0][db]: "6379" => "6380"
}
+/- Resources {
CPU: "500"
DiskMB: "0"
IOPS: "0"
+/- MemoryMB: "256" => "257"
}
+/- Service {
Name: "global-redis-check"
PortLabel: "db"
+/- Check {
Command: ""
InitialStatus: ""
Interval: "10000000000"
Name: "alive"
Path: ""
PortLabel: ""
Protocol: ""
+/- Timeout: "2000000000" => "3000000000"
Type: "tcp"
}
}
```
2017-03-21 11:31:06 -07:00
Alex Dadgar
6ac999a5e5
Flush logs on err
2017-03-14 14:48:39 -07:00
Alex Dadgar
bfebe1afdc
rename cpu_total_compute and docs
2017-03-14 14:15:49 -07:00
Alex Dadgar
36dc330737
Various fixes
...
This PR:
* Uses Go 1.8 executable lookup
* Stores any err message from stats init method
* Allows overriding of Cpu Compute for hosts where it can't be detected
2017-03-14 12:56:31 -07:00
Alex Dadgar
97a4e136a6
Merge pull request #2427 from hashicorp/f-gc-limit
...
Limit parallelism during garbage collection
2017-03-14 10:45:29 -07:00
Alex Dadgar
701537e9c5
Limit parallelism during garbage collection
...
This PR introduces a parallelism limit during garbage collection. This
is used to avoid large resource usage spikes if garbage collecting many
allocations at once.
2017-03-10 16:27:00 -08: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
be1b4c44f8
Merge pull request #2398 from TheBits/master
...
Remove 'disk space' from docs
2017-03-06 14:52:12 -08:00
Alex Dadgar
d3ee039422
Display Disk resources on CLI
...
Fixes https://github.com/hashicorp/nomad/issues/2401
2017-03-06 12:53:24 -08:00
Sergey Mezentsev
bcc1783e92
Remove 'disk space' from docs
2017-03-04 22:54:49 +03:00
Michael Schurter
b43494d1f5
Small init and validate smoke test
2017-03-03 16:13:25 -08: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
8538770be9
Fix plan
2017-03-01 14:50:26 -08:00
Alex Dadgar
b92e091a81
Handle periodic paramaterized jobs
...
Fixes https://github.com/hashicorp/nomad/issues/2382
2017-03-01 11:45:20 -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
b6991b3357
Allow random UUID
2017-02-27 13:42:37 -08:00
Alex Dadgar
e2d2911d06
Allow specification of eval/job gc threshold
2017-02-27 11:58:10 -08:00
Alex Dadgar
e8e3bbeada
Fix pointer dereference for stats
2017-02-25 13:36:23 -08:00
Sean Chittenden
6fc901a8f3
Change the default display name from the Circonus Instance ID to
...
`Nomad`.
The display name is already scoped to target/host.
2017-02-24 14:59:11 -08:00
Alex Dadgar
22969c07ea
Node-status displays drivers
...
This PR adds the drivers that are enabled to the output of `nomad
node-status`
2017-02-22 18:54:28 -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
Alex Dadgar
85a59d3852
Merge pull request #2347 from hashicorp/b-parse
...
Remove defaulting from parse and fix tests
2017-02-22 18:42:43 -08:00
Diptanu Choudhury
c80bdd9f5f
Adding a task event for setup
2017-02-22 18:28:07 -08:00
Alex Dadgar
6c1673cbc5
Revert "Deregistering non-existant job returns 404"
2017-02-22 18:22:02 -08:00
Alex Dadgar
89b259b089
Fix wrong types
2017-02-22 16:56:51 -08:00
Alex Dadgar
eaa57878d9
Vendor + test fixes
2017-02-22 15:55:33 -08:00
Troy Swanson
fcbffba61a
s/successfully/successful
2017-02-21 10:58:33 -06:00
Alex Dadgar
1ba2875393
Deregistering non-existant job returns 404
...
Fixes https://github.com/hashicorp/nomad/issues/2326
2017-02-20 20:10:21 -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
7cef0d7a6b
fix pointer
2017-02-20 16:22:31 -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
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