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

Fact "mongodb_is_master" fails on mongodb clients #441

Closed
ccnifo opened this issue Feb 9, 2018 · 1 comment
Closed

Fact "mongodb_is_master" fails on mongodb clients #441

ccnifo opened this issue Feb 9, 2018 · 1 comment

Comments

@ccnifo
Copy link

ccnifo commented Feb 9, 2018

I use this module through the Pulp module, on CentOS 7. Given that my mongodb database is located on another server, Pulp module only installs the client with include ::mongodb::client
The problem comes when Puppet evaluates facts: mongodb_is_master fact tries to open a config file which does not exist on a client:

if %w[mongo mongod].all? { |m| Facter::Util::Resolution.which m }
file = mongod_conf_file
config = YAML.load_file(file)

That produces the following error:
Error: Facter: error while resolving custom fact "mongodb_is_master": No such file or directory @ rb_sysopen - /etc/mongodb.conf

I suppose this "if" on line 15 should be modified to not match the "mongo client only" case, given that the related "else" results in 'not_installed', which would fit.

@ccnifo
Copy link
Author

ccnifo commented Mar 7, 2018

I'm confused, this behavior has been fixed in latest versions. This report is thus not relevant, closing it.

@ccnifo ccnifo closed this as completed Mar 7, 2018
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

1 participant