1
0
mirror of https://github.com/GNS3/gns3-server synced 2024-11-13 20:08:55 +00:00

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

This commit is contained in:
grossmj 2017-10-24 15:07:32 +07:00
parent df468bf2af
commit 8fcfed53ed

View File

@ -380,6 +380,8 @@ class IOUVM(BaseNode):
if "license" not in config: if "license" not in config:
raise IOUError("License section not found in iourc file {}".format(self.iourc_path)) raise IOUError("License section not found in iourc file {}".format(self.iourc_path))
hostname = socket.gethostname() 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"]: if hostname not in config["license"]:
raise IOUError("Hostname \"{}\" not found in iourc file {}".format(hostname, self.iourc_path)) raise IOUError("Hostname \"{}\" not found in iourc file {}".format(hostname, self.iourc_path))
user_ioukey = config["license"][hostname] user_ioukey = config["license"][hostname]