From: Faiyaz Ahmed Date: Wed, 9 Apr 2008 18:08:45 +0000 (+0000) Subject: Use API host when Planetflow host isn't defined. X-Git-Tag: NodeManager-1.8-0~57 X-Git-Url: http://git.onelab.eu/?a=commitdiff_plain;h=b9474716bde66e38589cc4ddf4466aff828fe860;p=nodemanager.git Use API host when Planetflow host isn't defined. --- diff --git a/codemux.py b/codemux.py index 1d907f7..7b11350 100644 --- a/codemux.py +++ b/codemux.py @@ -51,8 +51,6 @@ def GetSlivers(data): except: logger.log("codemux: sliver %s not running yet. Deferring."\ % sliver['name']) - - logger.log_exc(name = "codemux") pass # Remove slices from conf that no longer have the attribute @@ -68,7 +66,11 @@ def writeConf(slivers, conf = CODEMUXCONF): '''Write conf with default entry up top. Elements in [] should have lower order domain names first. Restart service.''' f = open(conf, "w") # This needs to be the first entry... - f.write("* root 1080 %s\n" % Config().PLC_PLANETFLOW_HOST) + try: + f.write("* root 1080 %s\n" % Config().PLC_PLANETFLOW_HOST) + except AttributeError: + logger.log("codemux: Can't find PLC_CONFIG_HOST in config. Using PLC_API_HOST") + f.write("* root 1080 %s\n" % Config().PLC_API_HOST) # Sort items for like domains for mapping in slivers: for (host, params) in mapping.iteritems():