Salome HOME
remove notification server
authorCédric Aguerre <cedric.aguerre@edf.fr>
Tue, 15 Apr 2014 09:34:31 +0000 (11:34 +0200)
committerCédric Aguerre <cedric.aguerre@edf.fr>
Tue, 15 Apr 2014 09:34:31 +0000 (11:34 +0200)
bin/appliskel/runSalomeScript
bin/killSalomeWithPort.py
bin/parseConfigFile.py
bin/runSalome.py
bin/server.py
src/LifeCycleCORBA/SALOME_LifeCycleCORBA.cxx
src/LifeCycleCORBA/Test/TestLifeCycleCORBA.py
src/LifeCycleCORBA_SWIG/Test/TestLifeCycleCORBA_SWIG.py
src/UnitTests/UnitTests.py

index be512f8ab18dd9e88ac8bdc0661d14899ab936c5..b50ed65179f6fd79c805c8535f2d5e635c5a0f01 100755 (executable)
@@ -137,7 +137,8 @@ def copy_files(user,machine,script,infiles,outfiles,directory):
   """modify script, copy files to remote computer and return lists of copied files"""
 
   namescript=os.path.basename(script)
-  logname=os.getenv("LOGNAME",user)
+  import getpass
+  logname = getpass.getuser()
   tmp_script="/tmp/%s_%s_%s" % (logname,os.getpid(),namescript)
   fscript=open(script)
   script_text=fscript.read()
index 040a27f4e460bf4de11a9dcbb1614020d468f6dc..d2f5c84431cdce1eca2845f4d1e224fcdef9a922 100755 (executable)
@@ -193,7 +193,7 @@ def shutdownMyPort(port, cleanup=True):
         lcc.shutdownServers()
         # give some time to shutdown to complete
         time.sleep(1)
-        # shutdown omniNames and notifd
+        # shutdown omniNames
         if cleanup:
             lcc.killOmniNames()
             time.sleep(1)
@@ -323,21 +323,14 @@ def killMyPort(port):
     appliCleanOmniOrbConfig(port)
     pass
 
-def killNotifdAndClean(port):
+def cleanApplication(port):
     """
-    Kill notifd daemon and clean application running on the specified port.
+    Clean application running on the specified port.
     Parameters:
     - port - port number
     """
     try:
         filedict=getPiDict(port)
-        with open(filedict, 'r') as f:
-            pids=pickle.load(f)
-            for d in pids:
-                for pid,process in d.items():
-                    if 'notifd' in process:
-                        cmd='kill -9 %d'% pid
-                        os.system(cmd)
         os.remove(filedict)
     except:
       #import traceback
index 7590fbaf3e1c780b15d86b9bd8125a71f8cbe615..c6f0825956dc8e8c6f2aeedbf368b9b8fed062c2 100644 (file)
@@ -285,8 +285,6 @@ class EnvFileConverter(object):
           line = ADD_TO_PREFIX + k + ": " + value
       # Update list of variable names
       # :TODO: define excludeBlock variable (similar to exclude) and provide method to extend it
-      if line.startswith("LOGNAME="):
-        return "\n"
       if "cleandup()" in line:
         print "WARNING: parseConfigFile.py: skip cleandup and look for '# PRODUCT environment'"
         while True:
index 63652278c9a33a36031b3595c40e01dcdacc5867..fa94cbe3ed21599f9e4c390edb64fc0e1e049304 100755 (executable)
@@ -393,21 +393,6 @@ class LauncherServer(Server):
             self.CMD=self.SCMD1 + ['"' + string.join(cata_path,'"::"') + '"'] + self.SCMD2
         else:
             self.CMD=self.SCMD1 + self.SCMD2
-
-class NotifyServer(Server):
-    def __init__(self,args,modules_root_dir):
-        self.args=args
-        self.initArgs()
-        self.modules_root_dir=modules_root_dir
-        myLogName = os.environ["LOGNAME"]
-        self.CMD=['notifd','-c',
-                  self.modules_root_dir["KERNEL"] +'/share/salome/resources/kernel/channel.cfg',
-                  '-DFactoryIORFileName=/tmp/'+myLogName+'_rdifact.ior',
-                  '-DChannelIORFileName=/tmp/'+myLogName+'_rdichan.ior',
-                  '-DReportLogFile=/tmp/'+myLogName+'_notifd.report',
-                  '-DDebugLogFile=/tmp/'+myLogName+'_notifd.debug',
-                  ]
-
 #
 # -----------------------------------------------------------------------------
 
@@ -500,15 +485,6 @@ def startSalome(args, modules_list, modules_root_dir):
         myServer.run()
         clt.waitLogger("Logger")
 
