Skip to content

Commit f1017ab

Browse files
pavel-shirshovlguohan
authored andcommitted
[Fast-Reboot]: fast-reboot-dump.py script connects to the DB by TCP (sonic-net#225)
* Check user id for fast-reboot-dump.py script * exit with exit code 1 * Use TCP to connect to the DB. Remove check for super user as redundant * Finnaly Remove check for super user as redundant
1 parent 0c5b8b7 commit f1017ab

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

scripts/fast-reboot-dump.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
ARP_PAD = binascii.unhexlify('00' * 18)
1616

1717
def generate_arp_entries(filename, all_available_macs):
18-
db = swsssdk.SonicV2Connector()
18+
db = swsssdk.SonicV2Connector(host='127.0.0.1')
1919
db.connect(db.APPL_DB, False) # Make one attempt only
2020

2121
arp_output = []
@@ -148,7 +148,7 @@ def get_fdb(db, vlan_name, vlan_id, bridge_id_2_iface):
148148
def generate_fdb_entries(filename):
149149
fdb_entries = []
150150

151-
db = swsssdk.SonicV2Connector()
151+
db = swsssdk.SonicV2Connector(host='127.0.0.1')
152152
db.connect(db.ASIC_DB, False) # Make one attempt only
153153

154154
bridge_id_2_iface = get_map_bridge_port_id_2_iface_name(db)
@@ -241,7 +241,7 @@ def get_default_entries(db, route):
241241
return obj
242242

243243
def generate_default_route_entries(filename):
244-
db = swsssdk.SonicV2Connector()
244+
db = swsssdk.SonicV2Connector(host='127.0.0.1')
245245
db.connect(db.APPL_DB, False) # Make one attempt only
246246

247247
default_routes_output = []

0 commit comments

Comments
 (0)