From c51ca521b4de170a7db99b0142666382a42d2bbc Mon Sep 17 00:00:00 2001 From: rread Date: Mon, 2 Sep 2002 17:59:35 +0000 Subject: [PATCH] - fix route config and clean up errors --- lustre/utils/lconf | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/lustre/utils/lconf b/lustre/utils/lconf index 200ba19..0df58f7 100755 --- a/lustre/utils/lconf +++ b/lustre/utils/lconf @@ -288,8 +288,8 @@ class LCTLInterface: def del_route(self, net, gw, lo, hi): cmds = """ network %s - del_route %s %s - quit """ % (net, lo, hi) + del_route %s + quit """ % (net, lo) self.run(cmds) # add a route to a host @@ -582,7 +582,7 @@ class Module: """ default cleanup, used for most modules """ self.info() srv = self.get_server() - if srv: + if srv and local_net(srv): try: lctl.disconnect(srv.net_type, srv.nid, srv.port, srv.uuid) except CommandError, e: @@ -677,7 +677,7 @@ class Network(Module): ret = self.dom_node.getElementsByTagName('route_tbl') for a in ret: for r in a.getElementsByTagName('route'): - net_type = get_attr(r, 'net_type') + net_type = get_attr(r, 'type') gw = get_attr(r, 'gw') lo = get_attr(r, 'lo') hi = get_attr(r,'hi', '') @@ -705,8 +705,17 @@ class Network(Module): if not srv: panic("no server for nid", lo) else: - lctl.disconnect(srv.net_type, srv.nid, srv.port, srv.uuid) - lctl.del_route(self.net_type, self.nid, lo, hi) + try: + lctl.disconnect(srv.net_type, srv.nid, srv.port, srv.uuid) + except CommandError, e: + print "disconnect failed: ", self.name + e.dump() + try: + lctl.del_route(self.net_type, self.nid, lo, hi) + except CommandError, e: + print "del_route failed: ", self.name + e.dump() + try: lctl.cleanup("RPCDEV", "") except CommandError, e: -- 1.8.3.1