Merge branch 'omaha_14.3.1' into omaha_14.4.1

Conflicts:
	edexOsgi/com.raytheon.edex.plugin.gfe/src/com/raytheon/edex/plugin/gfe/config/GFESiteActivation.java
	edexOsgi/com.raytheon.edex.plugin.gfe/utility/edex_static/base/config/gfe/serverConfig.py

Former-commit-id: ab770c03d7 [formerly 42123642eb] [formerly 27b08f8bcd] [formerly 27b08f8bcd [formerly 0cb8d202f5]] [formerly 4df5ae5a60 [formerly 27b08f8bcd [formerly 0cb8d202f5] [formerly 4df5ae5a60 [formerly f352b47e1d930bfe2bc46f956c781375881e41f9]]]]
Former-commit-id: 4df5ae5a60
Former-commit-id: 54f4e95810b35bf4a0f392b39180bc241f36ef5a [formerly 64e15ba68857c2ece6d688b1556814e69b181e79] [formerly bf236d5aa1 [formerly 51d4907b76]]
Former-commit-id: bf236d5aa1
Former-commit-id: 0e390da822
This commit is contained in:
Steve Harris 2014-07-14 11:54:53 -05:00
commit f555652cd9
4 changed files with 55 additions and 18 deletions

View file

@ -19,6 +19,8 @@
**/
package com.raytheon.edex.plugin.gfe.config;
import java.io.PrintWriter;
import java.io.StringWriter;
import java.net.InetAddress;
import java.net.UnknownHostException;
import java.util.HashMap;
@ -73,8 +75,10 @@ import com.raytheon.uf.edex.site.notify.SendSiteActivationNotifications;
* May 02, 2013 #1969 randerso Moved updateDbs method into IFPGridDatabase
* Jun 13, 2013 #2044 randerso Refactored to use IFPServer
* Oct 16, 2013 #2475 dgilling Better error handling for IRT activation.
* Mar 21, 2014 2726 rjpeter Updated wait for running loop.
* Mar 21, 2014 #2726 rjpeter Updated wait for running loop.
* May 15, 2014 #3157 dgilling Mark getActiveSites() as deprecated.
* Jul 09, 2014 #3146 randerso Eliminated redundant evaluation of serverConfig
* Sent activation failure message to alertViz
* </pre>
*
* @author njensen
@ -232,13 +236,6 @@ public class GFESiteActivation implements ISiteActivationListener {
}
try {
IFPServerConfig config = IFPServerConfigManager
.initializeConfig(siteID);
if (config == null) {
throw new GfeConfigurationException(
"Error validating configuration for " + siteID);
}
internalActivateSite(siteID);
} catch (GfeMissingConfigurationException e) {
sendActivationFailedNotification(siteID);
@ -248,7 +245,15 @@ public class GFESiteActivation implements ISiteActivationListener {
throw e;
} catch (Exception e) {
sendActivationFailedNotification(siteID);
statusHandler.error(siteID + " Error activating site " + siteID, e);
String message = "Error activating IFPServer for site " + siteID
+ ". GFE will be unavailable for this site!";
statusHandler.error(message, e);
StringWriter stackTrace = new StringWriter();
e.printStackTrace(new PrintWriter(stackTrace));
EDEXUtil.sendMessageAlertViz(Priority.ERROR,
"com.raytheon.edex.plugin.gfe", "GFE", "GFE", message,
stackTrace.toString(), null);
throw e;
}
sendActivationCompleteNotification(siteID);

View file

@ -25,8 +25,6 @@ import java.util.HashSet;
import java.util.Map;
import java.util.Set;
import jep.JepException;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
@ -56,6 +54,7 @@ import com.raytheon.uf.common.util.FileUtil;
* Dec 11, 2012 14360 ryu Throw specific exception for missing configuration.
* Feb 20, 2014 #2824 randerso Fixed import of localVTECPartners to use siteID
* Added common python path for LogStream
* Jul 09, 2014 #3146 randerso Improved exception handling
*
* </pre>
*
@ -178,7 +177,7 @@ public class IFPServerConfigManager {
SimpleServerConfig simpleConfig = (SimpleServerConfig) py.execute(
"getSimpleConfig", null);
siteConfig = new IFPServerConfig(simpleConfig);
} catch (JepException e) {
} catch (Throwable e) {
throw new GfeConfigurationException(
"Exception occurred while processing serverConfig for site "
+ siteID, e);

View file

@ -30,6 +30,7 @@
# ------------ ---------- ----------- --------------------------
# 08/09/2013 #1571 randerso Changed projections to use the Java
# ProjectionType enumeration
# 07/09/2014 #3146 randerso Added check for duplicate smartInit
#
########################################################################
import types
@ -438,7 +439,7 @@ def otherParse(serverhost, mhsid, port,
"not an int: " + `vtecRequestTime`
if type(port) != int:
raise TypeError, "GFESUITE_PORT not an int: " + `port`
initmodules = dictCheck(initmodules, list, str, "INITMODULES")
javainitmodules = dictCheck(initmodules, list, str, "INITMODULES")
accumElem = dictCheck(accumElem, list, str, "D2DAccumulativeElements")
initskips = dictCheck(initskips, list, int, "INITSKIPS")
d2ddbver = dictCheck(d2ddbver, int, None, "D2DDBVERSIONS")
@ -508,8 +509,39 @@ def otherParse(serverhost, mhsid, port,
elif transmitScript is None:
transmitScript = ""
# build model to init mapping
modelToInit = {}
for module in initmodules:
for model in initmodules[module]:
if modelToInit.has_key(model):
modelToInit[model].append(module)
else:
modelToInit[model] = [module]
# check for duplicate init modules
for model in modelToInit:
modules = modelToInit[model]
if len(modules) > 1:
message = "Multiple smartInit modules " + str(modules) + \
" are enabled for D2D model: " + model + ". " + str(modules[1:]) + \
" will be disabled. Please edit your localConfig.py file and disable all but one."
# log error message to edex log
import LogStream
LogStream.logProblem(message);
# log error to alertViz
from ufpy import NotificationMessage
nfm = NotificationMessage.NotificationMessage(message=message,
category="GFE", priority=1, source="GFE")
nfm.send()
# remove duplicate
for module in modules[1:]:
javainitmodules.remove(module)
return serverhost, mhsid, \
port, initmodules, accumElem, \
port, javainitmodules, accumElem, \
initskips, d2ddbver, logfilepurge, prddir, home,\
extraWEPrecision, vtecRequestTime, \
autoConfigureNotifyTextProd, \

View file

@ -39,11 +39,12 @@
# 02/20/2014 #2824 randerso Added log message when local override files are not found
# 03/11/2014 #2897 dgilling Add new MHWM databases to default configuration.
# 03/20/2014 #2418 dgilling Remove unneeded D2D source PHISH.
# 04/17/14 2934 dgilling Remove alias for TPCSurgeProb D2D database.
# 05/09/2014 3148 randerso Add tpHPCndfd to D2DAccumulativeElements for HPCERP
# 04/17/2014 #2934 dgilling Remove alias for TPCSurgeProb D2D database.
# 05/09/2014 #3148 randerso Add tpHPCndfd to D2DAccumulativeElements for HPCERP
# 06/20/2014 #3230 rferrel Added URMA25.
#
# 05/29/2014 3224 randerso Added "SPC":8 to D2DDBVERSIONS
# 05/29/2014 #3224 randerso Added "SPC":8 to D2DDBVERSIONS
# 07/09/2014 #3146 randerso Removed unused import
########################################################################
#----------------------------------------------------------------------------
@ -1988,7 +1989,7 @@ DATABASES.append((ISC, ISCPARMS))
#----------------------------------------------------------------------------
# Server settings DO NOT CHANGE THESE DEFINITIONS
#----------------------------------------------------------------------------
from com.raytheon.edex.plugin.gfe.config import IFPServerConfig, SimpleServerConfig
from com.raytheon.edex.plugin.gfe.config import SimpleServerConfig
IFPConfigServer = SimpleServerConfig()
#IFPConfigServer.allowedNodes = []
IFPConfigServer.allowTopoBelowZero = 1