From d765a0f9c7794d964ed8aa45feb28aa0424a2481 Mon Sep 17 00:00:00 2001 From: nkj Date: Sun, 27 Feb 2005 16:45:38 +0000 Subject: [PATCH] fix for bug #5585 - and syntax error fix (missing newline) --- lustre/utils/lconf | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/lustre/utils/lconf b/lustre/utils/lconf index 2b95887..e1b9ad9 100755 --- a/lustre/utils/lconf +++ b/lustre/utils/lconf @@ -2471,7 +2471,7 @@ def doHost(lustreDB, hosts): if node_db: break if not node_db: - panic('No host entry found.') + panic('Node entry '+hosts[0]+' not found in config file.') local_node_name = node_db.get_val('name', 0) is_router = node_db.get_val_int('router', 0) @@ -2480,7 +2480,16 @@ def doHost(lustreDB, hosts): timeout = node_db.get_val_int('timeout', 0) ptldebug = node_db.get_val('ptldebug', '') subsystem = node_db.get_val('subsystem', '') + node_nid_name = node_db.get_val('nid', '') + node_nid_ip = socket.gethostbyname(node_nid_name) + if node_nid_ip == '127.0.0.1': + if node_nid_name != 'localhost': + print "Fatal error:\n" + print "This node is configured with a network ID (nid) of",node_nid_name,", but that hostname resolves to the loopback address (127.0.0.1). Without the real IP address, Lustre can't tell its peers how to contact it. If you are trying to run all services on a single node, for testing, then specify a nid of \"localhost\".\n" + print "This is probably caused by the wrong entry in /etc/hosts. To fix this, edit /etc/hosts and either remove the entry for",node_nid_name,", or change it to the correct IP address.\n" + panic('Aborting due to invalid node IP.') + find_local_clusters(node_db) if not is_router: find_local_routes(lustreDB) @@ -2729,7 +2738,8 @@ def verify_devpath(devpath, name): else: for line in out: - res = re.compile("^Filesystem.features:.*journal_dev.").search(line) if res: + res = re.compile("^Filesystem.features:.*journal_dev.").search(line) + if res: panic("The back-end storage device \""+devpath+"\", specified for Lustre service \""+name+"\", contains an ext3 external journal, instead of a proper ext3 file system.\n\nIt's possible that you meant to specify a different device, or that you meant to reformat this device before using it. If you are intending to use a file system with an external journal, then the Lustre configuration file should point to the device that contains the main ext3 file system, not the journal device.\n"); -- 1.8.3.1