From 1e0a8541e7d74d89ad30416bcb5257279c7885e0 Mon Sep 17 00:00:00 2001 From: Ovidiu Mircescu Date: Fri, 25 Mar 2022 14:16:11 +0100 Subject: [PATCH] Fix remote containers for mode SSL & CEA & SAT. --- bin/appliskel/runRemoteSSL.sh | 5 +--- src/Container/SALOME_ContainerManager.cxx | 31 +++++++++++++++-------- 2 files changed, 22 insertions(+), 14 deletions(-) diff --git a/bin/appliskel/runRemoteSSL.sh b/bin/appliskel/runRemoteSSL.sh index f7c7557a8..3e9cbbf7f 100755 --- a/bin/appliskel/runRemoteSSL.sh +++ b/bin/appliskel/runRemoteSSL.sh @@ -53,9 +53,6 @@ else . "${HOME}/${APPLI}/envd" "${HOME}/${APPLI}" fi -# --- set the OMNIORB_CONFIG file and environment relative to this run of SALOME -export CUSTOM_NS_IOR=$1 - #go to the requested working directory if any if test "x$2" == "xWORKINGDIR"; then if test "x$3" = "x\$TEMPDIR"; then @@ -86,4 +83,4 @@ fi # --- execute the command in the SALOME environment -"${KERNEL_ROOT_DIR}/bin/salome/envSalome.py" /bin/sh -c "$* $CUSTOM_NS_IOR" +"${KERNEL_ROOT_DIR}/bin/salome/envSalome.py" /bin/sh -c "$* " diff --git a/src/Container/SALOME_ContainerManager.cxx b/src/Container/SALOME_ContainerManager.cxx index 6039bd28a..a597be220 100644 --- a/src/Container/SALOME_ContainerManager.cxx +++ b/src/Container/SALOME_ContainerManager.cxx @@ -789,8 +789,14 @@ SALOME_ContainerManager::BuildCommandToLaunchRemoteContainer(const std::string& else command += " " +container_exe+ " "; - command += _NS->ContainerName(params); - if(!this->_isSSL) + command += _NS->ContainerName(params) + " "; + if(this->_isSSL) + { + Engines::EmbeddedNamingService_var ns = GetEmbeddedNamingService(); + CORBA::String_var iorNS = _orb->object_to_string(ns); + command += std::string(iorNS); + } + else //if(!this->_isSSL) { command += " -"; AddOmninamesParams(command); @@ -1290,9 +1296,11 @@ std::string SALOME_ContainerManager::getCommandToRunRemoteProcess(AccessProtocol else remoteapplipath = applipath; - ASSERT(GetenvThreadSafe("NSHOST")); - ASSERT(GetenvThreadSafe("NSPORT")); - + if(!this->_isSSL) + { + ASSERT(GetenvThreadSafe("NSHOST")); + ASSERT(GetenvThreadSafe("NSPORT")); + } // $APPLI points either to an application directory, or to a salome launcher file // we prepare the remote command according to the case struct stat statbuf; @@ -1301,11 +1309,14 @@ std::string SALOME_ContainerManager::getCommandToRunRemoteProcess(AccessProtocol // if $APPLI is a regular file, we asume it's a salome Launcher // generate a command with a salome launcher command << remoteapplipath - << " remote" - << " -m " - << GetenvThreadSafeAsString("NSHOST") // hostname of CORBA name server - << " -p " - << GetenvThreadSafeAsString("NSPORT"); // port of CORBA name server + << " remote" ; + if(!this->_isSSL) + { + command << " -m " + << GetenvThreadSafeAsString("NSHOST") // hostname of CORBA name server + << " -p " + << GetenvThreadSafeAsString("NSPORT"); // port of CORBA name server + } if (workdir != "") command << "-d " << workdir; command << " -- " ; -- 2.39.2