Skip to content

Commit 89fa106

Browse files
Use unix socket path in ConfigDBConnector for some components
Signed-off-by: Stepan Blyschak <[email protected]>
1 parent 486e9b0 commit 89fa106

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/sonic-host-services/scripts/hostcfgd

+1-1
Original file line numberDiff line numberDiff line change
@@ -954,7 +954,7 @@ class HostConfigDaemon:
954954
def __init__(self):
955955
# Just a sanity check to verify if the CONFIG_DB has been initialized
956956
# before moving forward
957-
self.config_db = ConfigDBConnector()
957+
self.config_db = ConfigDBConnector(use_unix_socket_path=True)
958958
self.config_db.connect(wait_for_init=True, retry_on=True)
959959
self.dbconn = DBConnector(CFG_DB, 0)
960960
self.selector = Select()

src/sonic-py-common/sonic_py_common/multi_asic.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ def connect_config_db_for_ns(namespace=DEFAULT_NAMESPACE):
4343
Returns:
4444
handle to the config_db for a namespace
4545
"""
46-
config_db = swsscommon.ConfigDBConnector(namespace=namespace)
46+
config_db = swsscommon.ConfigDBConnector(use_unix_socket_path=True, namespace=namespace)
4747
config_db.connect()
4848
return config_db
4949

@@ -65,7 +65,7 @@ def connect_to_all_dbs_for_ns(namespace=DEFAULT_NAMESPACE):
6565
Returns:
6666
handle to all the dbs for a namespaces
6767
"""
68-
db = swsscommon.SonicV2Connector(namespace=namespace)
68+
db = swsscommon.SonicV2Connector(use_unix_socket_path=True, namespace=namespace)
6969
db_list = list(db.get_db_list())
7070
if not is_supervisor():
7171
try:

0 commit comments

Comments
 (0)