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

DeepSea packaging stores (and possibly clobbers) files in /srv (not allowed in openSUSE) #360

Open
smithfarm opened this issue Jun 21, 2017 · 4 comments
Labels

Comments

@smithfarm
Copy link
Contributor

First, this issue refers to the discussion at https://build.opensuse.org/request/show/503528 where the openSUSE maintainers explain why the DeepSea spec file, in its current form, cannot be accepted.

One of the issues is that the package should not be owning files in /srv

Could this could be accomplished by having DeepSea store the state files and pillar data in some other place, like /usr/lib/DeepSea/{state,pillar} and using file_roots [1] and pillar_roots [2] to point the Salt Master to these alternative locations?

[1] https://docs.saltstack.com/en/latest/ref/configuration/master.html#roots-master-s-local-file-server
[2] https://docs.saltstack.com/en/latest/topics/pillar/#declaring-the-master-pillar

@smithfarm smithfarm changed the title Ensure the packaging does not store, or clobber, files in /srv DeepSea packaging stores (and possibly clobbers) files in /srv (not allowed in openSUSE) Jun 21, 2017
@swiftgist
Copy link
Contributor

This is not trivial. Salt only looks in two places effectively: /usr/lib/python2.7/site-packages/salt and /srv. The most correct answer is likely migrating from /srv to site_packages/salt for modules and runners.

With respect to all 534 sls files in /srv/salt/ceph, I don't know the best answer. Reconfiguring Salt to accommodate a separate location seems silly and will like cause integration issues with other Salt solutions like SUSE Manager. Salt, itself, says "put your files in /srv/salt". I went one directory lower with /srv/salt/ceph.

If we try copying files from the actual rpm to an srv location as part of the installation, we are just reinventing rpm in trying to do proper upgrades and not clobber the wrong files.

@smithfarm
Copy link
Contributor Author

Right - this is just a starting point for a discussion we need to be having with the openSUSE release managers and the Salt stakeholders.

@lnussel
Copy link

lnussel commented Jun 21, 2017

admins ie humans are supposed to put files in /srv. a package is not a human. as os vendor we have to put files elsewhere.

@mbrookhuis
Copy link

mbrookhuis commented Oct 16, 2019

For that you can use file_roots and pillar_roots in /etc/salt/master:

For example how this is defined for SUSE Manager
file_roots:
base:

  • /usr/share/susemanager/salt
  • /usr/share/salt-formulas/states
  • /usr/share/susemanager/formulas/states
  • /srv/susemanager/salt
  • /srv/salt

pillar_roots:
base:

  • /use/share/whatever
  • /srv/pillar

Even better is to define the roots not in /etc/salt/master but in a separate file in /etc/salt/master.d
Hope this is what you are looking for.

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

No branches or pull requests

4 participants