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

NAS-132657 / 25.04 / Remove explicit calls to syslog.syslog module #15039

Open
wants to merge 9 commits into
base: master
Choose a base branch
from

Conversation

yocalebo
Copy link
Contributor

@yocalebo yocalebo commented Nov 25, 2024

As pointed out by a community user, we're doing a bunch of random/weird things with syslog messages. While the community member focused on the mail functionality, I found we had sprinkled in random syslog calls all over the place.

There are a bunch of problems with what we were doing:

  1. we were violating the syslog specification by sending newlines in the syslog messages (they should be single lines only)
  2. in the case of the email message, we were sending the entire contents of the email via syslog...that's not correct
  3. all of the messages in middlewared.log are monitored by syslog-ng. If a remote syslog server is configured, then syslog-ng automatically monitors that file and sends those messages to the remote system
  4. because of what I mentioned in point # 3 above, the remote syslog server was getting duplicate messages with different timestamps. This is because the messages were being forwarded by 2 different sources.

Because we already forward relevant log messages via syslog-ng, this removes the explicit calls to syslog.syslog module as to not cause confusion. While I'm here, I went ahead and formatted/fixed up the find_aliases_for_smtplib.py script.

@bugclerk
Copy link
Contributor

@bugclerk bugclerk changed the title Remove explicit calls to syslog.syslog module NAS-132657 / 25.04 / Remove explicit calls to syslog.syslog module Nov 25, 2024
@yocalebo yocalebo requested a review from a team November 25, 2024 18:07
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

Successfully merging this pull request may close these issues.

2 participants