Jasmine Dahilig
12393f90e7
add test for lifecycle coordinator
2020-03-21 17:52:42 -04:00
Seth Hoenig
9df33f622f
nomad: proxy requests for Service Identity tokens between Clients and Consul
...
Nomad jobs may be configured with a TaskGroup which contains a Service
definition that is Consul Connect enabled. These service definitions end
up establishing a Consul Connect Proxy Task (e.g. envoy, by default). In
the case where Consul ACLs are enabled, a Service Identity token is required
for these tasks to run & connect, etc. This changeset enables the Nomad Server
to recieve RPC requests for the derivation of SI tokens on behalf of instances
of Consul Connect using Tasks. Those tokens are then relayed back to the
requesting Client, which then injects the tokens in the secrets directory of
the Task.
2020-01-31 19:03:53 -06:00
Michael Schurter
95fd2643d7
connect: canonicalize before adding sidecar
...
Fixes #6853
Canonicalize jobs first before adding any sidecars. This fixes a bug
where sidecar tasks were added without interpolated names and broke
validation. Sidecar tasks must be canonicalized independently.
Also adds a group network to the mock connect job because it wasn't a
valid connect job before!
2019-12-12 20:55:56 -08:00
Michael Schurter
5957030d18
connect: add unix socket to proxy grpc for envoy ( #6232 )
...
* connect: add unix socket to proxy grpc for envoy
Fixes #6124
Implement a L4 proxy from a unix socket inside a network namespace to
Consul's gRPC endpoint on the host. This allows Envoy to connect to
Consul's xDS configuration API.
* connect: pointer receiver on structs with mutexes
* connect: warn on all proxy errors
2019-09-03 08:43:38 -07:00
Jasmine Dahilig
4edebe389a
add default update stanza and max_parallel=0 disables deployments ( #6191 )
2019-09-02 10:30:09 -07:00
Mahmood Ali
3da10b5cb3
scheduler: tests for multiple drivers in TG
2019-08-29 09:03:31 -04:00
Danielle Lancashire
b38c1d810e
job_endpoint: Validate volume permissions
2019-08-12 15:39:09 +02:00
Jasmine Dahilig
8d980edd2e
add create and modify timestamps to evaluations ( #5881 )
2019-08-07 09:50:35 -07:00
Alex Dadgar
4bdccab550
goimports
2019-01-22 15:44:31 -08:00
Alex Dadgar
1e3c3cb287
Deprecate IOPS
...
IOPS have been modelled as a resource since Nomad 0.1 but has never
actually been detected and there is no plan in the short term to add
detection. This is because IOPS is a bit simplistic of a unit to define
the performance requirements from the underlying storage system. In its
current state it adds unnecessary confusion and can be removed without
impacting any users. This PR leaves IOPS defined at the jobspec parsing
level and in the api/ resources since these are the two public uses of
the field. These should be considered deprecated and only exist to allow
users to stop using them during the Nomad 0.9.x release. In the future,
there should be no expectation that the field will exist.
2018-12-06 15:09:26 -08:00
Alex Dadgar
4ee603c382
Device hook and devices affect computed node class
...
This PR introduces a device hook that retrieves the device mount
information for an allocation. It also updates the computed node class
computation to take into account devices.
TODO Fix the task runner unit test. The environment variable is being
lost even though it is being properly set in the prestart hook.
2018-11-27 17:25:33 -08:00
Mahmood Ali
865419e756
convert all config durations to strings in tests
2018-11-13 10:21:40 -05:00
Alex Dadgar
6fa893c801
affinities
2018-11-07 10:32:03 -08:00
Alex Dadgar
feb83a2be3
assign devices
2018-11-07 10:32:03 -08:00
Michael Schurter
5d49832de4
tests: fix usages of TestClient cleanup and mock driver
2018-10-29 14:21:05 -07:00
Alex Dadgar
01f8e5b95f
renames
2018-10-04 14:57:25 -07:00
Alex Dadgar
52f9cd7637
fixing tests
2018-10-04 14:26:19 -07:00
Nick Ethier
31da01856a
command/agent: add HCL mock for parse endpoint
2018-04-16 19:21:09 -04:00
Preetha Appan
fa90f036c6
Fix more tests
2018-04-11 15:51:24 -05:00
Alex Dadgar
b18f789020
Unmark drain when nodes hit their deadline and only batch/system left and add all job type integration test
2018-03-28 17:25:58 -07:00
Michael Schurter
a1ed305a24
test: add mock batch and system allocs
...
Since the BatchJob helper had a different task group than the Alloc
helper, it was difficult to create a valid batch alloc.
2018-03-27 14:24:01 -07:00
Preetha Appan
33e170c15d
s/linear/constant/g
2018-03-26 14:45:09 -05:00
Michael Schurter
8b107acc06
mock: add BatchJob() helper
2018-03-21 16:51:45 -07:00
Alex Dadgar
e459a666ed
Node.Drain takes strategy
2018-03-21 16:49:48 -07:00
Alex Dadgar
db4a634072
RPC, FSM, State Store for marking DesiredTransistion
...
fix build tag
2018-03-21 16:49:48 -07:00
Michael Schurter
c0542474db
drain: initial drainv2 structs and impl
2018-03-21 16:49:48 -07:00
Preetha Appan
10c9662222
New delayed rescheduling options, validation function and unit tests
2018-03-14 16:10:32 -05:00
Josh Soref
822a4178d5
spelling: namespace
2018-03-11 18:29:24 +00:00
Alex Dadgar
69def2ff22
Server tests of logs
2018-02-15 13:59:02 -08:00
Preetha Appan
031c566ada
Reschedule previous allocs and track their reschedule attempts
2018-01-31 09:56:53 -06:00
Michael Schurter
714eb0b266
Services should not require a port
...
Fixes #3673
2017-12-19 15:50:23 -08:00
Michael Schurter
45494f7304
Fix port labels on mock Alloc/Job/Node
2017-12-08 14:50:06 -08:00
Michael Schurter
4b20441eef
Validate port label for host address mode
...
Also skip getting an address for script checks which don't use them.
Fixed a weird invalid reserved port in a TaskRunner test helper as well
as a problem with our mock Alloc/Job. Hopefully the latter doesn't cause
other tests to fail, but we were referencing an invalid PortLabel and
just not catching it before.
2017-12-08 12:03:43 -08:00
Alex Dadgar
c1cc51dbee
sync
2017-10-13 14:36:02 -07:00
Michael Schurter
492c861419
/v1/client/agent/* ACL enforcement
2017-10-09 12:18:54 -07:00
Michael Schurter
57ff12432b
Move acl helpers from nomad/ into nomad/mock
...
They're useful in command/agent/ tests.
2017-10-06 14:50:06 -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
Alex Dadgar
4173834231
Enable more linters
2017-09-26 15:26:33 -07:00
Alex Dadgar
84d06f6abe
Sync namespace changes
2017-09-07 17:04:21 -07:00
Armon Dadgar
e74ea8a152
nomad: use hashes for efficient token/policy diffing
2017-09-04 13:09:34 -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
a17991e907
nomad: CRUD methods for ACLTokens
2017-09-04 13:04:45 -07:00
Armon Dadgar
11672e4e01
nomad: adding validation of policy name and rules
2017-09-04 13:03:15 -07:00
Armon Dadgar
18e6053b58
agent: Adding ACL Policy endpoints
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
87d187d777
Tests
2017-07-07 12:03:11 -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
f97664512b
Upsert Job Histories
2017-04-15 17:08:05 -07:00
Alex Dadgar
75e3f2c996
Fix fsm/env test
2017-01-24 09:36:22 -08:00
Diptanu Choudhury
fe4ae25eea
Setting the Addrs of sibling tasks in the env
2017-01-20 14:15:53 -08:00
Alex Dadgar
1235fc6581
summary tests
2016-12-13 16:15:40 -08:00
Diptanu Choudhury
1b3c5e98c8
Renaming LocalDisk to EphemeralDisk ( #1710 )
...
Renaming LocalDisk to EphemeralDisk
2016-09-14 15:43:42 -07:00
Diptanu Choudhury
bfee7b30a3
Introducing shared resources in alloc
2016-08-29 13:49:25 -07:00
Diptanu Choudhury
ec73c768f1
Making the scheduler use LocalDisk instead of Resources.DiskMB
2016-08-25 12:27:42 -05:00
Alex Dadgar
901000f789
Raft message, fsm and state store table
2016-08-19 16:40:37 -07:00
Alex Dadgar
895c31f605
Nodes generate Secret ID and used for retrieving allocations and registering
2016-08-17 16:31:47 -07:00
Diptanu Choudhury
c1a455983d
Added the chained alloc for system scheduler
2016-08-16 10:49:45 -07:00
Diptanu Choudhury
50842b88c7
Fixed some bugs
2016-07-25 17:26:38 -07:00
Diptanu Choudhury
7bafb7c675
Updating the job summary while mutating jobs and allocation objects
2016-07-25 17:26:38 -07:00
Alex Dadgar
e0114fee05
InitFields to Canonicalize
2016-07-20 16:08:52 -07:00
Alex Dadgar
8e231fa382
Rename ConsulService back to Service
2016-06-12 16:36:49 -07:00
Sean Chittenden
7956eb0c80
Rename structs.Task's `Service` attribute to `ConsulService`
2016-06-10 15:54:39 -04:00
Sean Chittenden
4973ec32bb
Rename structs.Services to structs.ConsulServices
2016-06-10 15:54:39 -04:00
Alex Dadgar
ff0dd9b81c
Task is not eligible for update if User, Meta, or Resources change
2016-04-25 17:20:25 -07:00
Diptanu Choudhury
802844397d
Supporting interpolation in service name, check name/protocol/path
2016-03-28 15:52:57 -07:00
Diptanu Choudhury
b791c91c6f
Added support for interpolation in check cmd and args
2016-03-28 15:02:00 -07:00
Diptanu Choudhury
5439d4c23c
Interpolating service tags
2016-03-28 15:02:00 -07:00
Alex Dadgar
ad92e50a24
Avoid serializes Allocation.Resources
2016-03-01 14:09:25 -08:00
Diptanu Choudhury
c6e395fa0e
Fixed tests
2016-02-11 17:34:46 -08:00
Diptanu Choudhury
675b679e3f
Added a LogConfig to the mock tasks
2016-02-10 17:46:35 -08:00
Alex Dadgar
5018f5dd1e
Only interpret vars wrapped in braces
2016-02-04 17:26:46 -08:00
Alex Dadgar
6f20d3f435
Restart on-success shouldn't be user specifiable
2016-02-02 17:35:06 -08:00
Alex Dadgar
4748bfd869
Tests
2016-02-02 13:50:30 -08:00
Alex Dadgar
9a8871249d
EvalEligibility unit tests and simplify escaped constraint tracking
2016-01-26 17:34:41 -08:00
Ivo Verberk
91a9f2c4ce
Shorten CLI identifiers
...
* Truncate all UUID identifiers to eight characters by default
* Refactor the node identifier to an auto-generated UUID
* Created and updated tests and mocks
2016-01-14 21:57:43 +01:00
Alex Dadgar
41efdcb1c3
Add JobModifyIndex
2016-01-12 09:50:33 -08:00
Alex Dadgar
610cfe4b34
Small fixes and test fixes
2015-12-23 18:26:39 -08:00
Alex Dadgar
670cc50a02
merge
2015-12-23 18:26:39 -08:00
Alex Dadgar
46eb604375
Add TaskStates to mock.Alloc. Fixes some test race conditions
2015-12-20 17:30:45 -08:00
Alex Dadgar
ea119b7297
Update restart policy in mock
2015-12-18 12:17:18 -08:00
Alex Dadgar
f1c41ed4cf
Fix mock
2015-12-18 12:17:18 -08:00
Alex Dadgar
92823b71a8
merge
2015-12-16 15:01:15 -08:00
Diptanu Choudhury
0cc1275782
Added a test to make sure services no longer present are being removed
2015-12-15 10:43:56 -08:00
Diptanu Choudhury
b7f556fabc
Changed some comments
2015-12-14 18:05:58 -08:00
Diptanu Choudhury
6b6d74e2eb
Fixed tests
2015-12-14 15:47:01 -08:00
Diptanu Choudhury
cbfe727100
Making the Job expand all service names during registration
2015-11-26 19:26:00 -08:00
Alex Dadgar
965087e266
remove args from mock
2015-11-18 15:19:18 -08:00
Alex Dadgar
4d817f5cbc
Revert "Revert "Make drivers take arguments as a list and not as a string""
2015-11-18 15:16:42 -08:00
Alex Dadgar
0e51375285
Revert "Make drivers take arguments as a list and not as a string"
2015-11-18 13:46:43 -08:00
Alex Dadgar
282509eb9b
More test fixes
2015-11-18 12:30:42 -08:00
Chris Bednarski
9f40143684
Merge branch 'master' into f-port-labels
2015-11-16 16:02:38 -08:00
Alex Dadgar
bdf7497f1b
Initialize task state in allocation sent by scheduler
2015-11-16 15:14:21 -08:00
Diptanu Choudhury
aae6047edc
DRYed the code
2015-11-16 13:10:57 -08:00
Diptanu Choudhury
4e05b27111
Implemented port labeling and driver configs
2015-11-16 13:10:57 -08:00
Diptanu Choudhury
bf105430ea
Added the restart policies to mocks
2015-10-30 18:34:23 -07:00
Alex Dadgar
3cdbfc010f
Remove weight and hard/soft fields from constraint
2015-10-27 14:31:14 -07:00
Alex Dadgar
2b2b6c321a
Check for environment variable updates for tasks
2015-10-23 14:52:06 -07:00
Alex Dadgar
70c39bd5a4
Add diffSystemAlloc which gives richer information which node to place a system allocation
2015-10-15 13:14:44 -07:00
Alex Dadgar
494244ed06
System scheduler and system stack
2015-10-14 18:39:44 -07:00