Michael Schurter
b4bacd641d
Add check for Windows ECONNRESET
2017-11-30 21:30:20 -08:00
Michael Schurter
13a69bda82
Add defensive check to safeguard from future #3342s
...
I hate adding "this should never happen" checks, but causing a tight
loop that OOMs Nomad is just too easy in this code otherwise.
2017-11-30 20:37:13 -08:00
Michael Schurter
ac3fffc118
Fix race in framer and improperly returned err
...
Fixes #3342
Two bugs were fixed:
* Closing the StreamFramer's exitCh before setting the error means other
goroutines blocked on exitCh closing could see the error as nil. This
was *not* observered.
* parseFramerError on Windows would fall through and return an
improperly captured nil err variable. There's no need for
parseFramerError to be a closure which fixes the confusion.
2017-11-30 17:42:53 -08:00
Michael Schurter
00b1346e9b
Refactor as there's no need for an ACL helper
2017-10-09 11:19:25 -07:00
Michael Schurter
43ea09fa96
FS HTTP API ACL enforcement
...
ACL enforcement for the filesystem HTTP APIs on clients.
2017-10-09 11:06:34 -07:00
Alex Dadgar
a9e3a41407
Enable more linters
2017-09-26 15:26:33 -07:00
Alex Dadgar
5bab493748
pass in uid to codecgen
2017-09-11 15:40:27 -07:00
Luke Farnell
7a56971508
fixed all spelling mistakes for goreport
2017-08-07 17:13:05 -04:00
Alex Dadgar
5202ff7a1b
Fix truncate test
2017-05-11 13:05:53 -07:00
Alex Dadgar
9def7e1a14
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
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
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
6082b4619e
Review feedback
2017-01-23 16:58:53 -08:00
Alex Dadgar
d276b3fcc1
docs
2017-01-23 16:08:26 -08:00
Alex Dadgar
1960070a24
test
2017-01-23 16:04:50 -08:00
Alex Dadgar
28e0718d83
disallow follow
2017-01-23 15:12:09 -08:00
Alex Dadgar
ac4be1f7aa
plain w
2017-01-13 13:12:36 -08:00
Alex Dadgar
a6933ed9aa
comment
2016-12-09 17:51:50 -08:00
Alex Dadgar
23dee058c7
fix high cpu usage + faster encoding
2016-12-09 17:33:10 -08:00
Alex Dadgar
723f8f0343
Benchmark
2016-12-09 14:44:50 -08:00
Alex Dadgar
2b50359edf
Fix FD leak
2016-12-09 10:49:39 -08:00
Alex Dadgar
81e2d53e2d
Fixes race on StreamFramer Destroy
...
This PR:
* Fixes a race in which StreamFramer could panic while closing.
* Simplifies the logic of the StreamFramer
* Removes a potentially leaked goroutine
2016-11-17 20:14:47 -08:00
Alex Dadgar
bcb1a2e216
Do not allow path to escape the alloc dir for the FS commands
2016-10-03 14:58:44 -07:00
Alex Dadgar
014d8fe0e8
lock heartbeat
2016-08-11 18:37:08 -07:00
Alex Dadgar
0b9449fe7e
better flush and connection closed handling
2016-07-25 11:16:54 -07:00
Alex Dadgar
67fe934342
control-c works
2016-07-25 11:16:54 -07:00
Alex Dadgar
cbcb32096f
small fixes
2016-07-25 11:16:54 -07:00
Alex Dadgar
2a32e839ac
Add logs command test
2016-07-25 11:16:54 -07:00
Alex Dadgar
f3a71e0143
Handle skipping indexes
2016-07-25 11:16:54 -07:00
Alex Dadgar
f22e228e82
log tests
2016-07-25 11:16:54 -07:00
Alex Dadgar
b65fd2624e
Support non-following logs
2016-07-25 11:16:54 -07:00
Alex Dadgar
4cf65d7944
Read from correct offset
2016-07-25 11:16:01 -07:00
Alex Dadgar
53f198932f
Fix buffer reuse
2016-07-25 11:16:01 -07:00
Alex Dadgar
065cf0915a
tests
2016-07-25 11:16:01 -07:00
Alex Dadgar
2530f7bd40
initial api and command
2016-07-25 11:16:01 -07:00
Alex Dadgar
cc0fec53f1
initial log api impl
2016-07-25 11:16:01 -07:00
Mathias Lafeldt
acb9997ca7
Fix typos in source code
2016-07-18 16:24:46 +02:00
Alex Dadgar
991220b5c7
implement -n for tail
2016-07-13 13:26:09 -06:00
Alex Dadgar
19ca6e7b55
address comments
2016-07-12 17:01:33 -06:00
Alex Dadgar
ffb57ffd6f
Address more comments
2016-07-12 10:45:05 -06:00
Alex Dadgar
12ae85ff0c
Tests and handle conn close behavior better
2016-07-12 10:18:48 -06:00
Alex Dadgar
3cc13aeca1
initial comments
2016-07-11 10:58:18 -06:00
Alex Dadgar
65a64fb1cb
StreamFramer tests
2016-07-10 13:57:20 -04:00
Alex Dadgar
4f7c5fa502
StreamFramer encapsulates the sending, heartbeating and batching behavior of frames
2016-07-10 13:57:04 -04:00
Alex Dadgar
5b7ea09a7c
Only initialize watcher once, fix offsetting, implement tail non-follow
2016-07-10 13:57:04 -04:00
Alex Dadgar
451d63cfa6
Set up for testing
2016-07-10 13:57:04 -04:00
Alex Dadgar
a3d82ee47f
Flush and use correct buffer size
2016-07-10 13:57:04 -04:00
Alex Dadgar
2368722146
initial tail impl
2016-07-10 13:57:04 -04:00
Sean Chittenden
8e1777ae3a
Test for errors
2016-06-16 14:43:46 -07:00
Alex Dadgar
37a0c2065b
Fix missing format variable
2016-04-18 18:53:05 -07:00