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

Unable to load config (persistent or otherwise) #17

Open
rothcar opened this issue Nov 16, 2021 · 2 comments
Open

Unable to load config (persistent or otherwise) #17

rothcar opened this issue Nov 16, 2021 · 2 comments

Comments

@rothcar
Copy link
Contributor

rothcar commented Nov 16, 2021

On poed startup, poed attempts to load and apply settings in the volatile and/or persistent config. This step sometimes fails. The error shown in the log does not indicate why the load failed, and does not provide any guidance on how much of the config was applied.

@leonchiang
Copy link
Contributor

leonchiang commented Nov 29, 2021

Hi Carl:
We've reproduce these log by restart poe agent frequently(Start-> sleep 4~10s ->Stop->sleep 1s->Start...looping)
on our Platform TN48M-P, please let us make a sure if the timing/message are similar:

  1. Error of apply platform config:
    Nov 24 18:53:27 localhost systemd[1]: Started DentOS POE Agent.
    Nov 24 18:53:30 localhost systemd[1]: Stopping DentOS POE Agent...
    Nov 24 18:53:30 localhost poed.py[6085]: INFO: Failed to apply platform PoE settings!
    Nov 24 18:53:30 localhost poed[6078]: INFO: Failed to apply platform PoE settings!
    Nov 24 18:53:30 localhost systemd[1]: Stopped DentOS POE Agent.
    Nov 24 18:53:31 localhost systemd[1]: Started DentOS POE Agent.

  2. Error of load runtime config:
    Nov 25 09:20:53 localhost systemd[1]: Started DentOS POE Agent.
    Nov 25 09:21:00 localhost poed.py[12059]: INFO: Success to apply platform PoE settings!
    Nov 25 09:21:00 localhost poed.py[12059]: INFO: Configure PoE ports from "/run/poe_runtime_cfg.json"
    Nov 25 09:21:02 localhost systemd[1]: Stopping DentOS POE Agent...
    Nov 25 09:21:02 localhost poed.py[12059]: ERR: An exception to load cfg (/run/poe_runtime_cfg.json): local variable 'res' referenced before assignment, retry = 0
    Nov 25 09:21:02 localhost poed[12052]: INFO: Success to apply platform PoE settings!
    Nov 25 09:21:02 localhost poed[12052]: INFO: Configure PoE ports from "/run/poe_runtime_cfg.json"
    Nov 25 09:21:02 localhost poed[12052]: ERR: An exception to load cfg (/run/poe_runtime_cfg.json): local variable 'res' referenced before assignment, retry = 0
    Nov 25 09:21:02 localhost systemd[1]: Stopped DentOS POE Agent.

Add new cases:

  1. (Another case1)Remove configs(runtime/perm) then restart agent(warm boot):
    Dec 1 18:47:42 localhost systemd[1]: Started DentOS POE Agent.
    Dec 1 18:47:49 localhost poed.py: INFO: Success to apply platform PoE settings!
    Dec 1 18:47:49 localhost poed.py: INFO: Configure PoE ports from "/etc/poe_agent/poe_perm_cfg.json"
    Dec 1 18:47:49 localhost poed.py: WARN: Invalid cfg data to load!
    Dec 1 18:47:49 localhost poed.py: WARN: Failed to restore port configurations from "/etc/poe_agent/poe_perm_cfg.json".
    (Then all ports enabled, /etc/poe_agent/poe_perm_cfg.json appears after 30s)

  2. (Another case2)Remove runtime configs only then restart agent(warm boot, but no runtime config):
    Dec 1 19:01:23 localhost systemd[1]: Started DentOS POE Agent.
    Dec 1 19:01:30 localhost poed.py: INFO: Success to apply platform PoE settings!
    Dec 1 19:01:30 localhost poed.py: INFO: Configure PoE ports from "/etc/poe_agent/poe_perm_cfg.json"
    Dec 1 19:01:35 localhost poed.py: INFO: Success to restore port configurations from "/etc/poe_agent/poe_perm_cfg.json".

If restart delay timing or message are not same, please share the reproduce sequence or timing to us, so we can locate the root cause.

@leonchiang
Copy link
Contributor

Please check devel-0001 branch tag:
https://github.com/leonchiang/poed/releases/tag/issue_fix_0001

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

2 participants