From: nathan Date: Tue, 25 Oct 2005 19:37:04 +0000 (+0000) Subject: Branch b1_4 X-Git-Tag: v1_7_100~1^103~4^2~260^2~9 X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=5448234022e80c3a9eb81825314b5e0b34f2a9cc;p=fs%2Flustre-release.git Branch b1_4 b=9477 r=adilger - robustify mtime check - forgot to add back in part of --service= checks --- diff --git a/lustre/utils/lconf b/lustre/utils/lconf index 3455e81..58a1926 100755 --- a/lustre/utils/lconf +++ b/lustre/utils/lconf @@ -1410,6 +1410,8 @@ class OSD(Module): self.active = 1 else: self.active = 0 + if self.active and config.group and config.group != ost.get_val('group', ost.get_val('name')): + self.active = 0 self.target_dev_uuid = self.uuid self.uuid = target_uuid @@ -2056,8 +2058,9 @@ def doCheckMtime(lustreDB, hosts): if config.verbose: print "Checking XML modification time" devpath = mdsdb.get_val('devpath','') - xmtime = string.atof(lustreDB.get_mtime()) + xmtime = int(lustreDB.get_mtime()) runcmd("mkdir /tmp/lustre-XXXX/") + # mounting ro causes confusing syslog errors if is_block(devpath): ret, out = runcmd("mount %s /tmp/lustre-XXXX/" %devpath) else: @@ -2065,9 +2068,17 @@ def doCheckMtime(lustreDB, hosts): if ret: print out[0] else: - out = os.stat("/tmp/lustre-XXXX/LOGS") - kmtime = string.atof(out[8]) + try: + out = os.stat("/tmp/lustre-XXXX/LOGS") + except OSError: + runcmd("umount -f /tmp/lustre-XXXX/") + panic("Warning: Can't read Lustre logs." + " Please run --write_conf to update.") runcmd("umount -f /tmp/lustre-XXXX/") + try: + kmtime = int(out[8]) + except ValueError: + kmtime = xmtime if xmtime > kmtime : panic("Warning: the startup logs are older than the XML file." " Please run --write_conf to update.") @@ -2085,7 +2096,6 @@ def doHost(lustreDB, hosts): if config.service: tgt_select[config.service] = h config.group = config.service - print "Configure the", config.group, "service on current node." break if not node_db: panic('No host entry found.')