Commit Graph

1701 Commits

Author SHA1 Message Date
CI
fea4e931ce fnserver: 0.3.628 release [skip ci] 2018-11-30 21:28:58 +00:00
Tolga Ceylan
df53250958 fn: latency metrics for various call states (#1332)
* fn: latency metrics for various call states

This complements the API latency metrics available
on LB agent. In this case, we would like to measure
calls that have finished with the following status:
     "completed"
     "canceled"
     "timeouts"
     "errors"
     "server_busy"
and while measuring this latency, we subtract the
amount of time actual function execution took. This
is not precise, but an approximation mostly suitable
for trending.

Going forward, we could also subtract UDS wait time and/or
docker pull latency from this latency as an enhancement
to this PR.
2018-11-30 13:20:59 -08:00
CI
88ba9e6215 fnserver: 0.3.627 release [skip ci] 2018-11-30 00:16:54 +00:00
Tolga Ceylan
f44a44921e fn: status call failures should be logged (#1331)
Added logging for status call failures.
2018-11-29 16:08:48 -08:00
Shreya Garge
6c35b092fd changed fnID key for consistency in logs (#1324) 2018-11-29 14:38:50 +00:00
CI
b2bb6bc958 fnserver: 0.3.626 release [skip ci] 2018-11-28 22:50:49 +00:00
Tolga Ceylan
1d34cc11a3 fn: container init timeout should be a 504 (#1329)
Too-Busy 503 is a retriable error, this error
should be 504 instead.
2018-11-28 14:39:37 -08:00
CI
59a1d910a0 fnserver: 0.3.625 release [skip ci] 2018-11-28 18:41:04 +00:00
Tolga Ceylan
549ba65dea fn: placer stats and client context (#1322)
For the sake of completeness and also as defensive coding,
let's record client context cancel/timeout cases. In retry
reason, if error is same as client context (timeout/cancel),
we should not report as retry due to error. Similarly in
placed calls, do not flag the placed call as error if client
canceled or timedout. We track client context timeout/cancel
separately in addition to this.
2018-11-28 10:32:55 -08:00
CI
272887b1e2 fnserver: 0.3.624 release [skip ci] 2018-11-22 00:34:23 +00:00
Krister Johansen
af59d19d24 Add support for counting kdumps in pure-runner. (#1309) 2018-11-21 16:26:30 -08:00
CI
4ac397dece fnserver: 0.3.623 release [skip ci] 2018-11-21 21:13:01 +00:00
Reed Allman
bf2f96cbeb actually disable stdout/stderr. stdout>stderr (#1321)
* actually disable stdout/stderr. stdout>stderr

* for pure runner this turns it off for real this time.
* this also just makes the agent container type send stdout to stderr, since
we're not using stdout for function output anymore this is pretty
straightforward hopefully.
* I added a panic and some type checking printlns to ensure this is true for
pure_runner, both stdout and stderr are off, also added a unit test from agent
to ensure this behavior from its container type, which pure_runner utilizes
(no integration test though)
* tests ensure that logs still work if not trying to disable them (full agent)

* handle non ghost swapping
2018-11-21 15:04:53 -06:00
CI
cf6cbb7a1d fnserver: 0.3.622 release [skip ci] 2018-11-20 21:58:56 +00:00
Tolga Ceylan
69131420bf fn: enforce container/FDK contract in dispatch (#1314)
1) FDK returned 200/502/504 codes now handled.
2) Container init timeout is now default to 5 seconds.
2018-11-20 13:50:53 -08:00
CI
e40816bd0e fnserver: 0.3.621 release [skip ci] 2018-11-20 17:10:46 +00:00
Shreya Garge
91f6ef3402 added context for runnerpool interface (#1320)
* added context for runnerpool interface

* added context for runnerpool interface
2018-11-20 17:02:47 +00:00
CI
47dab09996 fnserver: 0.3.620 release [skip ci] 2018-11-19 20:32:07 +00:00
Tolga Ceylan
f797cb933f fn: remove error formatting in fireBeforeCall/fireAfterCall (#1317)
fmt.Errorf strips API errors in models, we should propagate
the error directly.
2018-11-19 12:23:59 -08:00
CI
ae7683c49e fnserver: 0.3.619 release [skip ci] 2018-11-17 08:15:12 +00:00
Denis Makogon
9c2dfd89c5 Fix response message on invoke handler (#1315)
* Fix response message on invoke handler

Closes: #1310

* Addressing review comments

* Addressing review comments

* Fixing NoRoute routine

* add method not allowed handler to gin
2018-11-17 10:07:07 +02:00
CI
1213a1e898 fnserver: 0.3.618 release [skip ci] 2018-11-16 19:05:08 +00:00
Reed Allman
29fdbc9b49 disable pure runner logging (#1313)
* disable pure runner logging

there's a racey bug where the logger is being written to when it's closing,
but this led to figuring out that we don't need the logger at all in pure
runner really, the syslog thing isn't an in process fn thing and we don't need
the logs from attach for anything further in pure runner. so this disables the
logger at the docker level, to save sending the bytes back over the wire, this
could be a nice little performance bump too. of course, with this, it means
agents can be configured to not log debug or have logs to store at all, and
not a lot of guards have been put on this for 'full' agent mode while it hangs
on a cross feeling the breeze awaiting its demise - the default configuration
remains the same, and no behavior changes in 'full' agent are here.

it was a lot smoother to make the noop than to try to plumb in 'nil' for
stdout/stderr, this has a lot lower risk of nil panic issues for the same
effect, though it's not perfect relying on type casting, plumbing in an
interface to check has the same issues (loss of interface adherence for any
decorator), so this seems ok. defaulting to not having a logger was similarly
painful, and ended up with this. but open to ideas.

* replace usage of old null reader writer impl

* make Read return io.EOF for io.Copy usage
2018-11-16 12:56:49 -06:00
CI
06cef103f6 fnserver: 0.3.617 release [skip ci] 2018-11-16 01:05:58 +00:00
Tolga Ceylan
c89f1e5f9c fn: safer hand over between monitoring and main processing (#1316)
In runHot(), it's safer to use a separate channel between
monitoring go-routine and processing go-routine to handle
cancellations triggered by monitorin go-routine.
2018-11-15 16:57:16 -08:00
CI
935162ec6a fnserver: 0.3.616 release [skip ci] 2018-11-15 21:46:00 +00:00
Tolga Ceylan
6eaf1578e6 fn: container initialization monitoring (#1288)
Container initialization phase consumes resource tracker
resources (token), during lengthy operations.
In order for agent stability/liveness, this phase has
to be evictable/cancelable and time bounded.

With this change, introducing a new system wide environment setting
to bound the time spent in container initialization phase. This phase
includes docker-pull, docker-create, docker-attach, docker-start
and UDS wait operations. This initialization period is also now
considered evictable.
2018-11-15 13:37:43 -08:00
Tolga Ceylan
fe2b9fb53d fn: cookie and driver api changes (#1312)
Now obsoleted driver.PrepareCookie() call handled image and
container creation. In agent, going forward we will need finer
grained control over the timeouts implied by the contexts.
For this reason, with this change, we split PrepareCookie()
into Validate/Pull/Create calls under Cookie interface.
2018-11-14 16:51:05 -08:00
CI
65f3f915be fnserver: 0.3.615 release [skip ci] 2018-11-14 19:46:49 +00:00
Tolga Ceylan
8ee4c1098b fn: correct typo in docker command tag (#1311) 2018-11-14 11:38:48 -08:00
CI
325f28ef89 fnserver: 0.3.614 release [skip ci] 2018-11-14 17:31:04 +00:00
Eric Fode
90e39c8fd3 initial addition of the diskfree op (#1308)
* initial addition of the diskfree op

fixing up some typos

last of fmt errors

* fixed up some feedbacks
2018-11-14 09:22:07 -08:00
CI
3486af2981 fnserver: 0.3.613 release [skip ci] 2018-11-09 18:33:23 +00:00
Andrea Rosa
182db94fad Feature/acksync response writer (#1267)
This implements a "detached" mechanism to get an ack from the runner
once it actually starts to run a function. In this scenario the response
returned back is just a 202 if we placed the function in a specific
time-frame. If we hit some errors or we fail to place the fn in time we
return back different errors.
2018-11-09 10:25:43 -08:00
CI
2df6c8d349 fnserver: 0.3.612 release [skip ci] 2018-11-07 20:43:19 +00:00
Tolga Ceylan
25afb2f478 fn: remove tini option & env variable (#1301) 2018-11-07 12:35:19 -08:00
CI
46c25215f4 fnserver: 0.3.611 release [skip ci] 2018-11-07 19:18:15 +00:00
CI
9e77f2b9a0 fnserver: 0.3.610 release [skip ci] 2018-11-06 00:09:27 +00:00
Tolga Ceylan
975b780695 fn: tests for hung and bad docker repo during docker-pull (#1298)
* fn: tests for hung and bad docker repo during docker-pull
2018-11-05 16:01:42 -08:00
CI
9b50eaddf1 fnserver: 0.3.609 release [skip ci] 2018-11-05 17:49:33 +00:00
Harry Smith
3f0d4804b2 Fix filtering by name when getting list of funcs (#1295)
* Fix filtering by name when getting list of funcs

* Add datastore test for function list name filter

* Fix tests
2018-11-05 09:41:59 -08:00
CI
3a383049f9 fnserver: 0.3.608 release [skip ci] 2018-11-02 21:10:39 +00:00
Tolga Ceylan
5415b2bc38 fn: move UDS client into container to keep runHot() simpler (#1297) 2018-11-02 14:03:09 -07:00
CI
92c7723997 fnserver: 0.3.607 release [skip ci] 2018-11-02 20:39:53 +00:00
Tolga Ceylan
ac17825a36 fn: add container state to eviction stats (#1296) 2018-11-02 13:32:13 -07:00
CI
494fb1827b fnserver: 0.3.606 release [skip ci] 2018-11-01 21:30:28 +00:00
Tolga Ceylan
de9c2cbb63 fn: cleanup of docker timeouts and docker health check (#1292)
Moving the timeout management of various docker operations
to agent. This allows for finer control over what operation
should use. For instance, for pause/unpause our tolerance
is very low to avoid resource issues. For docker remove,
the consequences of failure will lead to potential agent
failure and therefore we wait up to 10 minute.
For cookie create/prepare (which includes docker-pull)
we cap this at 10 minutes by default.

With new UDS/FDK contract, health check is now obsoleted
as container advertise health using UDS availibility.
2018-11-01 14:22:47 -07:00
CI
1e3104c649 fnserver: 0.3.605 release [skip ci] 2018-10-31 21:46:47 +00:00
CI
5c72e476f5 fnserver: 0.3.604 release [skip ci] 2018-10-30 19:19:05 +00:00
Tolga Ceylan
e227802512 fn: Remove error channel for container exits (#1287)
The channel is unnecessary and unreliable since exits
trigger I/O failure on UDS earlier than we detect
the exit.
2018-10-30 12:11:23 -07:00