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

WARNING issued for pending reboot #13

Open
sbi-c opened this issue Nov 17, 2022 · 5 comments
Open

WARNING issued for pending reboot #13

sbi-c opened this issue Nov 17, 2022 · 5 comments

Comments

@sbi-c
Copy link

sbi-c commented Nov 17, 2022

check_unattended_upgrades issues a WARNING if the last log line reads

2022-11-17 04:05:01,255 WARNING Shutdown msg: b"Shutdown scheduled for Thu 2022-11-17 05:05:00 UTC, use 'shutdown -c' to cancel."

This line should be ignored, right?

@Josef-Friedrich
Copy link
Owner

I am not sure if this warning should really be ignored. It is possible that someone starts his computer server earlier because of this warning, which is beneficial for security updates.

@sbi-c
Copy link
Author

sbi-c commented Nov 17, 2022

So when /var/run/reboot-required is present, check_unattended_upgrades correctly outputs "WARNING - Machine requires a reboot". However, the log is checked for WARNING lines first, so when both /var/run/reboot-required and the log line mentioned are present, check_unattended_upgrades outputs "WARNING - The last line in the log file is a WARNING message". I find this misleading because the log line adds no useful information but obscures the fact that a reboot is required.

@Josef-Friedrich
Copy link
Owner

Thank you for your clarification.

@Josef-Friedrich
Copy link
Owner

Josef-Friedrich commented Dec 11, 2022

I started a rewrite of this monitoring plugin in Python:
check_unattended_upgrades.py

The plugin has become too big for a shell script.

@amotl
Copy link
Contributor

amotl commented Dec 11, 2022

Dear @Josef-Friedrich,

apologies for chiming into this discussion, but we wanted to emphasize that we love your decision to rewrite the program in Python, and look forward to test it on our machines when you consider it to be ready.

On another note, @Tonkenfo may also be happy to be able to rewrite his improvement 1 using a proper programming language ;].

With kind regards,
Andreas.

Footnotes

  1. https://github.com/Josef-Friedrich/check_unattended_upgrades/compare/main...cicerops:check_unattended_upgrades:add_repo_check

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

No branches or pull requests

3 participants