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
Alex Dadgar
d3c3deffad
fixes
2018-03-13 18:08:22 -07:00
Chelsea Holland Komlo
b41501e442
code review feedback
2018-03-13 18:08:21 -07:00
Chelsea Holland Komlo
1488b076d1
code review feedback
2018-03-13 18:08:21 -07:00
Chelsea Holland Komlo
a8bcbd81e6
batch submitting node events
2018-03-13 18:05:40 -07:00
Chelsea Holland Komlo
d30c269fbe
code review feedback
2018-03-13 18:05:40 -07:00
Chelsea Holland Komlo
0f306aa0dd
move all structs to structs file
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
Chelsea Holland Komlo
ae7a2d6eb1
code review feedback
2018-03-13 18:05:40 -07:00
Chelsea Holland Komlo
4ede27a3c8
RPC, FSM, state store for Node.EmitEvent
...
add node event when registering a node for the first time
2018-03-13 18:05:40 -07:00
Chelsea Holland Komlo
9e10e26387
NodeEvents struct
2018-03-13 18:05:40 -07:00
Preetha Appan
e08ecb7da2
Fix incorrect comment
2018-03-13 18:25:41 -05:00
Preetha Appan
9618f52746
Remove error wrapping and make vault connection server side errors clearer.
2018-03-13 17:09:03 -05: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
0ced826ed3
spelling: usage
2018-03-11 19:11:59 +00:00
Josh Soref
173ce63fe9
spelling: transition
2018-03-11 19:06:05 +00:00
Josh Soref
c4c4645f46
spelling: summary
2018-03-11 19:00:07 +00:00
Josh Soref
3140a5dcf9
spelling: response
2018-03-11 18:48:24 +00:00
Josh Soref
4e40338cfa
spelling: rescheduling
2018-03-11 18:40:32 +00:00
Josh Soref
fdd7b5ee9d
spelling: reschedule
2018-03-11 18:50:50 +00:00
Josh Soref
9f2732f405
spelling: requested
2018-03-11 18:43:21 +00:00
Josh Soref
c384e14f3d
spelling: request
2018-03-11 18:42:43 +00:00
Josh Soref
258d76ec13
spelling: registry
2018-03-11 18:41:13 +00:00
Josh Soref
052623bda1
spelling: primitive
2018-03-11 18:38:46 +00:00
Josh Soref
eb127482a4
spelling: policies
2018-03-11 18:37:37 +00:00
Josh Soref
fb5beb664d
spelling: monotonically
2018-03-11 18:28:31 +00:00
Josh Soref
33a0a04941
spelling: missing
2018-03-11 18:27:02 +00:00
Josh Soref
bc4320df3a
spelling: incremented
2018-03-11 18:15:17 +00:00
Josh Soref
69af44e69e
spelling: identifying
2018-03-11 18:15:05 +00:00
Josh Soref
b9d1b98756
spelling: healthy
2018-03-11 18:12:57 +00:00
Josh Soref
7f6e4012a0
spelling: existent
2018-03-11 18:30:37 +00:00
Josh Soref
444341a278
spelling: example
2018-03-11 18:05:59 +00:00
Josh Soref
d9ce1f7882
spelling: deregister
2018-03-11 17:53:22 +00:00
Josh Soref
95f8098e99
spelling: configuration
2018-03-11 17:48:04 +00:00
Josh Soref
ef07cc63d3
spelling: autorevert
2018-03-11 17:42:45 +00:00
Josh Soref
5180b04d39
spelling: arguments
2018-03-11 17:40:28 +00:00
Josh Soref
b8b46d3f74
spelling: allocation
2018-03-11 17:37:22 +00:00
Josh Soref
fb608094ef
spelling: admitting
2018-03-11 17:35:27 +00:00
Chelsea Holland Komlo
b4b0c7cdcf
fix up linting
2018-02-28 12:58:44 -05:00
Chelsea Holland Komlo
a72aaaf47f
add network resources equal method, use time ticker
...
remove impossible test case
2018-02-27 12:42:53 -05:00
Alex Dadgar
ab57db1fad
Increase maximum ACL token length
...
This mitigates issues when generating Nomad ACL tokens from Vault.
2018-02-20 09:52:40 -08:00
Alex Dadgar
e916940cfb
vet
2018-02-15 17:08:58 -08:00
Alex Dadgar
e685211892
Code review feedback
2018-02-15 13:59:02 -08:00
Alex Dadgar
cea77df6a7
Add Streaming RPC ack
...
This PR introduces an ack allowing the receiving end of the streaming
RPC to return any error that may have occured during the establishment
of the streaming RPC.
2018-02-15 13:59:02 -08:00
Alex Dadgar
6b74c8b49e
move error
2018-02-15 13:59:02 -08:00
Alex Dadgar
8854b35b34
Agent logs
2018-02-15 13:59:02 -08:00
Alex Dadgar
c6827dc63d
Refactor client RPCs from server
2018-02-15 13:59:02 -08:00
Alex Dadgar
ca9379be09
Logs over RPC w/ lots to touch up
2018-02-15 13:59:01 -08:00
Alex Dadgar
2c0ad26374
New RPC Modes and basic setup for streaming RPC handlers
2018-02-15 13:59:01 -08:00
Alex Dadgar
b5037f20db
Remove circular dependency
2018-02-15 13:59:01 -08:00
Alex Dadgar
3f786b904b
use server manager
2018-02-15 13:59:01 -08:00
Alex Dadgar
401a510643
Add RPC for querying for Node connections
2018-02-15 13:59:01 -08:00
Alex Dadgar
6dd1c9f49d
Refactor
2018-02-15 13:59:00 -08: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
2a5df68e9a
Change the default mode for client side restarts to fail from delay
2018-01-31 10:39:11 -06:00
Preetha Appan
4fd2691323
Use next alloc id being set, move outside structs package and other code review feedback
2018-01-31 09:58:05 -06:00
Preetha Appan
009df8b986
Unit test for alloc struct's GCEligible method
2018-01-31 09:58:05 -06:00
Preetha Appan
5a4c913879
Make garbage collection be aware of rescheduling info in allocations
2018-01-31 09:58:05 -06:00
Preetha Appan
4cad96a1c3
Remove unnecessary newlines
2018-01-31 09:58:05 -06:00
Preetha Appan
d016cbdf7b
Unit test for alloc struct's GCEligible method
2018-01-31 09:58:05 -06:00
Preetha Appan
dd91a2f5be
Make garbage collection be aware of rescheduling info in allocations
2018-01-31 09:58:05 -06:00
Preetha Appan
2567b51c58
Edge trigger evaluation when allocations client status is failed
2018-01-31 09:56:53 -06:00
Preetha Appan
ea4a889e28
Address more code review feedback
2018-01-31 09:56:53 -06:00
Preetha Appan
6fcd9f67a8
Named fields in unit test and one more test case
2018-01-31 09:56:53 -06:00
Preetha Appan
5ee3cdecc5
Clean up the copy method + unit test
2018-01-31 09:56:53 -06:00
Preetha Appan
8408835af8
Wrap reschedule events in another struct and other review feedback
2018-01-31 09:56:53 -06:00
Preetha Appan
0a39f213e3
Export RescheduleEligible method for accessibility from UpdateAlloc endpoint
2018-01-31 09:56:53 -06:00
Preetha Appan
e2eabffcbd
Add comment
2018-01-31 09:56:53 -06:00
Preetha Appan
28364331cc
New structs and methods for reschedule policy, reschedule tracking and unit tests
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
Chelsea Komlo
d09cc2a69f
Merge pull request #3492 from hashicorp/f-client-tls-reload
...
Client/Server TLS dynamic reload
2018-01-23 05:51:32 -05:00
Michael Schurter
694b547a6b
Merge pull request #3682 from hashicorp/b-3681-always-set-driver-ip
...
Always advertise driver IP when in driver mode
2018-01-22 16:41:34 -08:00
Michael Schurter
8a0cf66822
Improve invalid port error message for services
...
Related to #3681
If a user specifies an invalid port *label* when using
address_mode=driver they'll get an error message about the label being
an invalid number which is very confusing.
I also added a bunch of testing around Service.AddressMode validation
since I was concerned by the linked issue that there were cases I was
missing. Unfortunately when address_mode=driver is used there's only so
much validation that can be done as structs/structs.go validation never
peeks into the driver config which would be needed to verify the port
labels/map.
2018-01-18 15:35:24 -08:00
Kyle Havlovitz
12ff22ea70
Merge branch 'master' into autopilot
2018-01-18 13:29:25 -08:00
Kyle Havlovitz
bc385bcc93
Fix comments/text referring to consul
2018-01-17 00:20:13 -08:00
Kyle Havlovitz
7b980c42d8
Add raft remove by id endpoint/command
2018-01-16 13:35:32 -08:00
James Rasell
2e6af96eec
Use advertise addr not 'unique.network.ip' in verbose node-status
2018-01-11 07:17:58 +00:00
Charlie Voiselle
1bb1ab5069
fix typo
...
Priviledge -> privilege
2018-01-08 15:56:07 -05:00
Chelsea Holland Komlo
0708d34135
call reload on agent, client, and server separately
2018-01-08 09:56:31 -05:00
Chelsea Holland Komlo
3f34b59ee6
remove unnecessary nil checks; default case
...
add tests for TLSConfig object
2018-01-08 09:24:28 -05:00
Chelsea Holland Komlo
6a2432659a
code review fixups
2018-01-08 09:21:06 -05:00
Chelsea Holland Komlo
c0ad9a4627
add ability to upgrade/downgrade nomad agents tls configurations via sighup
2018-01-08 09:21:06 -05:00
Conchubhar Gannon
5847b3eb79
fix(minor typo)
2018-01-08 11:30:00 +00:00
Alex Dadgar
2f561609b7
Fix detection of successful batch allocations
...
This PR restores older behavior of detecting successful batch
allocations (04d86ffd1006fde9dfb2ca8c1237fe60b995b0e3). This has the
side effect that we correctly filter desired status stop but not
successful batch allocations and create their replacements.
2018-01-04 14:20:32 -08:00
Michael Schurter
8496cc8192
Merge pull request #3685 from filipochnik/abs-path
...
Prevent absolute URLs in checks paths
2018-01-04 10:55: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
Filip Ochnik
fc99d3fc2d
Prevent absolute URLs in checks paths
2017-12-21 10:32:12 +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
Alex Dadgar
bfc62ae41c
bump version and remove generated structs
2017-12-19 17:10:52 -08:00
Alex Dadgar
f0127afd93
generated files
2017-12-19 16:57:34 -08:00
Michael Schurter
714eb0b266
Services should not require a port
...
Fixes #3673
2017-12-19 15:50:23 -08:00
Kyle Havlovitz
1c07066064
Add autopilot functionality based on Consul's autopilot
2017-12-18 14:29:41 -08:00
Preetha Appan
40cb1d327c
Address some code review comments
2017-12-18 15:22:23 -06:00
Preetha Appan
3c36abfe14
Update eval modify index as part of plan apply.
2017-12-18 10:03:55 -06:00
Preetha Appan
3b4d7ac2a3
Fix some typos
2017-12-14 13:29:27 -06:00
Kyle Havlovitz
b775fc7b33
Added support for v2 raft APIs and -raft-protocol option
2017-12-12 10:17:16 -06:00
Alex Dadgar
d61ade8f02
remove generated structs
2017-12-11 17:51:41 -08:00
Alex Dadgar
8e63d545c4
generated assets
2017-12-11 17:30:37 -08:00
Chelsea Holland Komlo
5951222ccb
fix for rpc_upgrade_mode
2017-12-11 19:23:45 -05:00
Alex Dadgar
86608124ca
Fix followers not creating periodic launch
...
Fix an issue in which periodic launches wouldn't be made on followers.
2017-12-11 13:55:17 -08:00
Michael Schurter
2dca0671b7
Lowercase service IDs to prevent eye bleeding
2017-12-08 15:54:04 -08:00
Michael Schurter
0d8995fb83
Improve validation and testing of service/check ports
2017-12-08 13:52:23 -08:00
Michael Schurter
d613e0aaf5
Move service hash logic to Service.Hash method
2017-12-08 12:03:43 -08:00
Michael Schurter
b71edf846f
Hash fields used in task service IDs
...
Fixes #3620
Previously we concatenated tags into task service IDs. This could break
deregistration of tag names that contained double //s like some Fabio
tags.
This change breaks service ID backward compatibility so on upgrade all
users services and checks will be removed and re-added with new IDs.
This change has the side effect of including all service fields in the
ID's hash, so we no longer have to track PortLabel and AddressMode
changes independently.
2017-12-08 12:03:43 -08:00
Michael Schurter
af8964e896
Improve port label validation and diff testing
2017-12-08 12:03:43 -08: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
3f231a0856
add test for kill signal in required signals
...
update changelog
2017-12-07 11:40:15 -05:00
Chelsea Holland Komlo
b08611cfac
move kill_signal to task level, extend to docker
2017-12-06 14:36:39 -05:00
Thomas Bartelmess
9acfa166c0
Changed Superset to only return the resource name
...
The Superset method on Resources used to return a string in the format of “[resource name] exhausted”.
This was leading to the output in plan/create job API DimensionExhausted to return keys like
```
"DimensionExhausted": {"cpu exhausted": 1}
```
This was not anywhere documented, however, one of the examples on the website showed it like this.
The other side effect of this is that the CLI formats the strings from the name of the key leading to output like
```
* Dimension "cpu exhausted" exhausted on 1 nodes
```
2017-11-28 23:16:08 -05:00
Thomas Bartelmess
60e4c777ac
Fixed error messges for MeetsMinResources
2017-11-28 19:44:33 -05:00
Preetha
ff23499145
Shorter comment for SetEventDisplayMessage
2017-11-18 09:30:50 -06:00
Preetha Appan
3592635ede
Populate DisplayMessage in various http endpoints that return allocations, plus unit tests.
2017-11-17 14:53:26 -06:00
Preetha Appan
1c4375163a
Change error message to use original name for clarity, rather than the name after substituting env vars with placeholder.
2017-11-17 08:44:18 -06:00
Preetha Appan
d3110f21bd
Changes service name validation logic to ignore any environment variables first.
2017-11-15 15:35:43 -06:00
Chelsea Komlo
2dfda33703
Nomad agent reload TLS configuration on SIGHUP ( #3479 )
...
* Allow server TLS configuration to be reloaded via SIGHUP
* dynamic tls reloading for nomad agents
* code cleanup and refactoring
* ensure keyloader is initialized, add comments
* allow downgrading from TLS
* initalize keyloader if necessary
* integration test for tls reload
* fix up test to assert success on reloaded TLS configuration
* failure in loading a new TLS config should remain at current
Reload only the config if agent is already using TLS
* reload agent configuration before specific server/client
lock keyloader before loading/caching a new certificate
* introduce a get-or-set method for keyloader
* fixups from code review
* fix up linting errors
* fixups from code review
* add lock for config updates; improve copy of tls config
* GetCertificate only reloads certificates dynamically for the server
* config updates/copies should be on agent
* improve http integration test
* simplify agent reloading storing a local copy of config
* reuse the same keyloader when reloading
* Test that server and client get reloaded but keep keyloader
* Keyloader exposes GetClientCertificate as well for outgoing connections
* Fix spelling
* correct changelog style
2017-11-14 17:53:23 -08: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
eda764c0ca
Review feedback + re-add dropped import
2017-11-13 12:51:19 -05:00
Charlie Voiselle
4b186861a9
gofmt and goimports nomad/structs/structs.go
2017-11-13 12:32:52 -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
Preetha
0d0804d6ff
Merge pull request #3496 from hashicorp/b-auto-revert-stable
...
Makes auto reverts robust against infinite revert cycles
2017-11-03 17:28:28 -05:00
Preetha Appan
7526853b4b
Added more unit tests for testing rollback when job has identical spec to AllocHealth and DeploymentStatus endpoints.
2017-11-03 16:07:06 -05:00
Preetha Appan
317fbf04b1
Adds SpecChanged check to alloc health and fail deployment end points, and other code review comments.
2017-11-03 15:33:34 -05:00
Preetha Appan
0eaef09675
Remove event GenericSource, and address other code review comments. Also added deprecation info in comments.
2017-11-03 10:10:06 -05:00
Preetha Appan
b86c5a99b1
Unit test for PopulateEventDisplayMessage
2017-11-03 09:13:01 -05:00
Preetha Appan
7672535290
Added explanatory comment
2017-11-03 09:13:01 -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
5505391663
Fixes auto revert to check if the job's spec has changed before reverting. This prevents infinite reverting when reverting to a job version that was previously stable, but not so after attempting a revert.
2017-11-02 19:53:27 -05:00
Chelsea Holland Komlo
e348deecf5
fixups from code review
2017-11-01 15:21:05 -05:00
Chelsea Holland Komlo
afe9f9a714
add rpc_upgrade_mode as config option for tls upgrades
2017-11-01 15:19:52 -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
Alex Dadgar
51c87ec858
bump version and remove generated
2017-11-01 10:02:25 -07:00
Alex Dadgar
11c24e90a1
generated
2017-11-01 09:42:18 -07:00
Alex Dadgar
51f869040f
remove generated structs
2017-10-31 13:50:16 -07:00
Alex Dadgar
593d4ceb45
generated code
2017-10-25 17:34:24 -07:00
Alex Dadgar
ae6be0dac7
spelling mistake
2017-10-23 15:12:45 -07:00
Alex Dadgar
d3e119f4d0
thread leader token through core gc and test
2017-10-23 15:04:00 -07:00
Alex Dadgar
e7299676f6
generated
2017-10-19 15:20:39 -07:00
Alex Dadgar
c1cc51dbee
sync
2017-10-13 14:36:02 -07:00
Michael Schurter
84d8a51be1
SecretID -> AuthToken
2017-10-12 15:16:33 -07:00
Alex Dadgar
d34c6e0135
fix test
2017-10-11 18:08:37 -07:00
Alex Dadgar
53f2ea88a5
Small fixes
...
This commit:
* Fixes the error checking in migration tests now that we are using the
canonical ErrPermissionDenied error
* Guard against NPE when looking up objects to generate the migration
token
* Handle an additional case in ShouldMigrate()
2017-10-11 17:13:50 -07:00
Chelsea Holland Komlo
c67bfc2ee4
fixups from code review
...
change creation of a migrate token to be for a previous allocation
2017-10-11 17:13:50 -07:00
Chelsea Holland Komlo
36ad6bc6bf
add MigrateTokens to server response for allocs
2017-10-11 17:09:20 -07:00
Michael Schurter
efcc61a253
Merge pull request #3302 from hashicorp/b-remove-structs-from-api
...
Remove `structs` import from `api`
2017-09-29 11:39:43 -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
Michael Schurter
0e0ea82916
Test Check.Header add/removes
2017-09-28 17:08:43 -07:00
Alex Dadgar
fe491421a3
Fix empty map
2017-09-28 16:15:04 -07:00
Michael Schurter
f9b66cbb60
Diff CheckRestart objects
2017-09-28 14:06:18 -07:00
Alex Dadgar
4173834231
Enable more linters
2017-09-26 15:26:33 -07:00
Alex Dadgar
e5ec915ac3
sync
2017-09-19 10:08:23 -05:00
Michael Schurter
c98b79dcb4
Test CheckRestart.Validate
2017-09-15 15:12:47 -07:00
Michael Schurter
573a0df03d
Watched -> TriggersRestart
...
Watched was a silly name
2017-09-14 16:48:39 -07:00
Michael Schurter
d299d42089
Canonicalize and Merge CheckRestart in api
2017-09-14 16:48:39 -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
a180c00fc3
on_warning=false -> ignore_warnings=false
...
Treat warnings as unhealthy by default
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
3904bde9a3
Fix batch handling of complete allocs/node drains
...
This PR fixes:
* An issue in which a node-drain that contains a complete batch alloc
would cause a replacement
* An issue in which allocations with the same name during a scale
down/stop event wouldn't be properly stopped.
* An issue in which batch allocations from previous job versions may not
have been stopped properly.
Fixes https://github.com/hashicorp/nomad/issues/3210
2017-09-14 15:08:57 -07:00
Alex Dadgar
6911bd7676
Worker waits til max ModifyIndex across EvalsByJob
...
This PR fixes a scheduling race condition in which the plan results from
one invocation of the scheduler were not being considered by the next
since the Worker was not waiting for the correct index.
Fixes https://github.com/hashicorp/nomad/issues/3198
2017-09-14 14:28:43 -07:00
Alex Dadgar
9b997d2670
fix multierror merge
2017-09-13 21:48:52 -07:00
Alex Dadgar
a2363e7583
sync acls
2017-09-13 11:38:29 -07:00
Alex Dadgar
5aa8f1a82e
pass in uid to codecgen
2017-09-11 15:40:27 -07:00
Armon Dadgar
20a8e590a0
nomad: support ACL bootstrap reset
2017-09-10 16:03:30 -07:00
Alex Dadgar
84d06f6abe
Sync namespace changes
2017-09-07 17:04:21 -07:00
Armon Dadgar
1c7fb1bfbb
Remove generated structs
2017-09-04 13:33:37 -07:00
Armon Dadgar
97404e3f8c
nomad: compute hash for ACL policies and tokens
2017-09-04 13:09:34 -07:00
Armon Dadgar
ac6283c31f
nomad: enforce ACLs on job submit
2017-09-04 13:05:53 -07:00
Armon Dadgar
387a8a923b
nomad: adding policy subset check
2017-09-04 13:05:53 -07:00
Armon Dadgar
ddcc5f89bc
Add ErrPermissionDenied, rename TokenNotFound
2017-09-04 13:05:53 -07:00
Armon Dadgar
304a02d93b
nomad: Add SecretID to QueryOptions and WriteMeta
2017-09-04 13:05:53 -07:00
Armon Dadgar
e24a4abf2c
nomad: adding ACL bootstrap endpoints
2017-09-04 13:05:53 -07:00
Armon Dadgar
76a03f2d8e
Address @dadgar feedback
2017-09-04 13:05:53 -07:00
Armon Dadgar
e7586a80df
nomad: Switch from SHA1 to Blake2 @chelseakomlo
2017-09-04 13:05:36 -07:00
Armon Dadgar
fc23a4e7e5
structs: sort policies to avoid order dependence for caching
2017-09-04 13:05:36 -07:00
Armon Dadgar
edc38185cc
noamd: Adding batch fetch endpoints for ACL tokens and policies
2017-09-04 13:05:36 -07:00
Armon Dadgar
6a9d4e2dc3
nomad: Adding token resolution endpoint
2017-09-04 13:05:36 -07:00
Armon Dadgar
98e0f98f7e
structs: Adding ACL compilation helper
2017-09-04 13:05:35 -07:00
Armon Dadgar
583e654246
structs: cache key helper for policy list
2017-09-04 13:05:35 -07:00
Armon Dadgar
99cea1ac23
Moving shared ACL objects
2017-09-04 13:04:45 -07:00
Armon Dadgar
583a11cebd
nomad: Adding ability to filter list of tokens to global only
2017-09-04 13:04:45 -07:00
Armon Dadgar
30b607987e
nomad: generate accessor/secret ID server side
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
e5c69f162c
nomad: implement ACL token endpoints
2017-09-04 13:04:45 -07:00
Armon Dadgar
e9c583807a
nomad: adding ACLToken struct
2017-09-04 13:04:45 -07:00
Armon Dadgar
3702587667
nomad: Adding Validate for ACLPolicy
2017-09-04 13:04:44 -07:00
Armon Dadgar
d52e099fc2
Addressing @dadgar feedback
2017-09-04 13:03:15 -07:00
Armon Dadgar
afdde24799
nomad: adding upsert policy endpoint
2017-09-04 13:03:15 -07:00
Armon Dadgar
e3e243f433
nomad: implement policy delete endpoint
2017-09-04 13:03:15 -07:00
Armon Dadgar
e4f5f305ea
nomad: adding Get/List endpoints for ACL policies
2017-09-04 13:03:15 -07:00
Armon Dadgar
4cb544e8f3
nomad: Adding CRUD to state store for ACL Policies
2017-09-04 13:03:14 -07:00
Alex Dadgar
be72602616
Allow distinct_host to have L/RTarget set
...
This PR removes validation that could break job backwards compatibility.
The targets are ignored so there is no side effects.
Fixes https://github.com/hashicorp/nomad/issues/3130
2017-08-30 10:30:01 -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
e6bf8f8e75
Merge pull request #3081 from clinta/maxparallel0
...
If MaxParallel == 0 default limit to count
2017-08-28 12:42:50 -07:00
Alex Dadgar
cff1c5ca08
Merge pull request #3107 from hashicorp/b-migrate-context-all
...
All context should use string context "all"
2017-08-28 12:38:54 -07:00
Chelsea Holland Komlo
6243690899
migrate all context
2017-08-28 05:29:38 +00:00
Alex Dadgar
7ce6c4f6f6
Add QueryOptions to SearchRequest
2017-08-26 15:56:13 -07:00
Clint Armstrong
dc8eab6adc
Set MaxParallel default to 1
2017-08-25 07:56:40 -04: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
c5529bdd16
Put header diff in its own function
2017-08-17 16:49:14 -07:00
Michael Schurter
9a466bcf5e
Add diff support for ServiceCheck.Header
2017-08-17 16:49:14 -07:00
Michael Schurter
bb8d5689d8
Add Header and Method support for HTTP checks
2017-08-17 16:44:21 -07:00
Michael Schurter
8fdd58f55e
Fix ShutdownDelay diff test
2017-08-17 14:05:51 -07:00
Michael Schurter
d529b422b2
Add optional shutdown delay to tasks
...
Fixes #2441
Defaults to 0 (no delay) for backward compat and because this feature
should be opt-in.
2017-08-16 17:59:46 -07:00
James Rasell
0d120228ea
Updates based on feedback provided by dadgar.
2017-08-16 22:19:31 +01:00
Alex Dadgar
fdb8df4a55
Merge pull request #3024 from hashicorp/f-no-revert-target
...
Deployment desc when no stable job and autorevert
2017-08-15 12:24:09 -07:00
Chelsea Komlo
b9f189495a
Merge pull request #2995 from hashicorp/f-allocation-autocomplete
...
Allocation autocomplete, client api
2017-08-14 15:26:39 -04:00
Chelsea Holland Komlo
e658d4daaa
fixups from code review
2017-08-14 17:56:03 +00:00
Chelsea Holland Komlo
69c2b7e308
context constants should be in both api and structs pkg
2017-08-14 17:38:10 +00:00
Chelsea Holland Komlo
9bc48a01a6
using contexts constants in replace of string contexts
...
fix up endpoints
2017-08-14 17:38:10 +00:00
Chelsea Holland Komlo
465c4d7082
change endpoint to /v1/search
2017-08-14 17:38:10 +00:00
Chelsea Holland Komlo
b7736c8b4a
update comments
...
refactor for simplicity
2017-08-14 17:36:14 +00:00
Chelsea Holland Komlo
5ee58a391b
rename to cluster search
...
comment updates
2017-08-14 17:36:14 +00:00
Michael Schurter
b1731d90df
Fix timeout validation for script checks
...
It appears this was disabled a year ago when defaulting and validation
code was probably different: 91bbc5c3c769f4f17134dbc603ec677a178a9e9e
Fixes an issue reported via the mailing list:
https://groups.google.com/d/msg/nomad-tool/yiPCTfOpYn4/yv7MMPUABQAJ
2017-08-14 10:23:52 -07:00
Alex Dadgar
f64b05a001
Deployment desc when no stable job and autorevert
...
This PR adds a specialized description when the job has autorevert set
and there is no job to revert to.
2017-08-12 15:50:51 -07:00
Alex Dadgar
6b238edc22
Merge pull request #3001 from hashicorp/f-template-events
...
Template emits events explaining why it is blocked
2017-08-10 13:00:58 -07:00
“James
d6d721d7c1
Add the Nomad agent version to the node-status CLI putput.
2017-08-10 08:27:26 +01:00
Alex Dadgar
4a88c4133d
Fix broken Template Diff Test
2017-08-08 11:09:27 -07:00
Alex Dadgar
aba107be99
Merge pull request #2979 from lfarnell/cleanup
...
Code cleanup
2017-08-08 10:21:15 -07:00
Alex Dadgar
4f6f6a13c8
Emit generic task events
2017-08-07 21:26:04 -07:00
Alex Dadgar
79d25b7db9
Merge pull request #2947 from hashicorp/f-vault-grace
...
Allow template to set Vault grace
2017-08-07 16:29:53 -07:00
Luke Farnell
f0ced87b95
fixed all spelling mistakes for goreport
2017-08-07 17:13:05 -04:00
Chelsea Holland Komlo
f110fa5c0d
syntax fixups and logging
2017-08-07 14:26:53 +00:00
Chelsea Holland Komlo
1b77f9a216
further refactoring
2017-08-04 22:50:41 +00:00
Chelsea Holland Komlo
1eff731d8b
further refactoring
2017-08-04 15:19:35 +00:00
Chelsea Holland Komlo
b2b4c5d7af
add documentation
...
extract magic number into variable
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
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
Alex Dadgar
2650bb1d12
Distinct Property supports arbitrary limit
...
This PR enhances the distinct_property constraint such that a limit can
be specified in the RTarget/value parameter. This allows constraints
such as:
```
constraint {
distinct_property = "${meta.rack}"
value = "2"
}
```
This restricts any given rack from running more than 2 allocations from
the task group.
Fixes https://github.com/hashicorp/nomad/issues/1146
2017-07-31 16:52:13 -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
Michael Schurter
265e18b8ac
Test for template envvar validation
2017-07-25 20:27:18 -07:00
Michael Schurter
b1c65ca390
Prevent using env templates with signals
2017-07-25 16:34:41 -07:00
Alex Dadgar
9c655e1208
Validate that min_healthy_time < healthy_deadline
...
This PR adds a validation check to the update stanza to ensure that the
min_healthy_time is feasible.
2017-07-25 16:30:53 -07:00
Alex Dadgar
e1888e822c
Merge pull request #2841 from hashicorp/b-rolling-no-fit
...
Treat destructive updates atomically
2017-07-19 11:11:25 -07:00
Alex Dadgar
e51bc66680
Shrink dynamic port range
...
This PR shrinks the dynamic port range to not overlap with most
operating systems ephemeral port range: https://en.wikipedia.org/wiki/Ephemeral_port
2017-07-18 13:47:53 -07:00
Alex Dadgar
22e84d00ab
Fix deep copy of driver config
2017-07-17 17:53:21 -07:00
Alex Dadgar
641e178416
Stop before trying to place
2017-07-17 17:18:12 -07:00
Alex Dadgar
cd78b99d14
Address feedback
2017-07-17 15:35:14 -07:00
Alex Dadgar
aa2126cc1a
Warn instead of error when max_parallel is greater than count.
...
Fixes https://github.com/hashicorp/nomad/issues/2819
2017-07-13 13:10:45 -07:00
Alex Dadgar
79ce4bdfc6
Merge pull request #2807 from hashicorp/f-validate-ports
...
Prevent port conflicts
2017-07-07 16:59:18 -07:00
Alex Dadgar
6cde454509
Handle same task reserving ports twice
2017-07-07 16:58:20 -07:00
Alex Dadgar
f86760db3c
Basic logs
2017-07-07 16:49:08 -07:00
Michael Schurter
e2a79d330c
Prevent port conflicts
...
Validate that no two tasks in the same task group can reserve the same
static port.
2017-07-07 16:17:05 -07:00
Michael Schurter
517c799439
Validate job type
...
Fixes #2722
2017-07-07 15:34:26 -07:00
Alex Dadgar
45712c6ca3
test fixes
2017-07-07 14:11:27 -07:00
Alex Dadgar
3a29b38108
Status description shows requiring promotion
2017-07-07 12:12:48 -07:00
Alex Dadgar
ade9a7c768
@jippi Changed my mind! Good suggestion
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
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
371b2bdacc
add reverted job version to deployment update response
2017-07-07 12:10:04 -07:00
Alex Dadgar
5457bb7962
Job stability
2017-07-07 12:10:04 -07:00
Alex Dadgar
454083ba1b
Remove canary
2017-07-07 12:10:04 -07:00
Alex Dadgar
477c713df5
Plan apply handles canaries and success is set via update
2017-07-07 12:10:04 -07:00
Alex Dadgar
e229d3650b
Attach eval id
2017-07-07 12:10:04 -07:00
Alex Dadgar
af1935e1e1
Mark complete
2017-07-07 12:10:04 -07:00
Alex Dadgar
c10d7ab871
Remove promoted bit from allocation
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
ecee5e370e
initial watcher
2017-07-07 12:07:08 -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
2471b86dec
Show submit time
2017-07-07 12:07:07 -07:00
Alex Dadgar
abf34204cc
JobVersions returns struct with optional diff
2017-07-07 12:05:57 -07:00
Alex Dadgar
b64185a3f1
Deployment GC
...
This PR implements the garbage collector for deployments. Deployments
will by default be garbage collected after 1 hour.
2017-07-07 12:05:57 -07:00
Alex Dadgar
73325f888f
deployment api
2017-07-07 12:03:11 -07:00
Alex Dadgar
c189948ad2
comments on watcher
2017-07-07 12:03:11 -07:00
Alex Dadgar
87d187d777
Tests
2017-07-07 12:03:11 -07:00
Alex Dadgar
423e5b45da
FailDeployment
2017-07-07 12:03:11 -07:00
Alex Dadgar
c52790e448
more tests
2017-07-07 12:03:11 -07:00
Alex Dadgar
013085a62e
Watcher
2017-07-07 12:03:11 -07:00
Alex Dadgar
80dc4d66d8
Deployments list
2017-07-07 12:03:11 -07:00
Alex Dadgar
6688a3f76c
FSM Tests
2017-07-07 12:03:11 -07:00
Alex Dadgar
d04877d23c
initial impl
2017-07-07 12:03:11 -07:00
Alex Dadgar
3f04bb7f26
SpecChanged doesn't mutate passed job
2017-07-07 12:03:11 -07:00
Alex Dadgar
b2573b01f9
Fix canary handling
2017-07-07 12:03:11 -07:00
Alex Dadgar
7952240d69
Deployment tests
2017-07-07 12:03:11 -07:00
Alex Dadgar
c77944ed29
assign names
2017-07-07 12:03:11 -07:00
Alex Dadgar
270e26c600
Populate desired state per tg
2017-07-07 12:03:11 -07:00
Alex Dadgar
cf5baba808
handle annotations
2017-07-07 12:03:11 -07:00
Alex Dadgar
d5ea5a16fd
Small cleanup
2017-07-07 12:03:11 -07:00
Alex Dadgar
07b1c3e5db
Only upsert a job if the spec changes and push deployment creation into reconciler
2017-07-07 12:03:11 -07:00
Alex Dadgar
0d42b5d421
initial reconciler
2017-07-07 12:01:17 -07:00
Alex Dadgar
b3f4db0930
cancel deployments
2017-07-07 12:01:17 -07:00
Michael Schurter
0d3bdf7210
Add support for go-getter modes
...
Fixes #2678
2017-07-06 10:45:44 -07:00
Michael Schurter
5b59bea67b
Move caonicalization from nomad/structs/ to api/
2017-06-21 17:19:08 -07:00
Michael Schurter
73c696e717
Remove readme
2017-06-21 17:19:08 -07:00
Michael Schurter
8d440b1675
Skip DRIVER env vars for labels without a port mapping
2017-06-21 17:19:08 -07:00
Michael Schurter
c0eff81383
Fix Service.AddressMode changes during task updates
2017-06-21 17:19:08 -07:00
Michael Schurter
b9bfb84b53
Implement DriverNetwork and Service.AddressMode
...
Ideally DriverNetwork would be fully populated in Driver.Prestart, but
Docker doesn't assign the container's IP until you start the container.
However, it's important to setup the port env vars before calling
Driver.Start, so Prestart should populate that.
2017-06-21 17:19:08 -07:00
Michael Schurter
bbcea0dff9
Update consul/api and comment to custom http.Client
2017-05-30 15:11:32 -07:00
Michael Schurter
6f2ecdec27
Update consul/api and fix tls handling
...
Since I was already fixing consul's tls handling in #2645 I decided to
update consul/api and pre-emptively fix our tls handling against the
newest consul/api behavior. consul/api's handling of http.Transports has
improved but would have broken how we handled tls (again).
This would have made for a nasty surprise the next time we updated
consul/api.
2017-05-30 15:11:32 -07:00
Michael Schurter
26ee0e6051
Fix diff test
2017-05-26 17:05:14 -07:00
Michael Schurter
10b6610e56
Functional consul template env file support
2017-05-23 13:45:14 -07:00
Alex Dadgar
4503e2d1f7
Merge pull request #2634 from hashicorp/f-update-block
...
New Update block syntax
2017-05-18 13:29:17 -04:00
Alex Dadgar
6d76fb2f17
Merge branch 'master' of github.com:hashicorp/nomad
2017-05-17 14:46:03 -07:00
Alex Dadgar
ee8dd84965
Fix nil job on allocation
...
The way the copying was happening on the alloc_runner was by temporarily
setting the alloc.Job to nil, copying and then restoring it. This
created an issue in which when the alloc was shared (which it is in
server/client mode and between alloc_runner/task_runner) there were race
conditions that could create a panic.
Fixes https://github.com/hashicorp/nomad/issues/2605
2017-05-17 14:07:06 -04:00
Michael Schurter
06f937bf28
Merge pull request #2591 from hashicorp/b-2180-script-updates
...
Properly interpolate services on updated tasks
2017-05-17 09:09:01 -07:00
Michael Schurter
a4e2463477
Fix consul.verify_ssl
...
Was getting ignored and would have defaulted to false if it wasn't
ignored.
Now defaults to true as per docs and isn't ignored.
2017-05-15 15:32:32 -07:00
Alex Dadgar
919c50ba5c
Merge branch 'master' into f-update-block
2017-05-11 13:08:31 -07:00
Alex Dadgar
9a4dd71b6f
Merge pull request #2621 from hashicorp/f-deployments
...
Deployment object and new Plan Apply FSM codepath
2017-05-11 13:08:19 -07:00
Alex Dadgar
83f5e65aae
Plan allows updating the status of deployments
2017-05-11 12:49:04 -07:00
Alex Dadgar
9a576bafd1
Use a detected struct to hold deployment status for an allocation
2017-05-11 11:09:29 -07:00
Alex Dadgar
71788faacd
Easy feedback fixes
2017-05-10 15:26:00 -07:00
Alex Dadgar
3a53bdb669
API defaults use structs default
2017-05-10 13:51:52 -07:00
Alex Dadgar
50eec3ef35
handle upgrading old update block syntax
2017-05-10 13:48:53 -07:00
Alex Dadgar
6232b66ea7
Thread through warnings about deprecations
2017-05-09 20:52:47 -07:00
Alex Dadgar
ba70cc4f01
Merge branch 'master' into f-bolt-db
2017-05-09 11:11:55 -07:00
Alex Dadgar
10b040aea3
New update block; still need to handle the upgrade path
2017-05-08 17:44:26 -07:00
Michael Schurter
85210eb92f
Update consul/api to support unix socket addrs
...
Fixes #2594
2017-05-08 11:57:04 -07:00
Alex Dadgar
7078d563cb
Create Deployments through plan application
2017-05-05 15:33:19 -07:00
Alex Dadgar
343ff03f02
Deployment struct, state store, fsm persist/restore
2017-05-04 13:37:18 -07:00
Alex Dadgar
e65dca8746
Structs
2017-05-04 13:37:17 -07:00
Michael Schurter
b6e97d8523
Merge pull request #2587 from weargoggles/patch-1
...
Verification options for TLS
2017-05-02 10:36:41 -07:00
Alex Dadgar
bddedd7aba
Don't deepcopy job when retrieving copy of Alloc
...
This PR removes deepcopying of the job attached to the allocation in the
alloc runner. This operation is called very often so removing reflect
from the code path and the potentially large number of mallocs need to
create a job reduced memory and cpu pressure.
2017-05-01 14:50:34 -07:00
Alex Dadgar
b67c40f717
Proper denormalization in optimistic state store
2017-05-01 14:49:57 -07:00
Pete Wildsmith
1b8a1614ca
reduce to one configuration option
...
There should be just one option, verify_https_client, which
controls incoming and outgoing validation for the HTTPS wrapper
2017-04-28 10:45:09 +01:00
Michael Schurter
cafefa049b
Properly interpolate services on updated tasks
...
Previously was interpolating the original task's services again.
Fixes #2180
Also fixes a slight memory leak in the new consul agent. Script check
handles weren't being deleted after cancellation.
2017-04-26 11:22:01 -07:00
Pete Wildsmith
c948d2ee27
apply gofmt
2017-04-26 18:58:19 +01:00
Pete Wildsmith
56b122c501
Add verification options to TLS config struct
2017-04-25 23:29:43 +01:00
Alex Dadgar
ac5d65704f
Structs
2017-04-20 11:14:06 -07:00
Michael Schurter
5c621980da
Fix diff test + bonus upgrade to subtests
2017-04-19 12:42:48 -07:00
Michael Schurter
947e31e9c2
Only register HTTPS agent check when Consul>=0.7.2
...
Support for TLSSkipVerify in other checks coming soon!
2017-04-19 12:42:48 -07:00
Alex Dadgar
5a2449d236
Respond to review comments
2017-04-19 10:54:03 -07:00
Alex Dadgar
e7b128271f
Diff code fixes
2017-04-16 16:54:40 -07:00
Alex Dadgar
7b3f3f80fb
Status shows type of job
2017-04-15 17:08:05 -07:00
Alex Dadgar
3145086a42
non-purge deregisters
2017-04-15 17:08:05 -07:00
Alex Dadgar
7abcdff7fd
GetJobVersions server endpoint
2017-04-15 17:08:05 -07:00
Alex Dadgar
fda44689b7
Histories -> Versions
2017-04-15 17:08:05 -07:00
Alex Dadgar
f97664512b
Upsert Job Histories
2017-04-15 17:08:05 -07:00
Alex Dadgar
8aec604e3f
Easy feedback fixes
2017-04-14 13:19:14 -07:00
Alex Dadgar
df7d59051f
Reaping failed evaluations creates follow up eval
...
Create a follow up evaluation when reaping failed evaluations. This
ensures that a job will still make eventual progress.
2017-04-12 14:47:59 -07:00
Alex Dadgar
81b78f77e1
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
2d07b75308
Recoverable struct field must be exported
2017-03-28 12:18:57 -07:00
Michael Schurter
507862ade3
Add WrapRecoverable helper
2017-03-27 15:37:15 -07:00
Michael Schurter
0e6c564406
Improve artifact download error message
...
Fixes #2289
Unfortunately took more RecoverableError hijinx than I would have liked.
There might be a better way.
2017-03-24 15:26:05 -07:00
Alex Dadgar
3b323603b5
Fix diff 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:42:10 -07:00
Alex Dadgar
df9ce2680b
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
56ac0970b4
validation errors
2017-03-11 16:23:24 -08:00
Alex Dadgar
33263ca085
Merge pull request #2418 from hashicorp/f-distinct-property
...
`distinct_property` constraint
2017-03-09 22:15:52 -08:00
Alex Dadgar
9011a7984c
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
abefe537ba
Correct error message re length of service name
...
The error message had an off-by-one error :)
2017-03-08 15:12:30 +01:00
Alex Dadgar
d83a8fe9f2
Unoptimized implementation + testing
2017-03-07 14:48:54 -08:00
Alex Dadgar
3b9bdfef1c
Make validate work without a Nomad agent
2017-03-03 15:02:03 -08:00
Alex Dadgar
5be806a3df
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
c71cd02edf
Fix typo
2017-02-27 11:40:24 -08:00
Alex Dadgar
6936c81720
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
d2cbbac76e
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
98921575af
Adding a task event for setup
2017-02-22 18:28:07 -08:00
Alex Dadgar
eae24d7d3f
Fix flakey test TestNetworkIndex_AssignNetwork_Dynamic_Contention
2017-02-22 15:58:21 -08:00
Alex Dadgar
556fb2562f
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
b49fceb491
rebase
2017-02-20 16:43:28 -08:00
Alex Dadgar
b67c59f03c
Merge branch 'master' into refactor-parser
2017-02-20 15:13:21 -08:00
Alex Dadgar
b2ee70472d
Merge pull request #2331 from hashicorp/b-dispatch-response
...
swap structs
2017-02-17 11:44:19 -08:00
Alex Dadgar
e06056fa82
swap structs
2017-02-17 11:43:14 -08:00
Alex Dadgar
733038bc6c
Remove panic
2017-02-17 11:21:49 -08:00
Diptanu Choudhury
7567209857
Making the job spec return api.Job
2017-02-16 13:52:39 -08:00
Alex Dadgar
471d63d5ff
Fix diff
2017-02-15 15:23:29 -08:00
Alex Dadgar
7e918003ba
Allow specification of timezones
2017-02-15 14:37:06 -08:00
Alex Dadgar
dbc4eac936
Merge pull request #2309 from hashicorp/f-no-root-token
...
Disallow root policy from being specified
2017-02-14 11:06:31 -08:00
Alex Dadgar
b6357f96c5
Merge pull request #2308 from hashicorp/f-leader-task
...
Leader task
2017-02-14 11:03:32 -08:00
Alex Dadgar
89fea63a53
Merge pull request #2305 from hashicorp/f-operator
...
Add nomad operator command for interacting with Raft configuration
2017-02-14 11:01:41 -08:00
Alex Dadgar
7d158a5a7f
Validate the interval within a restart policy
...
This PR ensures that the interval specified is not less than 5 seconds.
Fixes https://github.com/hashicorp/nomad/issues/2286
2017-02-13 15:27:36 -08:00
Alex Dadgar
96c17714cf
Fix test
2017-02-13 14:31:22 -08:00
Alex Dadgar
0b2e2971fd
Disallow root policy from being specified
...
This PR disallows the specification of a root policy by a Nomad task.
2017-02-13 10:51:29 -08:00
Alex Dadgar
238b4bcafd
Add Leader support to client
2017-02-10 17:55:19 -08:00
Alex Dadgar
3ba8faeae3
Add leader task to api and server side
2017-02-10 16:57:47 -08:00
Alex Dadgar
2d4d9b79d8
Operator command/endpoint/documentation
2017-02-09 18:04:46 -08:00
Alex Dadgar
b951b84b44
Merge pull request #2278 from hashicorp/b-consul-merge
...
Fix Consul Config Merging/Copying
2017-02-02 11:39:26 -08:00
Alex Dadgar
7fae2d2cea
Fix Consul Config Merging/Copying
...
This PR fixes config merging/copying code.
Fixes https://github.com/hashicorp/nomad/issues/2264
2017-02-02 11:12:07 -08:00
Alex Dadgar
b40f284bd1
Merge branch 'master' into f-permissions
2017-02-01 16:57:46 -08:00
Alex Dadgar
9c75ec7f57
Add role to merge test
2017-02-01 16:37:08 -08:00
Alex Dadgar
6b7efa1ba6
Template destination file permissions.
...
This PR allows setting the file permissions of the rendered template.
2017-01-31 20:10:01 -08:00
taylorchu
fd34c03d47
TWEAK: remove else block in tls handling
2017-01-26 14:03:32 -08:00
Alex Dadgar
d00355e8d3
Merge branch 'master' into TC_fix_verify_ssl
2017-01-26 13:33:10 -08:00
Alex Dadgar
2057acea3e
missing tests
2017-01-25 21:27:44 -08:00
Alex Dadgar
3e35f453e4
Rename meta/parsing
2017-01-25 21:27:44 -08:00
Alex Dadgar
8196a58c4c
Rename dispatch_input to dispatch_payload
2017-01-25 21:27:44 -08:00
taylorchu
4453a292a2
BUGFIX: fix consul verify_ssl merging
2017-01-25 16:19:39 -08:00
Alex Dadgar
606bb30863
Merge pull request #2226 from hashicorp/b-vault
...
Improve Vault integration and validation
2017-01-23 14:59:41 -08:00
Michael Schurter
3c7e50bc1b
Fix tests
2017-01-20 17:04:52 -08:00
Michael Schurter
295c2bf74a
Merge pull request #2186 from hashicorp/f-driver-cleanup
...
Add Cleanup method to Driver interface
2017-01-20 13:02:14 -08:00
Michael Schurter
1f7b5b4b47
Rename Constructor -> Parameterized Job
2017-01-20 12:43:10 -08:00
Alex Dadgar
fb86904902
Check capabilities, allow creation against role
...
Check the capabilities of the Vault token to ensure it is valid and also
allow targetting of a role that the token is not from.
2017-01-19 13:40:32 -08:00
Diptanu Choudhury
651b3c626d
Merge pull request #2208 from hashicorp/duplicate-service-name
...
register service names with duplicate name
2017-01-18 16:17:45 -08:00
Diptanu Choudhury
e927de02d2
Moved functions to helper from structs
2017-01-18 15:55:14 -08:00
Diptanu Choudhury
b2a494c24e
Ensuring we can register service names with duplicate name but different ports
2017-01-17 12:26:07 -08:00
Michael Schurter
a3a3656dbb
Switch to use recoverable errors from Cleanup
...
TaskRunner handles retrying but Cleanup handles all of CreatedResources.
2017-01-13 16:46:08 -08:00
Diptanu Choudhury
c253f5b17d
Fixed merging consul config
2017-01-05 15:15:43 -08:00
Alex Dadgar
8d5f0fea69
Merge pull request #2128 from hashicorp/f-dispatch
...
Nomad Constructor Jobs and Dispatch
2017-01-06 05:22:49 +08:00
Michael Schurter
4a9a574d9d
Merge pull request #2054 from hashicorp/f-prestart
...
Add Driver.Prestart method
2016-12-20 16:18:56 -08:00
Michael Schurter
2aa235f8f2
Rename InitializationMessage to DriverMessage
2016-12-20 11:51:09 -08:00
Alex Dadgar
4e8035756b
Fix test and prevent job with payload from being submitted
2016-12-18 16:32:14 -08:00
Alex Dadgar
072ff1c3ee
ensure file doesn't escape
2016-12-18 15:48:30 -08:00
Alex Dadgar
aa904b495e
Require batch
2016-12-16 15:20:12 -08:00
Alex Dadgar
a1dd78c24b
Scheduler combines meta from job > group > task
2016-12-15 17:08:38 -08:00
Alex Dadgar
d8de7b59a5
JobDiff
2016-12-15 15:40:18 -08:00
Alex Dadgar
bf1e157bd8
Children fixes + nomad status outputs summaries
...
Children object is always initialized instead of lazily.
`nomad status` outputs children summaries and has specialized view for
constructor jobs.
2016-12-14 16:58:54 -08:00
Alex Dadgar
5a742528c9
dispatch help
2016-12-14 15:19:27 -08:00
Alex Dadgar
4a5c3c8db0
Rename structs
2016-12-14 14:28:43 -08:00
Alex Dadgar
ef79e77e52
Children summary
2016-12-06 17:06:57 -08:00
Alex Dadgar
c005fcb973
Add structs
2016-12-05 17:24:37 -08:00
Michael Schurter
770ed703d0
Add Driver.Prestart method
...
The Driver.Prestart method currently does very little but lays the
foundation for where lifecycle plugins can interleave execution _after_
task environment setup but _before_ the task starts.
Currently Prestart does two things:
* Any driver specific task environment building
* Download Docker images
This change also attaches a TaskEvent emitter to Drivers, so they can
emit events during task initialization.
2016-12-02 11:03:48 -08:00
Alex Dadgar
f0b6d5953c
Remove paused
2016-12-01 13:17:34 -08:00
Alex Dadgar
ac3ed04961
Snappy + Dispatch name change
...
Change the generated name to timestamp + 8 characters of UUID
Add Snappy compression to the input
2016-11-25 20:02:18 -08:00
Alex Dadgar
cfd9593e7a
dispatch beginning
2016-11-25 18:04:55 -08:00
Diptanu Choudhury
5191b4d33a
Making the status command return the allocs of currently registered job
2016-11-24 16:31:30 +01:00
Alex Dadgar
8fb83fbb6c
Parse
2016-11-23 15:48:36 -08:00
Alex Dadgar
54bcde8e36
Dispatch structs
2016-11-23 15:03:13 -08:00
Diptanu Choudhury
b7765a6bf5
Removing QueryMeta from ServerMembersResponse
2016-11-10 15:42:42 -08:00
Diptanu Choudhury
56ed1d3cd8
Fixing the upgrade path for ephemeral disk
2016-11-08 15:24:51 -08:00
Diptanu Choudhury
a1b4b20eff
Changing the API to use the new servermember datastructure
2016-11-06 10:30:43 -08:00
Diptanu Choudhury
9e0507e878
Add an RPC endpoint for server members
2016-11-06 10:16:12 -08:00
Diptanu Choudhury
15f085a4d7
Merge pull request #1931 from hashicorp/rename-vault-config
...
Rename vault config
2016-11-06 10:14:25 -08:00
Diptanu Choudhury
40b9d3bb2d
Fixed comment
2016-11-03 14:45:03 -07:00
Diptanu Choudhury
22681bd8ce
Making AllowUnauthenticated true by default
2016-11-03 14:38:34 -07:00
Diptanu Choudhury
b6f9df5415
Renaming TLS related vault config
2016-11-03 14:24:39 -07:00
Diptanu Choudhury
2dbdf0f755
Adding a default ephemeral disk if it's not added by default
2016-11-02 15:07:22 -07:00
Alex Dadgar
3f69ab130e
can not -> cannot
2016-11-01 16:05:51 -07:00
Alex Dadgar
cf38103b85
Change the 0 timeout, interval validation to be more user friendly
2016-11-01 16:05:51 -07:00
Alex Dadgar
ffefb6d3c1
Fix flaky test
2016-10-27 11:48:00 -07:00
Alex Dadgar
9c9ab621c3
Merge pull request #1872 from hashicorp/f-dequeue
...
Add scheduler version enforcement
2016-10-27 11:42:11 -07:00
Alex Dadgar
ddf5fb82b5
Small cleanups
2016-10-27 10:51:11 -07:00
Alex Dadgar
a1d08c2aba
Add scheduler version enforcement
2016-10-26 14:52:48 -07:00
Michael Schurter
8e3d9d4f4f
Merge pull request #1864 from hashicorp/b-allow-empty-resource
...
Allow omitting resource block entirely
2016-10-26 13:26:04 -07:00
Michael Schurter
41c5bdb510
Document missing task resources handling
2016-10-26 13:21:09 -07:00
Diptanu Choudhury
067fcda3fe
Making the cli use TLS if the client has enabled TLS
2016-10-26 11:13:53 -07:00
Michael Schurter
3ea1fe8d20
Allow omitting resource block entirely
2016-10-26 10:36:41 -07:00
Diptanu Choudhury
50ca5e1e9d
Merge pull request #1853 from hashicorp/f-rpc-http-tls
...
TLS support for http and RPC
2016-10-25 16:14:43 -07:00
Diptanu Choudhury
cf35aeac84
Moving the TLSConfig to structs
2016-10-25 15:57:38 -07:00
Alex Dadgar
4082732d3a
Interpolate and then validate services
2016-10-25 14:27:49 -07:00
Alex Dadgar
8e07c2750e
Merge pull request #1839 from hashicorp/f-signal-constraints
...
Signal creates an auto-constraints
2016-10-25 11:09:33 -07:00
Alex Dadgar
22eb507955
Upper case signals
2016-10-25 11:09:22 -07:00
Alex Dadgar
03eba049ed
Merge pull request #1848 from hashicorp/f-vault-error
...
Thread through whether DeriveToken error is recoverable or not
2016-10-24 15:01:18 -07:00
Alex Dadgar
e85d0ebace
Merge pull request #1840 from hashicorp/f-kill-fail
...
Change how we mark tasks as failed and allow consul-template to fail tasks
2016-10-24 13:40:52 -07:00
Alex Dadgar
0070178741
Thread through whether DeriveToken error is recoverable or not
2016-10-22 18:08:30 -07:00
Michael Schurter
285e80ac0f
Remove disk usage enforcement
...
Many thanks to @iverberk for the original PR (#1609 ), but we ended up
not wanting to ship this implementation with 0.5.
We'll come back to it after 0.5 and hopefully find a way to leverage
filesystem accounting and quotas, so we can skip the expensive polling.
2016-10-21 13:55:51 -07:00
Alex Dadgar
46a7d1a0d7
Change how we mark tasks as failed and allow consul-template to fail tasks
2016-10-20 17:27:16 -07:00
Alex Dadgar
aadc9e3017
Add implicit signal constraint and validate that a driver can handle the signal. Also fixes a bug with plan and implicit constraints by adding them to the job being planned
2016-10-20 13:55:35 -07:00
Alex Dadgar
989827e402
Add set contains
2016-10-19 13:06:28 -07:00
Diptanu Choudhury
7f17c93f89
Ensuring that ephemeral disk is present before deciding if we should migrate ( #1827 )
2016-10-19 11:12:25 -07:00
Alex Dadgar
d6606ecbe5
tests
2016-10-18 14:54:14 -07:00
Alex Dadgar
36cfe6e89e
Large refactor of task runner and Vault token rehandling
2016-10-18 11:24:20 -07:00
Alex Dadgar
af036be754
Struct/api/parsing
2016-10-18 11:24:20 -07:00
Alex Dadgar
53eeec9bc1
Merge pull request #1801 from hashicorp/f-signals
...
Consul-template signal change mode
2016-10-18 11:23:47 -07:00
Alex Dadgar
a0dcd4a228
comment
2016-10-18 11:23:27 -07:00
Diptanu Choudhury
0f6e0d10b6
Enable serf encryption ( #1791 )
...
* Added the keygen command
* Added support for gossip encryption
* Changed the URL for keyring management
* Fixed the cli
* Added some tests
* Added tests for keyring operations
* Added a test for removal of keys
* Added some docs
* Fixed some docs
* Added general options
2016-10-17 10:48:04 -07:00
Alex Dadgar
db4e676d73
Merge pull request #1803 from hashicorp/b-vault-parse
...
Fix Vault Config parsing of booleans
2016-10-11 13:47:46 -07:00
Ben Barnard
83f647ed84
Replace "the the" with "the" in documentation and comments
2016-10-11 15:31:40 -04:00
Alex Dadgar
751aa114bf
Fix Vault parsing of booleans
2016-10-10 18:04:39 -07:00
Alex Dadgar
3d0edaa91e
Ensure templates have different destinations
2016-10-10 15:19:00 -07:00
Alex Dadgar
bc35eaee21
Task runner sends signals
2016-10-10 15:09:00 -07:00
Alex Dadgar
68c5fe78f8
Tests
2016-10-06 15:17:34 -07:00
Alex Dadgar
8fb07bb083
Fix handling of restart in TaskEvents
2016-10-06 15:06:54 -07:00
Alex Dadgar
8eb7fa91cf
Start of integration
2016-10-06 15:05:49 -07:00
Alex Dadgar
3693de99d8
Merge pull request #1783 from hashicorp/f-consul-template
...
Consul template manager
2016-10-06 15:05:01 -07:00
Alex Dadgar
acdbc2e1c9
Fix diff test
2016-10-06 14:14:59 -07:00
Alex Dadgar
19a6aefd68
more vendoring
2016-10-06 12:36:44 -07:00
Alex Dadgar
d2837dec44
Do not allow path to escape the alloc dir for the FS commands
2016-10-03 14:58:44 -07:00
Alex Dadgar
4eaabd675c
Consul Template Manager
2016-10-03 12:59:31 -07:00
Diptanu Choudhury
d50c395421
Getting snapshot of allocation from remote node ( #1741 )
...
* Added the alloc dir move
* Moving allocdirs when starting allocations
* Added the migrate flag to ephemeral disk
* Stopping migration if the allocation doesn't need migration any more
* Added the GetAllocDir method
* refactored code
* Added a test for alloc runner
* Incorporated review comments
2016-10-03 09:59:57 -07:00
Diptanu Choudhury
9b98d70aec
Fixed task group validation tests
2016-09-27 17:57:30 -07:00
Alex Dadgar
fca2becaa5
Parse
2016-09-26 15:36:11 -07:00
Alex Dadgar
b4c3f015bc
Template diff
2016-09-26 15:36:11 -07:00
Alex Dadgar
e925f8ca58
Add template structs
2016-09-26 15:36:11 -07:00
Diptanu Choudhury
dae7f88118
Not setting a drained node as preferred node ( #1740 )
2016-09-23 21:15:50 -07:00
Alex Dadgar
08d79893b0
Merge pull request #1727 from kaskavalci/patch-4
...
Change error message
2016-09-21 13:53:13 -07:00
Alex Dadgar
59df3dcf58
Vault diff
2016-09-21 13:49:34 -07:00
Alex Dadgar
12de69a66f
Struct and parse
2016-09-21 11:31:09 -07:00
Alex Dadgar
5a9919bfbf
Fix VaultPolicies returning non-empty map when there are no policies
2016-09-21 11:14:09 -07:00
Halil Kaskavalci
d166f8e3bf
Lowercase message
2016-09-21 20:43:15 +03:00
Halil Kaskavalci
389beda383
Change error message
...
Local Disk -> Ephemeral Disk
2016-09-21 17:57:19 +03:00
Alex Dadgar
50efdb00e9
Merge pull request #1713 from hashicorp/f-alloc-runner-vault
...
Vault integration in client
2016-09-20 16:15:55 -07:00
Alex Dadgar
64de46432a
Merge pull request #1677 from hashicorp/f-vault-implicit-constraint
...
Vault implicit Task Group constraint + allow root tokens
2016-09-20 16:15:32 -07:00
Alex Dadgar
ada5d8dd0c
alloc-status
2016-09-14 18:27:13 -07:00
Diptanu Choudhury
1b3c5e98c8
Renaming LocalDisk to EphemeralDisk ( #1710 )
...
Renaming LocalDisk to EphemeralDisk
2016-09-14 15:43:42 -07:00
Alex Dadgar
6702a29071
Vault token threaded
2016-09-14 13:30:01 -07:00
Alex Dadgar
874dfbc84a
Implicit vault constraint
2016-09-01 14:23:40 -07:00
Alex Dadgar
3c9936ae4a
Merge pull request #1659 from hashicorp/f-revoke-accessors
...
Token revocation and keeping only a single Vault client active among servers
2016-08-31 14:10:46 -07:00
Diptanu Choudhury
d94bb45ad3
Added some more comments
2016-08-31 14:06:31 -07:00
Diptanu Choudhury
64c57d9136
Added a test
2016-08-31 13:40:43 -07:00
Diptanu Choudhury
52e9946da9
Implemented SetPrefferingNodes in stack
2016-08-30 16:17:50 -07:00
Diptanu Choudhury
bfee7b30a3
Introducing shared resources in alloc
2016-08-29 13:49:25 -07:00
Alex Dadgar
48696ba0cc
Use tomb to shutdown
...
Token revocation
Remove from the statestore
Revoke tokens
Don't error when Vault is disabled as this could cause issue if the operator ever goes from enabled to disabled
update server interface to allow enable/disable and config loading
test the new functions
Leader revoke
Use active
2016-08-28 14:06:25 -07:00
Diptanu Choudhury
3dec7cd2c9
Added LocalDisk to diff
2016-08-26 20:38:50 -07:00
Diptanu Choudhury
e79cb67391
Changing implementation of AllocsFit
2016-08-26 17:28:29 -05:00
Diptanu Choudhury
2f681b6415
Added copy method to LocalDisk
2016-08-26 14:24:47 -05:00
Diptanu Choudhury
b844dc3600
Fixed more tests
2016-08-26 01:51:19 -05:00
Diptanu Choudhury
3447658bba
Added scheduler tests to ensure disk constraints are honored
2016-08-25 15:31:56 -05:00
Diptanu Choudhury
ffaf6c6299
Fixed some tests
2016-08-25 13:56:39 -05:00
Diptanu Choudhury
d156f32f94
Implemented job spec parsing for sticky volumes
2016-08-24 13:51:15 -05:00
Alex Dadgar
db2806a9c1
Merge pull request #1629 from hashicorp/f-derive-token
...
Server Deriving Tokens on behalf of Clients
2016-08-23 13:58:47 -07:00
Alex Dadgar
1da8566322
Merge pull request #1580 from hashicorp/f-disk-usage-monitoring
...
Monitor and enforce shared allocation directory disk usage
2016-08-23 09:49:53 -07:00
Diptanu Choudhury
4ca623bcfe
blocking chained allocations until previous allocation hasn't terminated
2016-08-22 11:34:24 -05:00
Alex Dadgar
10cd844ca8
Commit Vault Accessors to vault and return the response
2016-08-19 16:40:37 -07:00
Alex Dadgar
901000f789
Raft message, fsm and state store table
2016-08-19 16:40:37 -07:00
Alex Dadgar
19752edfaf
Pipeline Vault token creation
2016-08-19 16:40:37 -07:00
Alex Dadgar
94b870a58b
Start
2016-08-19 16:40:37 -07:00
Alex Dadgar
e7e8d5ab50
Merge pull request #1597 from hashicorp/f-node-secret-id
...
Nodes generate Secret ID and used retrieving allocations/registering
2016-08-19 10:51:21 -07:00
Diptanu Choudhury
f8cd51b6e9
Enabling vault if token is present
2016-08-18 12:03:50 -07:00
Ivo Verberk
2a17895a83
Disk resource monitoring and enforcement
2016-08-18 07:59:03 +02:00
Alex Dadgar
895c31f605
Nodes generate Secret ID and used for retrieving allocations and registering
2016-08-17 16:31:47 -07:00
Alex Dadgar
cabc9f829d
Merge pull request #1614 from hashicorp/f-nomad-0.5
...
F nomad 0.5
2016-08-17 16:27:50 -07:00
Alex Dadgar
9bd9948c5b
Job Register endpoint validates token
2016-08-17 16:25:38 -07:00
Alex Dadgar
a8efce874f
Token renewal and beginning of tests
2016-08-17 16:25:38 -07:00
Alex Dadgar
713e310670
Renew loop
2016-08-17 16:25:38 -07:00
Alex Dadgar
750a44b2c0
Create a Vault interface for the server
2016-08-17 16:25:38 -07:00
Alex Dadgar
6e2f0a2776
Server has Vault API client
2016-08-17 16:25:38 -07:00
Diptanu Choudhury
59892e4004
Merge pull request #1612 from hashicorp/diptanu-0-5-branch
...
Chained Allocs
2016-08-17 16:23:32 -07:00
Alex Dadgar
4135b4ece7
Address field name feedback
2016-08-17 16:23:29 -07:00
vishalnayak
bd0a89bdae
Added mapstructure tag for VaultToken
2016-08-17 16:23:29 -07:00
Alex Dadgar
ad088db6eb
Store the Vault token once per job
2016-08-17 16:23:29 -07:00
Alex Dadgar
7d899b6c60
Pass Vault config to client
2016-08-17 16:23:29 -07:00
Alex Dadgar
14b4312502
Add vault struct
2016-08-17 16:23:29 -07:00
Alex Dadgar
eac2675faf
Add enabled field
2016-08-17 16:23:29 -07:00
Alex Dadgar
1584cfe93e
small fixes
2016-08-17 16:23:29 -07:00
Alex Dadgar
0ca4a9fa4f
Change token/role names
2016-08-17 16:23:29 -07:00
Alex Dadgar
adb3ce847f
change config variable names to match vault
2016-08-17 16:23:29 -07:00
Alex Dadgar
fab7893774
vendor + api
2016-08-17 16:23:29 -07:00
Alex Dadgar
b32128aa23
Initial config block
2016-08-17 16:23:29 -07:00
Alex Dadgar
de6e662eb4
Fix service validate test
2016-08-17 11:09:40 -07:00
Alex Dadgar
a3bcc1cbb1
Fix network dynamic port test
2016-08-17 11:08:21 -07:00
Alex Dadgar
be51f1b265
Fix TaskDiff test
2016-08-17 11:07:11 -07:00
Kenjiro Nakayama
b6c39349b7
struct: tiny: output case number of the diff test
2016-08-17 19:15:59 +09:00
Diptanu Choudhury
2e22fea61d
Merge pull request #1599 from hoffoo/initial_check_state
...
Add support for initial check status
2016-08-16 15:16:47 -07:00
Alex Dadgar
8a23780aee
Fix bitmap test and check bitmap bounds
2016-08-16 15:16:35 -07:00
Marin
8fc52974a3
fix initial status tests
2016-08-16 14:34:36 -07:00
Marin
69bc3a8fc8
Add support for initial check status
2016-08-16 12:05:15 -07:00
Diptanu Choudhury
c1a455983d
Added the chained alloc for system scheduler
2016-08-16 10:49:45 -07:00
Alex Dadgar
ce0b78525d
inclusive range
2016-08-15 13:13:04 -07:00
Diptanu Choudhury
761cc40cd2
Fixed a make vet warning
2016-08-12 12:09:44 -07:00
Diptanu Choudhury
d81b20c1a6
Fix network port collisions when asking for dyn ports
2016-08-11 16:18:45 -07:00
Alex Dadgar
5a37e720c5
Fixes plus address feedback
2016-08-10 16:37:26 -07:00
Alex Dadgar
b8fd989d3a
Try stochastic and fallback to precise
2016-08-10 11:47:20 -07:00
Alex Dadgar
1b620bcdd8
Add a test
2016-08-05 16:23:41 -07:00
Alex Dadgar
9089a279a1
Set difference when picking random ports
2016-08-05 16:08:35 -07:00
Alex Dadgar
2fb67fefb5
Merge pull request #1516 from hashicorp/f-lost-state-sched
...
Make scheduler mark allocations as lost
2016-08-04 11:36:02 -07:00
Diptanu Choudhury
74caed0c7a
Added an endpoint for users to reconcile job summaries
2016-08-03 16:12:47 -07:00
Alex Dadgar
ac3328e812
Make scheduler mark allocations as lost
2016-08-03 15:57:46 -07:00
Diptanu Choudhury
0dd8a84de0
Marking the desired state of an allocation as stop if the node on which it runs disconnects
2016-07-27 17:07:08 -07:00
Diptanu Choudhury
dabb83063b
Review comments
2016-07-25 17:26:38 -07:00
Diptanu Choudhury
50842b88c7
Fixed some bugs
2016-07-25 17:26:38 -07:00