diff --git a/config/main.py b/config/main.py index c22268c6cd43..32501bdd4dcb 100755 --- a/config/main.py +++ b/config/main.py @@ -2598,7 +2598,7 @@ def bind(ctx, interface_name, vrf_name): state_db = SonicV2Connector(use_unix_socket_path=True, namespace=ctx.obj['namespace']) state_db.connect(state_db.STATE_DB, False) _hash = '{}{}'.format('INTERFACE_TABLE|', interface_name) - while state_db.get(state_db.STATE_DB, _hash, "state") == "ok": + while state_db.get_all(state_db.STATE_DB, _hash) != None: time.sleep(0.01) state_db.close(state_db.STATE_DB) config_db.set_entry(table_name, interface_name, {"vrf_name": vrf_name})