assume no Platform file means PoE is not supported on this platform#23
Open
KanjiMonster wants to merge 2 commits intodentproject:mainfrom
Open
assume no Platform file means PoE is not supported on this platform#23KanjiMonster wants to merge 2 commits intodentproject:mainfrom
KanjiMonster wants to merge 2 commits intodentproject:mainfrom
Conversation
Instead of loudly complaining about failing to load the PoE platform due to a missing file, treat the absence as no PoE support. Reduces the log error: > Sep 14 14:25:19 localhost systemd[1]: Started DentOS POE Agent. > Sep 14 14:25:19 localhost poed.py[1008]: ALERT: Failed to load PoE platform. err: [Errno 2] No such file or directory: '/opt/poeagent/bin/../platforms/delta/tn48m-dn-r0/poe_platform.py' To just: > Sep 21 13:12:32 localhost systemd[1]: Started DentOS POE Agent. > Sep 21 13:12:32 localhost poed.py[977]: INFO: No PoE platform found, assuming no PoE support. Signed-off-by: Jonas Gorski <jonas.gorski@bisdn.de>
If there is no PoE platform file, assume this platform does not support PoE instead of passing on the raw error message to the user. Before: > root@localhost:~# poecli > Failed to load poe platform! ([Errno 2] No such file or directory: '/opt/poeagent/bin/../platforms/delta/tn48m-dn-r0/poe_platform.py') After: > root@localhost:~# poecli > This platform does not support PoE. Signed-off-by: Jonas Gorski <jonas.gorski@bisdn.de>
b7b9043 to
89d1dbc
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Currently, both
poedandpoeclitreat the absence of a platform file as an error. But non-PoE platforms do not have one, so this case is actually expected.So change
poedandpoeclito treat this is meaning that there is no PoE support, and print a less alarming message, as well reduce its level to INFO forpoed.