DeepSea icon indicating copy to clipboard operation
DeepSea copied to clipboard

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

Open smithfarm opened this issue 7 years ago • 4 comments

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 avatar Jun 21 '17 13:06 smithfarm

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.

swiftgist avatar Jun 21 '17 13:06 swiftgist

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

smithfarm avatar Jun 21 '17 13:06 smithfarm

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.

lnussel avatar Jun 21 '17 14:06 lnussel

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.

mbrookhuis avatar Oct 16 '19 09:10 mbrookhuis