-    # Notify Server launch
-    #
-
-    if sys.platform != "win32":
-      if verbose(): print "Notify Server to launch"
-
-      myServer=NotifyServer(args,modules_root_dir)
-      myServer.run()
-
     # set siman python path before the session server launching to import scripts inside python console
     if simanStudyName(args):
         # MPV: use os.environ here because session server is launched in separated process and sys.path is missed in this case
index 8caa1acbfae345a68fc475363e71f42d807a1736..c01e52789998ca5c75a4e718c5621f85c85526f2 100755 (executable)
@@ -33,7 +33,7 @@ process_id = {}
 
 class Server:
     """Generic class for CORBA server launch"""
-    
+
     server_launch_mode = "daemon"
 
     def initArgs(self):
@@ -133,7 +133,5 @@ class Server:
         try:
           os.execvp(args[0], args)
         except OSError, e:
-          if args[0] != "notifd":
-            print >>sys.stderr, "(%s) launch failed: %d (%s)" % (args[0],e.errno, e.strerror)
-            pass
+          print >>sys.stderr, "(%s) launch failed: %d (%s)" % (args[0],e.errno, e.strerror)
           os._exit(127)
index 1e4c010b707d20adf9151685ae51aba9e14a9f16..1bfdd89cc1aa2efa1a6c40ef195ae779d8c5387a 100644 (file)
@@ -421,7 +421,7 @@ Engines::ResourcesManager_ptr SALOME_LifeCycleCORBA::getResourcesManager()
 }
 
 //=============================================================================
-/*! \brief shutdown all the SALOME servers except SALOME_Session_Server, omniNames and notifd
+/*! \brief shutdown all the SALOME servers except SALOME_Session_Server and omniNames
  */
 //=============================================================================
 
@@ -587,7 +587,7 @@ void SALOME_LifeCycleCORBA::shutdownServers()
 }
 
 //=============================================================================
-/*! \brief shutdown  omniNames and notifd
+/*! \brief shutdown  omniNames
  */
 //=============================================================================
 
@@ -611,8 +611,6 @@ void SALOME_LifeCycleCORBA::killOmniNames()
 #endif
   }
 
-  // NPAL 18309  (Kill Notifd)
-
   std::string python_exe;
 
   python_exe = std::string("python");
@@ -624,8 +622,8 @@ void SALOME_LifeCycleCORBA::killOmniNames()
 
   if ( !portNumber.empty() )
   {
-    std::string cmd = ("from killSalomeWithPort import killNotifdAndClean; ");
-    cmd += std::string("killNotifdAndClean(") + portNumber + "); ";
+    std::string cmd = ("from killSalomeWithPort import cleanApplication; ");
+    cmd += std::string("cleanApplication(") + portNumber + "); ";
     cmd  = python_exe + std::string(" -c \"") + cmd +"\" > /dev/null 2> /dev/null";
     MESSAGE(cmd);
     system( cmd.c_str() );
index 45ea3ec340e4e3da06d219eb9a2c8899ec45c712..0dbc8625fcf601d46d498bfc4e4245802f7fce98 100644 (file)
@@ -50,11 +50,6 @@ myServer=runSalome.LoggerServer(args)
 myServer.run()
 clt.waitLogger("Logger")
 
-# launch notify server
-
-myServer=runSalome.NotifyServer(args,modules_root_dir)
-myServer.run()
-
 # launch registry server
 
 myServer=runSalome.RegistryServer(args)
index d4e5560ce55bb529dc28ffcd43b23e7e31c51252..089cfeae5b6130e406a5df4f168e229f6394ffb5 100644 (file)
@@ -55,11 +55,6 @@ myServer=runSalome.LoggerServer(args)
 myServer.run()
 clt.waitLogger("Logger")
 
-# launch notify server
-
-myServer=runSalome.NotifyServer(args,modules_root_dir)
-myServer.run()
-
 # launch registry server
 
 myServer=runSalome.RegistryServer(args)
index e6663f5ed0bc978f0e1e15ff44061edb6e81025a..fa6f91e2ae07b6e26836842bcf0b975294d4a16b 100644 (file)
@@ -49,11 +49,6 @@ myServer=runSalome.LoggerServer(args)
 myServer.run()
 clt.waitLogger("Logger")
 
-# launch notify server
-
-myServer=runSalome.NotifyServer(args,modules_root_dir)
-myServer.run()
-
 # launch registry server
 
 myServer=runSalome.RegistryServer(args)
@@ -85,6 +80,6 @@ import Engines
 launcher = clt.waitNS("/SalomeLauncher",Engines.SalomeLauncher)
 launcher.Shutdown()
 
-# kill Test process 
+# kill Test process
 
 TestKiller.killProcess(runSalome.process_id)