diagnostics
diagnostics copied to clipboard
dotnet tools don't work in read-only FS deployments due to tmp dependency
System.Commandline tries to create a sentinel in tmp when registering for dotnet-suggest for their support of autocompletion support. This prevents usage of tools in read-only deployments.
Some thoughts:
- We have documented our dependency on
/tmp
or$TMPDIR
and with that workaround our tools seem to work on RO filesystems (as far as I can tell). Perhaps we should link https://learn.microsoft.com/en-us/dotnet/core/diagnostics/diagnostic-port#default-diagnostic-port documentation to our global tool docs and specifically call out if/tmp
isn't writable, thenTMPDIR
needs to be set in both the target process as well as the diagnostic tool. - Add a warning/error to dotnet-* tools when we detect that
/tmp
or$TMPDIR
isn't writable.
Partially solved with https://github.com/dotnet/diagnostics/pull/4593
Why does this only partially solves this issue? The initial description only talks about the System.CommandLine problem which is fixed by that PR. The title and Tom's comments may indicate there are other R/O /tmp problems. Can we list them?
Or can we create other issues to address the rest of the R/O problems?
Fixed in the next tools release which will be this week or next.