(with a random 6-char id, not the hostname)
Signed-off-by: Sage Weil <sage@redhat.com>
# type: () -> str
return socket.getfqdn() or socket.gethostname()
+def generate_service_id():
+ # type: () -> str
+ return ''.join(random.choice(string.ascii_lowercase)
+ for _ in range(6))
+
def generate_password():
# type: () -> str
return ''.join(random.choice(string.ascii_lowercase + string.digits)
fsid = args.fsid or make_fsid()
hostname = get_hostname()
mon_id = args.mon_id or hostname
- mgr_id = args.mgr_id or hostname
+ mgr_id = args.mgr_id or generate_service_id()
logging.info('Cluster fsid: %s' % fsid)
# config