Commit Graph

3046 Commits

Author SHA1 Message Date
Tolga Ceylan
f10fab21bc fn: fixup possible go-routine leak (#1265) 2018-10-05 17:02:18 -07:00
CI
b7d53332d3 fnserver: 0.3.594 release [skip ci] 0.3.594 2018-10-05 23:40:15 +00:00
Reed Allman
e6eec186d0 small tweaks to dispatch (#1264)
* the dispatch span actually encloses dispatch and gives an accurate span now
* turning a call into an http request can't fail unless it's our fault, if
tests don't catch this, we don't deserve money
* moved http req creation inside of dispatch goroutine

there's further work to do cleaning up dispatch... removing the old formats
will make this slightly more clear, waiting for that. this was bugging me
anyway after seeing something else and was easy to fix up.
2018-10-05 16:32:01 -07:00
CI
34e40256d9 fnserver: 0.3.593 release [skip ci] 0.3.593 2018-10-05 02:02:35 +00:00
Tolga Ceylan
29dcf0a791 fn: adding docker events to stats (#1262)
Streaming docker events is useful as we can record/capture some
asynchronous containers events such as out-of-memory. For now,
we record these in opencensus/prometheus stats.
2018-10-04 18:54:09 -07:00
CI
ec2f9539f2 fnserver: 0.3.592 release [skip ci] 0.3.592 2018-10-04 23:06:37 +00:00
Tolga Ceylan
5a9118ff32 fn: default fnserver tag keys and api key adjustment (#1261)
Default fn server keys should be minimal (empty) since not
all stats have associated app name, fn id, etc.

API tags for requests should not include "status" as this is
part of responses.
2018-10-04 15:58:21 -07:00
Michael J Williams
7bda6ccf2b Add a 'top' anchor to landing page (#1260) 2018-10-03 16:09:10 -04:00
CI
0595e9b1c8 fnserver: 0.3.591 release [skip ci] 0.3.591 2018-10-01 23:24:21 +00:00
Tolga Ceylan
f132bba3fb fn: adding hot launcher eviction waiting (#1257)
If checkLaunch triggers evictions, it must wait
for these eviction to complete before returning.
Premature returning from checkLaunch will cause
checkLaunch to be called again by hot launcher.
This causes checkLaunch to receive an out of
capacity error and causes a 503.

The evictor is also improved with this PR and it
provides a slice of channels to wait on if evictions
are taking place.

Eviction token deletion is performed *after*
resource token close to ensure that once an
eviction is done, resource token is also free.
2018-10-01 16:16:29 -07:00
CI
5a407dc3bd fnserver: 0.3.590 release [skip ci] 0.3.590 2018-10-01 17:55:32 +00:00
Tolga Ceylan
2e610a264a fn: remove async+sync seperation in resource tracker (#1254)
This simplifies resource tracker. Originally, logically we had
split the cpu/mem into two pools where a 20%
was kept specifically for sync calls to avoid
async calls dominating the system. However, resource
tracker should not handle such call prioritization.
Given the improvements to the evictor, I think
we can get rid of this code in resource tracker
for time being.
2018-10-01 10:46:32 -07:00
CI
927424092b fnserver: 0.3.589 release [skip ci] 0.3.589 2018-09-30 19:03:03 +00:00
Michael J Williams
16bfecf15c Old docs to be deleted (#1248) 2018-09-30 12:54:28 -06:00
CI
7430dd26ea fnserver: 0.3.588 release [skip ci] 0.3.588 2018-09-29 00:35:25 +00:00
Owen Strain
21f77f837e Add APIErrorWrapper so that underlying errors can be logged (#1246) 2018-09-28 17:26:54 -07:00
CI
0dd24932f2 fnserver: 0.3.587 release [skip ci] 0.3.587 2018-09-28 18:16:15 +00:00
Dario Domizioli
4a862212a2 Limit connection pool size on UDS: we should only need one per container (#1252)
Hopefully this reduces FD usage even further.
2018-09-28 11:07:31 -07:00
Tolga Ceylan
a256d96f1e fn: keepalives timeout for UDS http-stream client (#1253) 2018-09-28 10:59:22 -07:00
CI
f94999500f fnserver: 0.3.586 release [skip ci] 0.3.586 2018-09-28 14:02:39 +00:00
Dario Domizioli
5aabdae26a Fix missing context on request sent through UDS (#1251) 2018-09-28 14:54:05 +01:00
CI
a17a437db7 fnserver: 0.3.585 release [skip ci] 0.3.585 2018-09-28 11:15:23 +00:00
Richard Connon
8d8c7df569 Log failure to close fsnotify handle (#1250) 2018-09-28 12:06:43 +01:00
CI
f9e4f93ad6 fnserver: 0.3.584 release [skip ci] 0.3.584 2018-09-28 01:28:40 +00:00
Owen Cliffe
53d4be00ca Add checks for unix socket destination to avoid FDK tricking agent into talking to non-relative dirs (#1247)
* Add checks for unix socket destination to avoid leaking access to host OS

* style, typos
2018-09-27 18:20:03 -07:00
CI
d011f58163 fnserver: 0.3.583 release [skip ci] 0.3.583 2018-09-27 22:46:16 +00:00
Reed Allman
319e0af41c we shouldn't log tokens, this shouldn't have been info either and was noisy (#1249)
* we shouldn't log tokens, this shouldn't have been info either and was noisy

* simplify logic too
2018-09-27 23:37:35 +01:00
CI
651b49e1bc fnserver: 0.3.582 release [skip ci] 0.3.582 2018-09-26 23:13:26 +00:00
Matt Stephenson
4d30b9de09 Add support for json formatted logs (#1245) 2018-09-26 16:04:55 -07:00
CI
3920e15769 fnserver: 0.3.581 release [skip ci] 0.3.581 2018-09-26 19:25:42 +00:00
Tolga Ceylan
34f2133518 fn: api metrics custom path filter function (#1243)
Adding a simple global path filter function to api views. This can
be set to a custom function to group path/url in API view tags.
2018-09-26 12:17:27 -07:00
Reed Allman
911c7d993e help people figure out why their syslog url is wrong more better (#1242)
closes #1240
2018-09-26 11:56:14 -07:00
CI
1855ebf2ce fnserver: 0.3.580 release [skip ci] 0.3.580 2018-09-26 13:09:50 +00:00
Reed Allman
01b8e8679d HTTP trigger http-stream tests (#1241) 2018-09-26 13:25:48 +01:00
CI
5d907821b1 fnserver: 0.3.579 release [skip ci] 0.3.579 2018-09-24 18:27:55 +00:00
Tom Coupland
d454ff9aa4 Initial Refactor (#1234)
* Inital Refactor

Removing the repeated logic exposed some problems with the reponse
writers.

Currently, the trigger writer was overlaid on part of the header
writing. The main invoke blog writing into the different levels of the
overlays at different points in the logic.

Instead, by extending the types and embedded structs, the writer is
more transparent. So, at the end of the flow it goes over all the
headers available and removes our prefixes. This lets the invoke logic
just write to the top level.

Going to continue after lunch to try and remove some of the layers and
param passing.

* Try and repeat concurrency failure

* Nested FromHTTPFnRequest inside FromHTTPTriggerRequest

* Consolidate buffer pooling logic

* go fmt yourself

* fix import
2018-09-24 12:20:30 +01:00
CI
430314710d fnserver: 0.3.578 release [skip ci] 0.3.578 2018-09-22 01:37:11 +00:00
Tolga Ceylan
dc6516b8e2 fn: added http 429 in models Errors (#1236) 2018-09-21 18:28:18 -07:00
CI
f166ec0ed1 fnserver: 0.3.577 release [skip ci] 0.3.577 2018-09-21 20:01:20 +00:00
Richard Connon
0d61c300c0 Add http-stream format to enum in swagger (#1235) 2018-09-21 20:53:08 +01:00
CI
65f5329415 fnserver: 0.3.576 release [skip ci] 0.3.576 2018-09-20 21:21:50 +00:00
Tolga Ceylan
a994b57d9a fn: freezer/evictor adjustments (#1233)
*) removed faulty Idle state setter in runHot() since with
UDS wait, we need to wait until we can determine if a container
is idle. This is now moved to runHotReq().
*) evictor now more aggresive and no longer tied to pause
timer/configuration.
*) removed unnecessary optimization on timer=0 case for immediate
pause.
2018-09-20 14:13:11 -07:00
CI
0ed1fe8a11 fnserver: 0.3.575 release [skip ci] 0.3.575 2018-09-20 21:06:11 +00:00
Vijay Krishnan
b2f85b70ea Use registry auth token from Call extensions to pull images (#1228) 2018-09-20 13:57:41 -07:00
CI
31b09c2601 fnserver: 0.3.574 release [skip ci] 0.3.574 2018-09-20 18:39:00 +00:00
Owen Cliffe
d9b74cfd14 Gateway trigger support (#1225)
* initial gateway trigger support

* Pass Content-Type down to wrapped writer

* Move req header setting

* Adding call id to responses

* add dupe Fn-Call-Id headers
2018-09-20 11:30:28 -07:00
CI
a381d0daf9 fnserver: 0.3.573 release [skip ci] 0.3.573 2018-09-20 18:00:58 +00:00
Reed Allman
87e2562db9 Http stream invoke tests (#1231)
* adds parity level of testing http-stream invoke

the other formats had a gamut of tests, now http-stream does too. this makes
obvious some of its behaviors. some things changed / can change now that we
don't have pipes to worry about, the main one being that when containers blow
up now the uds client will get an EOF/ECONNREFUSED instead of the pipe getting
wedged up (allowing us to get the container error easily, previously). I made
my best 50% effort to make a reasonable error for when this happens (similar
to when http/json received garbage errors), open to ideas on verbiage / policy
there.

should be pretty straightforward. one thing to notice is that
http/json/default don't return our fancy new Fn-Http-Status or Fn-Http-H
headers... it's relatively easy to go add this to fdk-go just to test this,
but for invoke I'm really not sure we care (?) and for the gateway, the output
will be identical with the old formats bypassing the header decap. if anybody
has any feelings, feel free to express them.

* fix oomer up for new error

* Adding http header stripping to agent

Adding the header stripping into the agent, this should be low enough
that all routes to fns get treated the same.
2018-09-20 18:52:20 +01:00
CI
38a586d7b2 fnserver: 0.3.572 release [skip ci] 0.3.572 2018-09-20 15:32:25 +00:00
Michael J Williams
0ec60678c4 Remove outdated and redundant links (#1230) 2018-09-20 09:23:57 -06:00