Closed sdodson closed 9 years ago
This was introduced in @9533a872b0901cea822d4583e1111233e5b824ad perhaps in error? @kraman do you know?
[test]
Origin Test Results: SUCCESS (https://ci.openshift.redhat.com/jenkins/job/test_pull_requests/2982/)
@sdodson It does indeed look like the restart there was an omission. looking at the stop_mongo and start_mongo methods though, they look to be systemd specific, they will need to be updated to use service mongod {start,stop} if on rhel/centos, instead of just pkilling the process.
I did something slightly different here, https://github.com/ausnimbus/puppet-openshift_origin/commit/c695368dc3292e30b3a5bbd9efef658a71678e34
@andrewklau Perhaps both a creates attribute and adjusting the script not to restart mongod when the lock file exists? The script says it's found the lock file and is going to exit but still restarts mongod.
@sdodson the script wont run because puppet sees the lock file, I haven't seen any of my mongodb services get restarted since adding that line. However, your point is still valid because I missed, the service openshift-mongo-setup which I guess runs on boot. Restarting it for no reason.
Both should be incorporated, unfortunately that repo I was working on is a horrible mess. So feel free to cherry pick the lines :)
Evaluated for origin up to 3aa804f4868a345bcff879dece211416868524d7
@andrewklau Thanks for the reference to your changes.
@detiber Yeah, oo-mongo-setup is pretty heavy handed with how it stops and restarts mongod when systemctl fails or doesn't exist, we should probably fix that script up for RHEL6 hosts. I'll file an issue on that but I think it's beyond the scope of this.
This bit me because it restarted mongod in between provisioning my first and third datastore host which moved the primary, ultimately resulting in the third host to fail replset-add.
This was causing mongod to restart on each puppet run.