yahoo-eng-team team mailing list archive
-
yahoo-eng-team team
-
Mailing list archive
-
Message #94441
[Bug 2077351] [NEW] "Error formatting log line" sometimes seen in l3-agent log
Public bug reported:
While looking at another issue, I noticed this error in the l3-agent
log:
Aug 19 14:53:06.339086 np0038216951 neutron-keepalived-state-change[103857]: INFO neutron.common.config [-] Logging enabled!
Aug 19 14:53:06.339318 np0038216951 neutron-keepalived-state-change[103857]: INFO neutron.common.config [-] /opt/stack/data/venv/bin/neutron-keepalived-state-change version 25.0.0.0b2.dev120
Aug 19 14:53:06.339942 np0038216951 neutron-keepalived-state-change[103857]: DEBUG neutron.common.config [-] command line: /opt/stack/data/venv/bin/neutron-keepalived-state-change --router_id=2a06f3a4-8964-4200-97e8-a9d635f31fba --namespace=qrouter-2a06f3a4-8964-4200-97e8-a9d635f31fba --conf_dir=/opt/stack/data/neutron/ha_confs/2a06f3a4-8964-4200-97e8-a9d635f31fba --log-file=/opt/stack/data/neutron/ha_confs/2a06f3a4-8964-4200-97e8-a9d635f31fba/neutron-keepalived-state-change.log --monitor_interface=ha-b1ac3293-17 --monitor_cidr=169.254.0.132/24 --pid_file=/opt/stack/data/neutron/external/pids/2a06f3a4-8964-4200-97e8-a9d635f31fba.monitor.pid.neutron-keepalived-state-change-monitor --state_path=/opt/stack/data/neutron --user=1001 --group=1001 {{(pid=103857) setup_logging /opt/stack/neutron/neutron/common/config.py:123}}
Aug 19 14:53:06.352377 np0038216951 neutron-l3-agent[62158]: ERROR neutron.agent.linux.utils [-] Unable to convert value in /opt/stack/data/neutron/external/pids/2a06f3a4-8964-4200-97e8-a9d635f31fba.monitor.pid.neutron-keepalived-state-change-monitor
Aug 19 14:53:06.352377 np0038216951 neutron-l3-agent[62158]: DEBUG neutron.agent.l3.ha_router [-] Error formatting log line msg='Router *(router_id)s *(process)s pid *(pid)d' err=TypeError('*d format: a real number is required, not NoneType') {{(pid=62158) spawn_state_change_monitor /opt/stack/neutron/neutron/agent/l3/ha_router.py:453}}
The code in question is printing the PID as %(pid)d so when it is None
it generates a TypeError.
I think in this case the pid file has simply not been written yet and
the process is still spawning, so we should print a warning to that
effect. That way if the admin does see an issue with that router there
is something to indicate why.
** Affects: neutron
Importance: Low
Assignee: Brian Haley (brian-haley)
Status: In Progress
** Tags: l3-ha
--
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to neutron.
https://bugs.launchpad.net/bugs/2077351
Title:
"Error formatting log line" sometimes seen in l3-agent log
Status in neutron:
In Progress
Bug description:
While looking at another issue, I noticed this error in the l3-agent
log:
Aug 19 14:53:06.339086 np0038216951 neutron-keepalived-state-change[103857]: INFO neutron.common.config [-] Logging enabled!
Aug 19 14:53:06.339318 np0038216951 neutron-keepalived-state-change[103857]: INFO neutron.common.config [-] /opt/stack/data/venv/bin/neutron-keepalived-state-change version 25.0.0.0b2.dev120
Aug 19 14:53:06.339942 np0038216951 neutron-keepalived-state-change[103857]: DEBUG neutron.common.config [-] command line: /opt/stack/data/venv/bin/neutron-keepalived-state-change --router_id=2a06f3a4-8964-4200-97e8-a9d635f31fba --namespace=qrouter-2a06f3a4-8964-4200-97e8-a9d635f31fba --conf_dir=/opt/stack/data/neutron/ha_confs/2a06f3a4-8964-4200-97e8-a9d635f31fba --log-file=/opt/stack/data/neutron/ha_confs/2a06f3a4-8964-4200-97e8-a9d635f31fba/neutron-keepalived-state-change.log --monitor_interface=ha-b1ac3293-17 --monitor_cidr=169.254.0.132/24 --pid_file=/opt/stack/data/neutron/external/pids/2a06f3a4-8964-4200-97e8-a9d635f31fba.monitor.pid.neutron-keepalived-state-change-monitor --state_path=/opt/stack/data/neutron --user=1001 --group=1001 {{(pid=103857) setup_logging /opt/stack/neutron/neutron/common/config.py:123}}
Aug 19 14:53:06.352377 np0038216951 neutron-l3-agent[62158]: ERROR neutron.agent.linux.utils [-] Unable to convert value in /opt/stack/data/neutron/external/pids/2a06f3a4-8964-4200-97e8-a9d635f31fba.monitor.pid.neutron-keepalived-state-change-monitor
Aug 19 14:53:06.352377 np0038216951 neutron-l3-agent[62158]: DEBUG neutron.agent.l3.ha_router [-] Error formatting log line msg='Router *(router_id)s *(process)s pid *(pid)d' err=TypeError('*d format: a real number is required, not NoneType') {{(pid=62158) spawn_state_change_monitor /opt/stack/neutron/neutron/agent/l3/ha_router.py:453}}
The code in question is printing the PID as %(pid)d so when it is None
it generates a TypeError.
I think in this case the pid file has simply not been written yet and
the process is still spawning, so we should print a warning to that
effect. That way if the admin does see an issue with that router there
is something to indicate why.
To manage notifications about this bug go to:
https://bugs.launchpad.net/neutron/+bug/2077351/+subscriptions
Follow ups