commit | e3032bd090603b0344727647028d03273bd7d3f5 | [log] [tgz] |
---|---|---|
author | Lorenz Brun <lorenz@monogon.tech> | Thu Apr 13 14:43:41 2023 +0200 |
committer | Lorenz Brun <lorenz@monogon.tech> | Tue Apr 18 11:48:46 2023 +0000 |
tree | 685a127ebd2955e1d586cc0a1277b8d464788fc8 | |
parent | bdc803b54b55b61bb07cd75ba966320e42a9c3b7 [diff] |
m/p/supervisor: allow signalling supervised processes Using Command.Process.Signal to send signals to supervised processes creates a data race between the Start function (called by Run) which populates Command.Process and the access to that field. Introduce a new option for RunCommand which takes a signal channel and internally solves this race by first calling Start (at which point Command.Process is populated and will not be mutated) and then spawning a Goroutine which does the actual sending. This is safe at least on Linux since Go 1.7 [1]. [1] https://github.com/golang/go/commit/cea29c4a358004d84d8711a07628c2f856b381e8 Change-Id: Ibb76ef8a0434574c4df9ff85545987026518d8c0 Reviewed-on: https://review.monogon.dev/c/monogon/+/1540 Tested-by: Jenkins CI Reviewed-by: Serge Bazanski <serge@monogon.tech>
This is the main repository containing the source code for the Monogon Platform.
This is pre-release software - take a look, and check back later!
Our build environment is self-contained and requires only minimal host dependencies:
/dev/kvm
(if you want to run tests).Our docs assume that Bazelisk is available as bazel
on your PATH.
Refer to SETUP.md for detailed instructions.
Build CLI and node image:
bazel build //metropolis/cli/dbg //:launch -c dbg
Launch an ephemeral test node:
bazel test //:launch -c dbg --test_output=streamed
Run a kubectl command while the test is running:
bazel-bin/metropolis/cli/dbg/dbg_/dbg kubectl describe node
Run full test suite:
bazel test -c dbg //...