You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
So, the log is in /var/log/coder-startup-script.log. I had to read the documentation to find that, so the issue still stands as a major usability improvement.
Let's make sure we use a PrefixSuffixWriter (First N bytes + Last N bytes) to bound how much storage these logs can take. We also may need the same for the provisioner logs, but I haven't investigated the code.
An implementation challenge is startup_script can block for an indeterminate amount of time. Some of our examples spin off code-server asynchronously, but others block.
Let's make sure we use a PrefixSuffixWriter (First N bytes + Last N bytes) to bound how much storage these logs can take. We also may need the same for the provisioner logs, but I haven't investigated the code.
The only issue is if we're expecting some sort of prompt to be written to the log (something I know @kylecarbs mentioned when we discussed this Monday) then it might get truncated by the PrefixSuffixWriter.
We could potentially only keep the startup logs of the most recent build and maybe also use a PrefixSuffixWriter with a 1MB cap to prevent any maliciousness. That would more than likely solve 99% of cases and prevent us from ballooning over time.
The startup logs of previous builds are not likely to be useful.
Some kind of limiter is absolutely necessary to prevent DoS, e.g cat /dev/urandom.
We could potentially only keep the startup logs of the most recent build and maybe also use a PrefixSuffixWriter with a 1MB cap to prevent any maliciousness. That would more than likely solve 99% of cases and prevent us from ballooning over time.
Activity
[-]Add startup script log to build log[/-][+]Add startup logs to build log[/+]ammario commentedon Jul 31, 2022
So, the log is in
/var/log/coder-startup-script.log. I had to read the documentation to find that, so the issue still stands as a major usability improvement.ketang commentedon Jul 31, 2022
[-]Add startup logs to build log[/-][+]Add startup logs to build log UI[/+]ammario commentedon Oct 17, 2022
Let's make sure we use a
PrefixSuffixWriter(First N bytes + Last N bytes) to bound how much storage these logs can take. We also may need the same for the provisioner logs, but I haven't investigated the code.ammario commentedon Oct 18, 2022
An implementation challenge is
startup_scriptcan block for an indeterminate amount of time. Some of our examples spin off code-server asynchronously, but others block.sreya commentedon Oct 19, 2022
The only issue is if we're expecting some sort of prompt to be written to the log (something I know @kylecarbs mentioned when we discussed this Monday) then it might get truncated by the
PrefixSuffixWriter.We could potentially only keep the startup logs of the most recent build and maybe also use a
PrefixSuffixWriterwith a 1MB cap to prevent any maliciousness. That would more than likely solve 99% of cases and prevent us from ballooning over time.The startup logs of previous builds are not likely to be useful.
ammario commentedon Oct 20, 2022
Some kind of limiter is absolutely necessary to prevent DoS, e.g
cat /dev/urandom.This sounds good to me.
20 remaining items
bpmct commentedon Mar 28, 2023
Closing as completed by #6558.