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

Do not crash on swsssdk.exceptions.UnavailableDataError #50

Open
stcheng opened this issue Nov 7, 2017 · 0 comments
Open

Do not crash on swsssdk.exceptions.UnavailableDataError #50

stcheng opened this issue Nov 7, 2017 · 0 comments
Labels

Comments

@stcheng
Copy link
Contributor

stcheng commented Nov 7, 2017

Should have a better way of handling such case.

Traceback (most recent call last):
  File "/usr/lib/python3.6/runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "/usr/lib/python3.6/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/usr/local/lib/python3.6/dist-packages/sonic_ax_impl/__main__.py", line 74, in <module>
    from .main import main
  File "/usr/local/lib/python3.6/dist-packages/sonic_ax_impl/main.py", line 14, in <module>
    from .mibs.ietf import rfc1213, rfc2863, rfc4292, rfc4363
  File "/usr/local/lib/python3.6/dist-packages/sonic_ax_impl/mibs/ietf/rfc1213.py", line 337, in <module>
    class InterfacesMIB(metaclass=MIBMeta, prefix='.1.3.6.1.2.1.2'):
  File "/usr/local/lib/python3.6/dist-packages/sonic_ax_impl/mibs/ietf/rfc1213.py", line 342, in InterfacesMIB
    if_updater = InterfacesUpdater()
  File "/usr/local/lib/python3.6/dist-packages/sonic_ax_impl/mibs/ietf/rfc1213.py", line 157, in __init__
    self.update_data()
  File "/usr/local/lib/python3.6/dist-packages/sonic_ax_impl/mibs/ietf/rfc1213.py", line 176, in update_data
    for sai_id in self.if_id_map}
  File "/usr/local/lib/python3.6/dist-packages/sonic_ax_impl/mibs/ietf/rfc1213.py", line 176, in <dictcomp>
    for sai_id in self.if_id_map}
  File "/usr/local/lib/python3.6/dist-packages/swsssdk/interface.py", line 38, in wrapped
    ret_data = f(inst, db_name, *args, **kwargs)
  File "/usr/local/lib/python3.6/dist-packages/swsssdk/interface.py", line 303, in get_all
    raise UnavailableDataError(message, _hash)
swsssdk.exceptions.UnavailableDataError: Key 'b'COUNTERS:oid:0x1000000000002'' unavailable in database 'COUNTERS_DB'
@stcheng stcheng added the Bug label Nov 7, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant