Skip to content

Commit 31c6108

Browse files
committed
Sync has_per_asic_scope attribute to config_db in all namespaces for multi-asic
1 parent 185547f commit 31c6108

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

scripts/hostcfgd

+6-2
Original file line numberDiff line numberDiff line change
@@ -348,6 +348,10 @@ class FeatureHandler(object):
348348
self.set_feature_state(feature, self.FEATURE_STATE_FAILED)
349349
return
350350
self._config_db.mod_entry('FEATURE', feature_config.name, {'has_per_asic_scope': str(feature_config.has_per_asic_scope)})
351+
352+
# sync has_per_asic_scope to CONFIG_DB in namespaces in multi-asic platform
353+
for ns, db in self.ns_cfg_db.items():
354+
db.mod_entry('FEATURE', feature_config.name, {'has_per_asic_scope': str(feature_config.has_per_asic_scope)})
351355

352356
def update_systemd_config(self, feature_config):
353357
"""Updates `Restart=` field in feature's systemd configuration file
@@ -474,14 +478,14 @@ class FeatureHandler(object):
474478
def resync_feature_state(self, feature):
475479
self._config_db.mod_entry('FEATURE', feature.name, {'state': feature.state})
476480

477-
# resync the feature state in CONFIG_DB in namespaces in multi-asic platform
481+
# resync the feature state to CONFIG_DB in namespaces in multi-asic platform
478482
for ns, db in self.ns_cfg_db.items():
479483
db.mod_entry('FEATURE', feature.name, {'state': feature.state})
480484

481485
def set_feature_state(self, feature, state):
482486
self._feature_state_table.set(feature.name, [('state', state)])
483487

484-
# Update the feature state in STATE_DB in namespaces in multi-asic platform
488+
# Update the feature state to STATE_DB in namespaces in multi-asic platform
485489
for ns, tbl in self.ns_feature_state_tbl.items():
486490
tbl.set(feature.name, [('state', state)])
487491

0 commit comments

Comments
 (0)