Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

does not even list plugins without sudo access #3900

Open
yarikoptic opened this issue Jan 11, 2025 · 2 comments
Open

does not even list plugins without sudo access #3900

yarikoptic opened this issue Jan 11, 2025 · 2 comments

Comments

@yarikoptic
Copy link

I am new to SOS. Was considering it for a replacement of our "ad-hoc" datalad wtf (sample output could be found under expandable WTF section within e.g. datalad/datalad#7691). But was surprised that it seems sos is not usable without sudo access, even cannot list plugins?

(base) yoh@dhcp-10-31-167-64 sos % git describe 
3.9-1694-gace5715f
(base) yoh@dhcp-10-31-167-64 sos % git describe --tags
4.8.2-4-gace5715f
(base) yoh@dhcp-10-31-167-64 sos % sos report --list-plugins
/Users/yoh/miniconda/bin/sos:4: DeprecationWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html
  __import__('pkg_resources').require('sos==4.8.2')

WARNING: Failed to load 'magic' module version >= 0.4.20 which sos aims
to use for detecting binary files. A less effective method will be used.
It is recommended to install proper python3-magic package with the
module.

Could not initialize 'report': Component must be run with root privileges
(base) yoh@dhcp-10-31-167-64 sos % echo $?
1

which is IMHO heavily limits the applicability for use of sos in 3rd party software which most often would not be used by users with sudo access.

NB above is on a loaner OSX laptop... yet to see what happens under linux

For this particular example -- I think it should be able to list plugins without requiring sudo access.

@TurboTurtle
Copy link
Member

At one point in the past we did support non-root executions, but what we found from feedback from both users and support engineers, as well as some analytics on collected sos reports was that

  1. Most people (over 95%, I forget the exact number at this point) ran it as root regardless and
  2. There were numerous complaints about non-root reports due to them missing a lot of support-relevant data since a lot of the collections we try to perform require root privileges themselves.

The current root requirement within sos report (as opposed to sos collect which does not need local root, but does need remote root to run reports on target hosts) is set very early on. We could ease that a bit to at least allow listing plugins, but I'd be cautious about supporting non-root report generation again.

Side note about OSX: we don't support Mac OS generally, and certainly not for report. It might work for a very limited set of collections, but we don't test that OS at all. collect might have better luck, but again we don't develop for or test against Mac OS. It has kicked around in my head over the last year or so about changing that (mainly because I'm forced to use a MBP for work, so it's always something staring me in the face), but there's a lot of work we'd need to do in order to properly support sos there.

@TurboTurtle
Copy link
Member

but I'd be cautious about supporting non-root report generation again.

Just to clarify on this point.

I'd be cautious from the standpoint of "is there a use case that warrants the maintenance of supporting non-root reports", rather than anything else. I think we'd still want everything to default to the assumption of root being required, but there's a not-awful implementation that could tie plugin enablement to root-ness and such.

If you could expand a bit on datalad in terms of where it gets deployed and what kind of diagnostic data you like to see when troubleshooting, we can definitely talk about opening up sos to non-root again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants