Maximilian Paß
c0a3fb12c3
Fix UpdateFileSystem Context
...
to be done when either the runner is destroyed (case ignored before) or the request is interrupted.
2023-08-21 22:49:09 +02:00
Maximilian Paß
306512bf9c
Fix Context Values are not logged.
...
Only the Sentry hook uses the values of the passed context. Therefore, we removed the values from our log statements when we shifted them from an extra `WithField` call to the context.
We fix this behavior by introducing a Logrus Hook that copies a fixed set of context values to the logging data.
2023-08-21 22:40:37 +02:00
Maximilian Paß
a7d27e8f65
Add missing error log statements.
...
When "markRunnerAsUsed" fails, we silently ignored it. Only, when additionally the return of the runner failed, we threw the error.
When a Runner is destroyed, we are only notified that Nomad removed the allocation, but cannot tell about the reason.
For "the execution did not stop after SIGQUIT" we did not log the belonging runner id.
2023-08-21 22:40:37 +02:00
Maximilian Paß
73759f8a3c
Retry Environment Recovery
2023-08-18 09:28:23 +02:00
Maximilian Paß
eb818f92f7
Refactor Runner Destroy Reason Masking
...
and ignore expected reasons such when the runner got destroyed by an API request.
2023-07-24 11:48:14 +01:00
Maximilian Paß
8ef5f4e7c5
Fix OOM Kill race condition
...
due to the Nomad request exiting before the allocation is stopped. We catch this behavior by introducing a time period for the allocation being stopped iff the exit code is 128.
2023-07-21 15:30:21 +02:00
Maximilian Paß
6a1677dea0
Introduce reason for destroying runner
...
in order to return a specific error for OOM Killed Executions.
2023-07-21 15:30:21 +02:00
Maximilian Paß
b3fedf274c
Handle Runner Timeout
...
Before, Nomad executions often got stopped because the runner was deleted.
With the previous commit, we cover the exception to this behaviour by stopping the execution Poseidon-side.
These different approaches lead to different context error messages.
In this commit, we move the check of the passed timeout, to respond with the corresponding client message again.
2023-07-21 15:30:21 +02:00
Maximilian Paß
bfb5977d24
Destroy runner on allocation stopped
...
Destroying the runner when Nomad informs us about its allocation being stopped, fixes the error of executions running into their timeout even if the allocation was stopped long ago.
2023-07-21 15:30:21 +02:00
Maximilian Paß
e7df777db4
Always log Runner and Environment ID.
...
Systematically log the runner id and the environment id by adding the information at the findRunnerMiddleware.
2023-07-15 21:46:56 +02:00
Maximilian Paß
0c8fa9ccfa
Add context to log statements.
2023-04-11 20:45:30 +01:00
Maximilian Paß
7dadc5dfe9
Refactor Nomad Command Generation.
...
- Abstracting from the exec form while generating.
- Removal of single quotes (usage of only double-quotes).
- Bash-nesting using escaping of special characters.
2023-03-14 23:42:19 +01:00
Maximilian Paß
4550a4589e
Dangerous Context Enrichment
...
by passing the Sentry Context down our abstraction stack.
This included changes in the complex context management of managing a Command Execution.
2023-02-03 10:29:18 +00:00
Maximilian Paß
a9581ac1d9
Performance for ListFileSystem
2023-02-03 10:29:18 +00:00
Maximilian Paß
f2c205a8ed
Add additional performance spans
2023-02-03 10:29:18 +00:00
Maximilian Paß
b3eee17846
Support protected directories
...
by setting the sticky bit to all explicitly requested directories.
2022-10-29 19:11:05 +02:00
Maximilian Paß
5e5e13806e
Monitor file download.
2022-10-26 01:33:26 +02:00
Maximilian Paß
7119f3e012
Fix not canceling monitoring events for removed environments
...
and runners.
2022-10-24 13:15:14 +02:00
Maximilian Paß
3509109b6f
Fix Ls2JsonWriter
...
by allowing more spaces in the ls response.
by sending the error response of the list file system route only when no content has been written.
2022-10-05 12:11:47 +01:00
Maximilian Paß
195f88177e
Add Content-Length and Content-Disposition Header
...
for GetFileContent route.
2022-10-05 12:11:47 +01:00
Maximilian Paß
0c70ad3b24
Enable unprivileged retrieve of file listing and content.
2022-10-05 12:11:47 +01:00
Maximilian Paß
3469d0ce77
Specify http not found exit code
...
by replacing it with StatusGone (410) for a missing runner and StatusFailedDependency (424) for missing or not accessible files.
2022-10-05 12:11:47 +01:00
Maximilian Paß
fc77f11d4d
Enquote file path for shell execution.
...
Also, fix json of 500 response.
2022-10-05 12:11:47 +01:00
Maximilian Paß
152b77afe5
Add listing of runners file system.
2022-10-05 12:11:47 +01:00
Maximilian Paß
f2b25566dd
#136 Copy files back from Nomad runner.
2022-10-05 12:11:47 +01:00
Sebastian Serth
1a5a49d7c8
Explicitly switch user for code execution.
...
Co-authored-by: Maximilian Pass <maximilian.pass@student.hpi.uni-potsdam.de >
2022-09-24 23:09:23 +02:00
Maximilian Paß
5590c50e14
#110 Add periodical monitoring events.
2022-08-19 20:48:46 +02:00
Maximilian Paß
49c7a2d405
Save the runner and environment id for executions monitoring.
2022-07-31 19:42:35 +02:00
Maximilian Paß
498e8f5ff5
#110 Refactor influxdb monitoring
...
to use it as singleton.
This enables the possibility to monitor processes that are independent of an incoming request.
2022-07-01 15:29:31 +02:00
Maximilian Paß
34040162c2
#89 Generalise the three Storage interfaces and structs into one generic storage manager.
2022-06-29 16:21:19 +02:00
Maximilian Paß
eecacc08bf
#42 Allow deletion of ./*
2022-06-10 18:21:06 +02:00
Maximilian Paß
b7a20e3114
Introduce method "Environment" to the Runners interface.
...
This way we can relate to which environment a runner belongs.
2022-04-18 13:17:49 +02:00
Maximilian Paß
2cf890ab91
Implement review comments
2022-02-28 14:54:40 +01:00
Maximilian Paß
df68461264
Sanitize user input in logs.
2022-02-28 14:54:40 +01:00
Maximilian Paß
4ffbb712ed
Parametrize e2e tests to also check AWS environments.
...
- Fix destroy runner after timeout.
- Add file deletion
2022-02-28 14:54:40 +01:00
Maximilian Paß
6123d20525
Implement core functionality of AWS integration
2022-02-28 14:54:40 +01:00
Maximilian Paß
dd41e0d5c4
Generate structures for an AWS environment and runner
2022-02-28 14:54:40 +01:00