Skip to content

Commit

Permalink
[vrf] fix check state_db error when vrf moving (sonic-net#1119)
Browse files Browse the repository at this point in the history
  • Loading branch information
tylerlinp authored Sep 17, 2020
1 parent 58d09dc commit e634d88
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion config/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -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})
Expand Down

0 comments on commit e634d88

Please sign in to comment.