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

Optionnaly add logrotate configuration for mongod #591

Conversation

beerfranz
Copy link
Contributor

SUMMARY

Add a default logrotate configuration from a jinja template, if mongodb_logrotate_enabled = yes
When log rotate is enabled, the signal USR1 (SIGUSR1) is used to inform mongod process that the log file have been rotated.

ISSUE TYPE
  • Feature Pull Request
COMPONENT NAME

role mongodb_mongod

ADDITIONAL INFORMATION

In the configuration template, the attribute processManagement.pidFilePath was moved the if condition, the PID file should be set, whatever the OS.
Also, a check was added to ensure that the PID file folder exists.

@codecov
Copy link

codecov bot commented Aug 1, 2023

Codecov Report

Merging #591 (5610768) into master (9e70321) will decrease coverage by 0.11%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##           master     #591      +/-   ##
==========================================
- Coverage   73.19%   73.08%   -0.11%     
==========================================
  Files           6        6              
  Lines         929      929              
  Branches      143      143              
==========================================
- Hits          680      679       -1     
  Misses        213      213              
- Partials       36       37       +1     

see 1 file with indirect coverage changes

@beerfranz
Copy link
Contributor Author

There is an issue with the PID file, the folder /var/run/mongodb is destroyed on reboot. It blocks mongod start.
fix in progress

@beerfranz beerfranz marked this pull request as draft August 2, 2023 10:44
@beerfranz beerfranz marked this pull request as ready for review August 2, 2023 14:16
@beerfranz
Copy link
Contributor Author

fixed. logrotate use the command pidof instead of reading mongodb PID file.

@github-actions github-actions bot added the Stale label Oct 3, 2023
@github-actions github-actions bot closed this Oct 11, 2023
@FrancoisGuegnaudMB
Copy link

Hello! There is an issue with this PR ? Why it hasn't been merged ?

@rhysmeister
Copy link
Collaborator

See comment above about yes/no values. Should be using true/false

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants