Skip to content

Commit

Permalink
Fix DBConfig not initialize issue in pfcwd (#2238) (#2372)
Browse files Browse the repository at this point in the history
#### What I did
Fix pfcwd connect DB with exception issue: sonic-net/sonic-buildimage#11269

pfcwd implicit depends on InterfaceAliasConverter() to initialize DB config, however following PR change InterfaceAliasConverter() behavior to lazy initialize, then pfcwd failed when try connect to DB without initialize DB config:

#2183

#### How I did it
Load  DB config in pfcwd.

#### How to verify it
Pass all UT.

Co-authored-by: Hua Liu <[email protected]>
  • Loading branch information
gechiang and liuh-80 authored Sep 15, 2022
1 parent b739efc commit c6d080d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pfcwd/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
from tabulate import tabulate
from utilities_common import multi_asic as multi_asic_util
from utilities_common import constants
from utilities_common.general import load_db_config
from sonic_py_common import logger

SYSLOG_IDENTIFIER = "config"
Expand Down Expand Up @@ -62,7 +63,7 @@
@click.group()
def cli():
""" SONiC PFC Watchdog """

load_db_config()

def get_all_queues(db, namespace=None, display=constants.DISPLAY_ALL):
queue_names = db.get_all(db.COUNTERS_DB, 'COUNTERS_QUEUE_NAME_MAP')
Expand Down

0 comments on commit c6d080d

Please sign in to comment.