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
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:
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.")
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.')