-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Ntpd Error Log Caught by Log Analyzer Results in Test Cases Failure #19580
Conversation
/azpw run ms_conflict |
/AzurePipelines run ms_conflict |
No pipelines are associated with this pull request. |
@SuvarnaMeenakshi please help review, thanks. |
Did you try updating https://github.com/sonic-net/sonic-buildimage/blob/master/files/image_config/ntp/ntp-apparmor file so that it reflects all required files? |
Currently the issue is that /var/log/ntpsec directory does not exist which causes error log thrown when ntpd is started every time. The change is trying to create this directory when it does not exist. If the directory already exist it will not do anything. I am not intended to modify permissions to any files inside /var/log/ntpsec. |
It's found that /var/log/ntpsec has to have permission 777. If mode is set to 755 or 775, reset ntpd will have error log. admin@ixre-egl-board29:/var/log$ sudo systemctl status ntpd Aug 01 15:40:45 ixre-egl-board29 ntpd[2920240]: IO: Listen normally on 1 eth0 152.148.151.181:123 |
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
@wumiaont can you help fix conflict. |
/azpw ms_conflict |
@rlhui can you help merge this |
@rlhui @kperumalbfn @qiluo-msft : can you please merge this |
…onic-net#19580) Fix NTP error log which causes many test failure caught by log analyzer
Cherry-pick PR to 202405: #20723 |
…19580) Fix NTP error log which causes many test failure caught by log analyzer
…onic-net#19580) Fix NTP error log which causes many test failure caught by log analyzer
…onic-net#19580) Fix NTP error log which causes many test failure caught by log analyzer
Why I did it
In many mgmt feature test cases, it's found that there's an error log of "ERR ntpd[1902895]: statistics directory /var/log/ntpsec/ does not exist or is unwriteable, error Permission denied" shows up after ntpd is restarted which causes many test case failures as the error log is caught by log analyzer.
Work item tracking
How I did it
Create this directory before ntpd service is started.
How to verify it
Verified on chassis with the fix and restarted ntpd service. No error log shows up.
Which release branch to backport (provide reason below if selected)
Tested branch (Please provide the tested image version)
master