Add warning when using IOU with a hostname length above 15 characters.

pull/1204/head
grossmj 7 years ago
parent df468bf2af
commit 8fcfed53ed

@ -380,6 +380,8 @@ class IOUVM(BaseNode):
if "license" not in config:
raise IOUError("License section not found in iourc file {}".format(self.iourc_path))
hostname = socket.gethostname()
if len(hostname) > 15:
log.warning("Older IOU images may not boot because hostname '{}' length is above 15 characters".format(hostname))
if hostname not in config["license"]:
raise IOUError("Hostname \"{}\" not found in iourc file {}".format(hostname, self.iourc_path))
user_ioukey = config["license"][hostname]

Loading…
Cancel
Save