OSC / bc_osc_rstudio_server

Batch Connect - OSC RStudio Server
https://osc.github.io/Open-OnDemand/
MIT License
10 stars 18 forks source link

add logs to the staged_root output #79

Closed johrstrom closed 2 years ago

johrstrom commented 3 years ago

RStudio server has a log output that's currently held within the container (or somewhere else if run on kuberenetes).

Let's make sure that log gets put into staged_root so that we can debug errors like 502s when customers run into errors.

treydock commented 3 years ago

Anything writing to Kubernetes logs accessible via stdout/stderr and kubectl logs gets written to pod.log:

https://github.com/OSC/bc_osc_rstudio_server/blob/9ec8ea27266ee94b1e59fec19c0573e2877cf15d/template/before.sh.erb#L2-L3

If there is a log file written, it's not being explicitly set at this time as far as I can tell.

johrstrom commented 3 years ago

Yea they're not stdout/err, IIRC it's a /var/log location.

treydock commented 3 years ago

Not sure how that's possible since /var/log won't be writable by the user, it will only be writable by root. I would think best solution for wherever it gets written to to pass a flag (hopefully possible) to RStudio to force it to use staged_root for the logs.

treydock commented 3 years ago

I see this for rsession help output:

log:
  --log-stderr arg (=0)                 write log entries to stderr

That could be useful.

I don't see anything useful for the rserver command when running the help output.