You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
get_default_ip_config function from nettools slas has an issue that causes some services which depend on it to fail, most notably the admin_alerts_notifier
Detalis
KeyError 'address' raised from internal function _clean on machines that have tun interfaces, as the tun interface has no default mac address and the function expect the 'address' key to always exist.
TFTshop was generating this error on my local machine, Alerts support notifier service was failing because of this, if TFTshop, or any software that have JSNG as dependencies, runs on a machine that has TUN interface (or other virtual network interfaces with no mac address), some services could fail.
Steps to reproduce
on a machine with tun interface, e.g, you have yggdrasil installed, inside jsng shell do:
2022-04-05 01:20:58.640 | INFO | alerts_notifier:job:13 - Alerts support notifier service: service started
Traceback (most recent call last):
File "src/gevent/greenlet.py", line 906, in gevent._gevent_cgreenlet.Greenlet.run
File "/home/sameh/projects/it_as_energy_shop/.venv/lib/python3.8/site-packages/jumpscale/packages/admin/services/alerts_notifier.py", line 19, in job
ip_info = j.sals.nettools.get_default_ip_config()
File "/home/sameh/projects/it_as_energy_shop/.venv/lib/python3.8/site-packages/jumpscale/sals/nettools/__init__.py", line 316, in get_default_ip_config
for nic in get_network_info():
File "/home/sameh/projects/it_as_energy_shop/.venv/lib/python3.8/site-packages/jumpscale/sals/nettools/__init__.py", line 383, in get_network_info
for nic in _get_info():
File "/home/sameh/projects/it_as_energy_shop/.venv/lib/python3.8/site-packages/jumpscale/sals/nettools/__init__.py", line 375, in _get_info
yield _clean(nic_info)
File "/home/sameh/projects/it_as_energy_shop/.venv/lib/python3.8/site-packages/jumpscale/sals/nettools/__init__.py", line 349, in _clean
"mac": nic_info["address"],
KeyError: 'address'
2022-04-04T23:20:58Z <Greenlet at 0x7f8e71f356a0: <bound method AlertsNotifier.job of <alerts_notifier.AlertsNotifier object at 0x7f8e71ed7190>>> failed with KeyError
The text was updated successfully, but these errors were encountered:
sameh-farouk
changed the title
KeyError: 'address'
some services could fail when JSNG runs on machines with virtual network interfaces like TUN
Apr 5, 2022
Description
get_default_ip_config function from nettools slas has an issue that causes some services which depend on it to fail, most notably the admin_alerts_notifier
Detalis
KeyError 'address' raised from internal function _clean on machines that have tun interfaces, as the tun interface has no default mac address and the function expect the 'address' key to always exist.
TFTshop was generating this error on my local machine, Alerts support notifier service was failing because of this, if TFTshop, or any software that have JSNG as dependencies, runs on a machine that has TUN interface (or other virtual network interfaces with no mac address), some services could fail.
Steps to reproduce
on a machine with tun interface, e.g, you have yggdrasil installed, inside
jsng
shell do:Traceback/Logs/Alerts
this was taken from TFTshop logs
The text was updated successfully, but these errors were encountered: