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

[FEATURE REQUEST] Mention whether minion is classic or onedir in salt versions report #62961

Closed
frebib opened this issue Oct 26, 2022 · 3 comments · Fixed by #64446
Closed

[FEATURE REQUEST] Mention whether minion is classic or onedir in salt versions report #62961

frebib opened this issue Oct 26, 2022 · 3 comments · Fixed by #64446
Assignees
Labels
Feature new functionality including changes to functionality and code refactors, etc. needs-triage

Comments

@frebib
Copy link
Contributor

frebib commented Oct 26, 2022

Is your feature request related to a problem? Please describe.
Save @OrangeDog having to ask everyone whether their minion is onedir or not: #62951 (comment)

Describe the solution you'd like
salt-call -V to say whether the minion is onedir or not

Describe alternatives you've considered
N/A

@frebib frebib added Feature new functionality including changes to functionality and code refactors, etc. needs-triage labels Oct 26, 2022
@OrangeDog
Copy link
Contributor

Haha, thanks.

It's in the Bug template but people often delete it without answering.
I also requested it here: #62589 (comment)

@darless
Copy link

darless commented Dec 10, 2022

This would only be useful for those on versions prior to 3006.

Does salt know itself whether it is onedir or not?

I installed both onedir and the classic model via the documentation provided in https://docs.saltproject.io/salt/install-guide/en/latest/topics/install-by-operating-system/ubuntu.html for 18.04 with salt-minion.

Below are the differences that could be used to flag that it is onedir or not.

  • /usr/bin/salt-minion is a bash file in onedir mode, while in classic mode it is a python3 script.
  • In classic mode the salt python package files are installed in /usr/lib/python3/dist-packages, in onedir they are not installed as it is a binary.
  • In onedir mode the binary for saltstack is in /opt/saltstack/salt/run/run, in classic mode this directory doesn't exist.

From the items above: If saltstack uses a script that calls a binary then it's onedir otherwise it's classic.

@dfidler
Copy link

dfidler commented Jan 19, 2023

Legacy packages are going to be around for years. SUSE packages their own minions, and other legacy platform (not yet onedir), installation from source isn't going to be onedir, etc.

Even if it's not codified in salt --version(s) then it's worthwhile to at least have a documented method of determining if you're running a onedir/legacy/source-installed minion.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature new functionality including changes to functionality and code refactors, etc. needs-triage
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants