updated emanemanager to add server prefixes to control nets, when control nets are not configured

This commit is contained in:
Blake Harnden 2019-06-19 13:52:51 -07:00
parent 6270fcbc75
commit 407cfa5fe1

View file

@ -497,6 +497,10 @@ class EmaneManager(ModelManager):
if len(prefixes) < len(servers):
logging.info("setting up default controlnet prefixes for distributed (%d configured)", len(prefixes))
prefix = ctrlnet.DEFAULT_PREFIX_LIST[0]
prefixes = prefix.split()
servers.remove("localhost")
servers.insert(0, "localhost")
prefix = " ".join("%s:%s" % (s, prefixes[i]) for i, s in enumerate(servers))
# this generates a config message having controlnet prefix assignments
logging.info("setting up controlnet prefixes for distributed: %s", prefix)