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

Existence of /root/.mongorc.js triggers mongod restart #449

Closed
kujeger opened this issue Mar 19, 2018 · 2 comments
Closed

Existence of /root/.mongorc.js triggers mongod restart #449

kujeger opened this issue Mar 19, 2018 · 2 comments
Labels
bug Something isn't working

Comments

@kujeger
Copy link

kujeger commented Mar 19, 2018

Affected Puppet, Ruby, OS and module versions/distributions

  • Puppet: 4.10.10
  • Ruby: 2.1.9 (bundled)
  • Distribution: RHEL 7.4
  • Module version: 2.0.0

How to reproduce (e.g Puppet code you use)

Set up a default mongodb install with the module, e.g.

class { '::mongodb::globals':
  manage_package_repo => true,
}
class { '::mongodb::server': }
class { '::mongodb::client': }

After puppet has set up everything, run mongo as root on the server to get a mongodb shell.
Exit the mongodb shell, then trigger a puppet run.

What are you seeing

Puppet sees the (empty) /root/.mongorc.js file, deletes it, and restarts mongod.

What behaviour did you expect instead

mongod should not be restarted whenever someone starts a mongo shell on the server as root.

Output log

Info: /Stage[main]/Mongodb::Server::Config/File[/root/.mongorc.js]: Filebucketed /root/.mongorc.js to puppet with sum d41d8cd98f00b204e9800998ecf8427e
Notice: /Stage[main]/Mongodb::Server::Config/File[/root/.mongorc.js]/ensure: removed
Info: Class[Mongodb::Server::Config]: Scheduling refresh of Class[Mongodb::Server::Service]
Info: Class[Mongodb::Server::Service]: Scheduling refresh of Service[mongodb]
Notice: /Stage[main]/Mongodb::Server::Service/Service[mongodb]: Triggered 'refresh' from 1 events

Any additional information you'd like to impart

@ekohl
Copy link
Member

ekohl commented Mar 20, 2018

You can set $manage_creds to false which should stop managing the file.

@kujeger
Copy link
Author

kujeger commented Mar 20, 2018

Thanks, I saw that when making the issue as well, but I do feel it's kind of a workaround -- the current behaviour at least violates the principle of least surprise, imo.

@juniorsysadmin juniorsysadmin added the bug Something isn't working label Mar 22, 2018
@ekohl ekohl closed this as completed Oct 8, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants