-
Notifications
You must be signed in to change notification settings - Fork 23.7k
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
Fix nagios module to recognize if file exists and is fifo pipe #58569
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this looks ok. You need a changelog fragment, though.
7bcbb37
to
4e7a43a
Compare
@felixfontein thanks for looking over this -- added the changelog fragement |
@Klaas- This PR contains |
add felixfontein suggestion to changelogs/fragments/58569-nagios-fifo-fix.yaml Co-Authored-By: Felix Fontein <felix@fontein.de>
a2d95a3
to
c3e19b4
Compare
fixed the issue with the @ in commit message and squashed the two commits |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@Klaas- thank you very much for fixing this! I'll create a backport PR so this will hopefully be included in the next 2.8.x release. |
add felixfontein suggestion to changelogs/fragments/58569-nagios-fifo-fix.yaml Co-Authored-By: Felix Fontein <felix@fontein.de> (cherry picked from commit faf50db)
SUMMARY
Ansible nagios module does not check if cmdfile is actually a fifo file. If the file does not exist (for example nagios is not started, it will create a normal file. If the file exists nagios won't start.
ISSUE TYPE
COMPONENT NAME
lib/ansible/modules/monitoring/nagios.py
ADDITIONAL INFORMATION
Before change:
After change (file doesn't exist):
After change file not fifo:
After change file is fifo: (you'll need to cat test.file from another shell)