hotcell-server 0.6.0 → 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/hot_cell/log.rb +1 -1
- data/lib/hot_cell/operation.rb +1 -1
- data/lib/hot_cell/server/version.rb +1 -1
- data/lib/hot_cell/slot.rb +1 -1
- data/lib/hot_cell/supervisor.rb +4 -4
- metadata +6 -5
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: bbb296d96887a9a1bc312a14acef431caa03fc30d05a3f77bd6708a8a9d596a4
|
|
4
|
+
data.tar.gz: 6f3a72abba2e2e90ca8b805c15b5bff8feef52d1b1ef5c0a73832e190cc4f182
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 3facfa26f280439cbf43dc21aff1e3a4cfb3ba3212402f1d1e5f396b2773e629409f926cf8fcf00debcd68fdb33d126acfe7f2d487afdff194180eb724c4029f
|
|
7
|
+
data.tar.gz: 52b1e35eb13e510c912ca7bb9cc706186e36380ee166f5f6d2bff0c36a22088d84d4bed69db0e81cd987eb493b450dd7f71bfeb0d5db63531e3d2aa9cb7602c8
|
data/lib/hot_cell/log.rb
CHANGED
|
@@ -12,7 +12,7 @@ module HotCell
|
|
|
12
12
|
# This is the channel for everything no response can carry: deadline kills, reaps that found a signal,
|
|
13
13
|
# boot checks, and queue high-water.
|
|
14
14
|
#
|
|
15
|
-
# Lines follow docs/
|
|
15
|
+
# Lines follow docs/observability.md: ECS field names, domain fields under the hotcell namespace. The fleet's
|
|
16
16
|
# collector routes on service.name, takes the record timestamp from @timestamp, and severity from
|
|
17
17
|
# log.level, so those three are load-bearing: renaming any of them silently drops or mislabels every
|
|
18
18
|
# cell log line in production.
|
data/lib/hot_cell/operation.rb
CHANGED
|
@@ -57,7 +57,7 @@ module HotCell
|
|
|
57
57
|
# class's own declaration, or of the nearest ancestor's when this class has none yet. That is what
|
|
58
58
|
# lets a subclass narrow a single number, and what lets an operator give a shipped operation a
|
|
59
59
|
# different budget from an operations file, after the operation loads, without editing the gem. The
|
|
60
|
-
# cell's own limits still clamp whatever is declared. docs/
|
|
60
|
+
# cell's own limits still clamp whatever is declared. docs/operation-api.md, "Changing a shipped
|
|
61
61
|
# operation's limits".
|
|
62
62
|
def limits(**values)
|
|
63
63
|
return inherited_value(:@limits) || Limits.new if values.empty?
|
data/lib/hot_cell/slot.rb
CHANGED
|
@@ -37,7 +37,7 @@ module HotCell
|
|
|
37
37
|
# uid and `0700` is the owner's own mode, so a concurrent sibling — or a `setsid` descendant of a finished
|
|
38
38
|
# request, which process groups do not contain — can still write into a home the moment it exists. The
|
|
39
39
|
# slot directory itself can be renamed aside and replaced, and `chmod` follows what it finds. Both are the
|
|
40
|
-
# residuals `docs/
|
|
40
|
+
# residuals `docs/design/worker-isolation.md` records, and neither is closed here.
|
|
41
41
|
#
|
|
42
42
|
# There is one directory per request and not two. A request's staged inputs and outputs are named inside
|
|
43
43
|
# `$HOME` rather than in a scratch directory of their own, because the two had the same lifetime and the
|
data/lib/hot_cell/supervisor.rb
CHANGED
|
@@ -281,7 +281,7 @@ module HotCell
|
|
|
281
281
|
# `Codes` already relies on when it refuses to attribute a signal to the input a worker was holding.
|
|
282
282
|
# The premise is that handling TERM is not optional — it is how an orchestrator stops a cell without
|
|
283
283
|
# killing requests in flight — and that denial of service against a cell is out of scope per
|
|
284
|
-
# docs/
|
|
284
|
+
# docs/design/threat-model.md.
|
|
285
285
|
def trap_signals
|
|
286
286
|
@signals, @signal_writer = IO.pipe
|
|
287
287
|
trap("CHLD") { @signal_writer.write_nonblock "C", exception: false }
|
|
@@ -527,9 +527,9 @@ module HotCell
|
|
|
527
527
|
# capability and so survives `cap-drop ALL`, and neither the deadline kill nor the reap sweep reaches
|
|
528
528
|
# it afterwards. It then runs untimed until `pids-limit` or the cgroup ends it.
|
|
529
529
|
#
|
|
530
|
-
# It reaches further than that, so this is not the denial of service docs/
|
|
530
|
+
# It reaches further than that, so this is not the denial of service docs/design/threat-model.md puts out of
|
|
531
531
|
# scope. A stolen listener needs a live process to hold it, and this escape is the only way one
|
|
532
|
-
# outlives the reap — so it is what turns the socket theft
|
|
532
|
+
# outlives the reap — so it is what turns the socket theft in docs/design/worker-isolation.md from a dead
|
|
533
533
|
# socket path into a cell that intercepts every later request.
|
|
534
534
|
#
|
|
535
535
|
# The premise is that nothing in this process prevents it. A process group is the only bound the
|
|
@@ -546,7 +546,7 @@ module HotCell
|
|
|
546
546
|
# for it: a warning written from inside libvips is a `write(2)` in a C call Ruby cannot interrupt, so
|
|
547
547
|
# the conversion would wait on the supervisor's scheduling — nearest exactly when the host is under
|
|
548
548
|
# pressure and the supervisor is scheduled least. That trade is refused; the conversion path must
|
|
549
|
-
# never wait on the supervisor. What non-blocking loses instead is in docs/
|
|
549
|
+
# never wait on the supervisor. What non-blocking loses instead is in docs/observability.md, and a test pins
|
|
550
550
|
# the flag so that a well-meaning fix has to argue with it.
|
|
551
551
|
stderr_reader.close
|
|
552
552
|
stderr_writer.fcntl Fcntl::F_SETFL, stderr_writer.fcntl(Fcntl::F_GETFL) | Fcntl::O_NONBLOCK
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: hotcell-server
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 1.0.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Mike Dalessio
|
|
@@ -15,14 +15,14 @@ dependencies:
|
|
|
15
15
|
requirements:
|
|
16
16
|
- - '='
|
|
17
17
|
- !ruby/object:Gem::Version
|
|
18
|
-
version: 0.
|
|
18
|
+
version: 1.0.0
|
|
19
19
|
type: :runtime
|
|
20
20
|
prerelease: false
|
|
21
21
|
version_requirements: !ruby/object:Gem::Requirement
|
|
22
22
|
requirements:
|
|
23
23
|
- - '='
|
|
24
24
|
- !ruby/object:Gem::Version
|
|
25
|
-
version: 0.
|
|
25
|
+
version: 1.0.0
|
|
26
26
|
description: |
|
|
27
27
|
Runs a HotCell container. A supervisor listens on two Unix sockets, forks a worker for each request,
|
|
28
28
|
and enforces a wall clock deadline and resource limits on it. Write the work as a subclass of
|
|
@@ -64,8 +64,9 @@ licenses:
|
|
|
64
64
|
- MIT
|
|
65
65
|
metadata:
|
|
66
66
|
homepage_uri: https://github.com/basecamp/hotcell
|
|
67
|
-
source_code_uri: https://github.com/basecamp/hotcell/tree/
|
|
68
|
-
changelog_uri: https://github.com/basecamp/hotcell/blob/
|
|
67
|
+
source_code_uri: https://github.com/basecamp/hotcell/tree/v1.0.0/hotcell-server
|
|
68
|
+
changelog_uri: https://github.com/basecamp/hotcell/blob/v1.0.0/CHANGELOG.md
|
|
69
|
+
documentation_uri: https://basecamp.github.io/hotcell/
|
|
69
70
|
bug_tracker_uri: https://github.com/basecamp/hotcell/issues
|
|
70
71
|
rubygems_mfa_required: 'true'
|
|
71
72
|
rdoc_options: []
|