Closed NathanPrado closed 5 years ago
This issue was reported in https://github.com/saltstack-formulas/mongodb-formula/issues/52 but was never fixed (see https://github.com/saltstack-formulas/mongodb-formula/pull/53). Maybe you could fix this via PR.
Glad to, thank you for pointing me to previous references to this issue. I found that this does not have to do with the solution suggested in #53. This actually has to do with the following lines of code in mongodb/server/packages.sls
:
pkg.installed:
- refresh: True
- name: {{ mongodb.server.package }}
{%- if mongodb.server.use_repo %}
- fromrepo: {{ mongodb.server.repo.name|replace('RELEASE', mongodb.server.version) or None }}
{%- endif %}
According to this comment when referring to the pkg.installed module, in apt based distros the fromrepo
param is used to denote the release not the actual repo reference. Therefore, in my case, this value should be "bionic" referring to the code name of the distro. I have tested as much and have had success just changing the fromrepo line. Moreover, if the entire if block is not present the run succeeds as well.
For my PR, I am thinking of conditionally placing the codename of the OS in that field if Debian/Ubuntu. Thoughts?
Yes, that sounds like the only solution here. Does this fix #52?
The cleanest implementation could be to update the if/else
block in oscodemap with the following (pseudo) conditional and use that value in the SLS file.
if ... debian...
from_repo_value: RELEASE
else
from_repo_value: {{ mongodb.server.repo.name|replace('RELEASE', mongodb.server.version) or None }}
@noelmcloughlin I seem to be having trouble deploying my changes to a Debian system. The Vagrant set up I have for my Ubuntu machine (which bootstraps and executes Salt) seems to reject the same salt configuration on a Debian box. Any way you would recommend I test on a Debian machine?
In answer to your question I believe the answer in #53 is also needed but I have yet to prove that in testing.
@noelmcloughlin Not sure how I add you as a reviewer but I am pretty confident i solved the issue. Please give it a check when you can - thanks!
@NathanPrado Is this resolved by #67? If so, do you mind closing this issue?
Hi @NathanPrado Yes, I believe your PR should resolve this. If not, then issue can be reopened. Thanks!!
Ubuntu 18.04 bionic salt 2019.2.0 (Fluorine)
I am having an issue on the mongodb server package installed step:
I did a little digging but am still not quite able to diagnose what could be wrong here.
pillar: