Skip to content

Commit 0f0610f

Browse files
committed
Fix an issue of some /etc/hosts entries not removed in 8r-1c-out-band-isis topology
1 parent 012cd8a commit 0f0610f

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

nets/8r-1c-out-band-isis/isis8d.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -249,6 +249,11 @@ def remove_nodes_from_etc_hosts(net):
249249
for host in net.hosts:
250250
# Remove all the nodes from /etc/hosts
251251
etc_hosts.remove_all_matching(name=str(host))
252+
# Remove entries related to the management network
253+
# These entries are in the form *.m (e.g. r1.m, controller.m)
254+
# therefore they are not removed during the previous loop
255+
for host in net.hosts:
256+
etc_hosts.remove_all_matching(name='%s.m' % host)
252257
# Write changes to /etc/hosts
253258
etc_hosts.write()
254259

0 commit comments

Comments
 (0)