host = socket.gethostname()
self.name = 'MDC_%s' % (self.mds.name)
- self.uuid = '%s_%4.4x_UUID' % (self.name , int(random.random() * 100000 ))
+ self.uuid = '%s_%05x_UUID' % (self.name , int(random.random() * 100000))
self.lookup_server(self.mds.uuid)
self.add_module('lustre/mdc', 'mdc')
global TCP_ACCEPTOR, lctl, MAXTCPBUF
host = socket.gethostname()
+ # the PRNG is normally seeded with time(), which is not so good for starting
+ # time-synchronized clusters
+ input = open('/dev/urandom', 'r')
+ if not input:
+ print 'Unable to open /dev/urandom!'
+ sys.exit(1)
+ seed = input.read(32)
+ input.close()
+ random.seed(seed)
+
sanitise_path()
args = parse_cmdline(sys.argv[1:])