Mahmood Ali
84419f08ce
client: synchronize client.invalidAllocs access
...
invalidAllocs may be accessed and manipulated from different goroutines,
so must be locked.
2019-05-22 09:37:49 -04:00
Danielle
26718b7d8a
Merge pull request #5749 from hashicorp/dani/restore-allocs
...
client: Pass servers contacted ch to allocrunner
2019-05-22 14:17:24 +02:00
Danielle Lancashire
27583ed8c1
client: Pass servers contacted ch to allocrunner
...
This fixes an issue where batch and service workloads would never be
restarted due to indefinitely blocking on a nil channel.
It also raises the restoration logging message to `Info` to simplify log
analysis.
2019-05-22 13:47:35 +02:00
Mahmood Ali
3187fe3ce4
fix httpClient error handling
...
If err is nil, we should use the newly cloned httpClient.
2019-05-21 21:29:15 -04:00
Michael Lange
62fc877888
UI changelog entries
2019-05-21 15:10:48 -07:00
Michael Lange
99205e1865
Merge pull request #5748 from hashicorp/b-ui/prefix-regex
...
Include the _ prefix separator in both regexes
2019-05-21 14:44:14 -07:00
Michael Lange
b0d6517297
Include the _ prefix separator in both regexes
...
And include all prefix types in the test data
2019-05-21 14:20:40 -07:00
Michael Lange
dff3abb630
Merge pull request #5734 from hashicorp/f-ui/allocation-lifecycle
...
UI: Allocation lifecycle
2019-05-21 11:04:19 -07:00
Michael Lange
b330321e44
Use the TwoStepButton page object for integration testing too
2019-05-21 09:24:19 -07:00
Michael Lange
c485bc64fb
Acceptance testing for allocation lifecycle
2019-05-21 09:24:19 -07:00
Michael Lange
d485c040e3
Restart a single task from the task detail page
2019-05-21 09:24:18 -07:00
Michael Lange
416e9895d6
Don't cancel watchers when transitioning to a sub-route
2019-05-21 09:24:18 -07:00
Michael Lange
e40a01456b
Watch the next allocation on the allocation index page
2019-05-21 09:24:17 -07:00
Michael Lange
8d31474fdc
Support task restarting in the allocation adapter
2019-05-21 09:24:17 -07:00
Michael Lange
ffadcf5a25
Add stop and restart buttons to the allocation index page
2019-05-21 09:24:16 -07:00
Michael Lange
a00bc8befc
Allocation methods for stopping and restarting
2019-05-21 09:24:16 -07:00
Michael Lange
d3e919a2c8
New with-headroom modifier for titles
2019-05-21 09:24:15 -07:00
Michael Lange
7933a41782
Add cancel on click outside and disabled behaviors to two-step-button
2019-05-21 09:24:14 -07:00
Mahmood Ali
b06e585713
Merge pull request #5739 from hashicorp/r-rm-logmon-syslog-deadcode
...
logmon: remove syslog server deadcode
2019-05-21 11:46:48 -04:00
Mahmood Ali
eca23bf9c4
Merge pull request #5742 from hashicorp/b-test-fixes-20190520
...
Grab bag of (primarily race) test fixes
2019-05-21 11:46:36 -04:00
Mahmood Ali
e88bb61488
Merge pull request #5740 from hashicorp/b-nomad-exec-term-race
...
exec: allow drivers to handle stream termination
2019-05-21 11:24:12 -04:00
Mahmood Ali
d3c52b0bb4
Merge pull request #5741 from hashicorp/b-alloc-race-20190521
...
client: synchronize access to `ar.alloc`
2019-05-21 11:04:58 -04:00
Mahmood Ali
78602461c1
remove github.com/RackSec/srslog dependency
...
No longer used
2019-05-21 10:56:08 -04:00
Michael Schurter
7c86315295
Merge pull request #5732 from hashicorp/b-eval-race
...
nomad: fix race in BlockedEvals
2019-05-21 07:34:53 -07:00
Mahmood Ali
b475ccbe3e
client: synchronize access to ar.alloc
...
`allocRunner.alloc` is protected by `allocRunner.allocLock`, so let's
use `allocRunner.Alloc()` helper function to access it.
2019-05-21 09:55:05 -04:00
Mahmood Ali
2a7b073167
tests: fix fifo lib race
...
Accidentally accessed outer `err` variable inside a goroutine
2019-05-21 09:49:56 -04:00
Mahmood Ali
296bd41c9e
tests: fix data race in client TestDriverManager_Fingerprint_Periodic
2019-05-21 09:49:56 -04:00
Mahmood Ali
d9e59eece0
tests: fix client TestFS_Stream data race
...
Close is invoked in a different goroutine from test
2019-05-21 09:49:56 -04:00
Mahmood Ali
f38c59baa0
tests: handle unicode matches
...
naive implementation should focus on ascii characters only
2019-05-21 09:41:23 -04:00
Mahmood Ali
75e0a3f405
exec: allow drivers to handle stream termination
...
Without this change, alloc_endpoint cancel the context passed to handler
when we detect EOF. This races driver in setting exit code; and we run
into a case where the exec process terminates cleanly yet we attempt to
mark it as failed with context error.
Here, we rely on the driver to handle errors returned from Stream and
without racing to set an error.
2019-05-21 09:40:25 -04:00
Mahmood Ali
974bcbecc9
logmon: remove syslog server deadcode
...
Remove unused syslog server related code that got replaced by the docker
logger in Nomad 0.9
2019-05-21 09:36:43 -04:00
Michael Schurter
689794e08d
nomad: fix deadlock in UnblockClassAndQuota
...
Previous commit could introduce a deadlock if the capacityChangeCh was
full and the receiving side exited before freeing a slot for the sending
side could send. Flush would then block forever waiting to acquire the
lock just to throw the pending update away.
The race is around getting/setting the chan field, not chan operations,
so only lock around getting the chan field.
2019-05-20 15:41:52 -07:00
Michael Schurter
8c99214f69
nomad: fix race in BlockedEvals
...
I assume the mutex was being released before sending on capacityChangeCh
to avoid blocking in the critical section, but:
1. This is race.
2. capacityChangeCh has a *huge* buffer (8096). If it's full things
already seem Very Bad, and a little backpressure seems appropriate.
2019-05-20 15:26:20 -07:00
Michael Schurter
05a9c6aedb
Merge pull request #5411 from hashicorp/b-snapshotafter
...
Block plan application until state store has caught up to raft
2019-05-20 14:03:10 -07:00
Michael Lange
96a1a5e812
Move addToPath to its own util
2019-05-20 11:52:47 -07:00
Michael Lange
8414a279aa
Merge pull request #5721 from hashicorp/f-ui/watchable-cancellation-tokens
...
UI: Replace the adapter cancellation methods with a cancellation token system
2019-05-20 11:49:14 -07:00
Michael Schurter
228314ebd3
Fix links.
2019-05-20 11:44:47 -07:00
Michael Schurter
637ac1a0fb
Add PR link to changelog for #5702
2019-05-20 11:33:23 -07:00
Michael Schurter
d94c99df86
Fix typo.
2019-05-20 11:27:16 -07:00
Michael Lange
084c4cc95f
Standardize on Abort over Cancel
2019-05-20 11:08:16 -07:00
Michael Lange
c9220cb929
Replace the adapter cancellation methods with a cancellation token system
2019-05-20 10:29:22 -07:00
Mahmood Ali
f25a2fbd27
Merge pull request #5275 from hashicorp/f-api-config-httpclient
...
api: allow configuring http client
2019-05-20 12:36:00 -04:00
Mahmood Ali
0622019267
remove "incidentally" exported internal function
...
`*Config.ConfigureTLS()` is invoked internally by `NewClient` and API
consumers should not invoke directly.
Now that http client is created in `api.NewClient`,
`*Config.ConfigureTLS` makes no sense. API consumers that call it
explicitly can remove the invocation and preserve the behavior.
2019-05-20 11:58:43 -04:00
Mahmood Ali
cd64ada95d
Run TestClientAllocations_Restart_ACL test
2019-05-17 20:30:23 -04:00
Michael Schurter
0e39927782
nomad: emit more detailed error
...
Avoid returning context.DeadlineExceeded as it lacks helpful information
and is often ignored or handled specially by callers.
2019-05-17 14:37:42 -07:00
Michael Schurter
b80a7e0feb
nomad: wait for state store to sync in plan apply
...
Wait for state store to catch up with raft when applying plans.
2019-05-17 14:37:12 -07:00
Omar Khawaja
8039426701
Vagrant optional ( #5724 )
...
* specify Vagrant as optional in getting started and installation
* edit next steps
2019-05-17 16:50:16 -04:00
Michael Schurter
1bc731da47
nomad: remove unused NotifyGroup struct
...
I don't think it's been used for a long time.
2019-05-17 13:30:23 -07:00
Michael Schurter
9732bc37ff
nomad: refactor waitForIndex into SnapshotAfter
...
Generalize wait for index logic in the state store for reuse elsewhere.
Also begin plumbing in a context to combine handling of timeouts and
shutdown.
2019-05-17 13:30:23 -07:00
Mahmood Ali
0aaefe8cca
api: allow configuring http client
...
Allow clients to configure httpClient, e.g. set a pooled/keep-alive
client.
When caller configures HttpClient explicitly, we aim to use as-is; e.g.
we assume it's configured with TLS already. Expose `ConfigureTLS` to
aid api consumers with configuring their http client.
Also, removes `SetTimeout` call that I believe is internal only and has
odd side-effects when called on already created config. Also deprecates
`config.ConfigureTLS` in preference to the new `ConfigureTLS`.
2019-05-17 16:26:58 -04:00