sonic-net / sonic-py-swsssdk

Python SONiC switch state service sdk
Other
13 stars 86 forks source link

SonicV2Connector.connect method keeps on connecting infinitely even with wrong password. #127

Open kamalkrbh opened 2 years ago

kamalkrbh commented 2 years ago

If created SonicV2Connector object with wrong password and try connecting to a database like following: sonic_db=swsssdk.SonicV2Connector(password="wrong_password") sonic_db.connect("COUNTERS_DB")

swsssdk infinitely logging following warning messages and application is blocked forever, In case of wrong password a specific exception should be raised and function interface.py->_persistent_connect() should return immediately rather than retrying infinitely.

[2022-09-13 16:37:21,960][WARNING][swsssdk] Connecting to DB '2 COUNTERS_DB' failed, will retry in 10s

related issue - https://github.com/STORDIS/monsoon/issues/7