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

Report config parsing errors ("invalid directive") #2179

Merged
merged 1 commit into from
Nov 15, 2023

Conversation

jimklimov
Copy link
Member

When certain NUT daemons (upsd, upsmon, upssched; also snmp-ups with mib.conf files) initialize and parse their configuration, they used to just report seeing a certain parse error and it was not clear if the problem was considered fatal, or if the service proceeded to start.

With this PR, we report and count all such errors, and if the count was non-zero - issue a message to stress that some config entries were ignored but the program proceeds.

It feels reasonable to not start the mis-configured service as well, so the admins would fix it... But that may be a task for some other PR (e.g. consider an older daemon running against newer-syntax config files).

@jimklimov jimklimov added the service/daemon start/stop General subject for starting and stopping NUT daemons (drivers, server, monitor); also BG/FG/Debug label Nov 14, 2023
@jimklimov jimklimov added this to the 2.8.2 milestone Nov 14, 2023
….c: report if config errors were seen and we ignored them (went on)

Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
@jimklimov jimklimov force-pushed the report-config-errors branch from c2b5a39 to c259a0a Compare November 14, 2023 14:02
@jimklimov jimklimov changed the title Report config parsing errors Report config parsing errors ("invalid directive") Nov 14, 2023
@jimklimov jimklimov merged commit 8dc9e72 into networkupstools:master Nov 15, 2023
@jimklimov jimklimov deleted the report-config-errors branch November 15, 2023 19:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
service/daemon start/stop General subject for starting and stopping NUT daemons (drivers, server, monitor); also BG/FG/Debug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant