Commit 0c3bfefc authored by hrchilds's avatar hrchilds
Browse files

Update from October 9, 2003

git-svn-id: http://visit.ilight.com/svn/visit/trunk/src@95 18c085ea-50e0-402c-830e-de6fd14e8384
parent c2febb1b
...@@ -264,6 +264,11 @@ $0 = shift @ARGV; ...@@ -264,6 +264,11 @@ $0 = shift @ARGV;
# Brad Whitlock, Fri Oct 3 12:59:49 PDT 2003 # Brad Whitlock, Fri Oct 3 12:59:49 PDT 2003
# I made the -s argument become -scriptfile when -movie is specified. # I made the -s argument become -scriptfile when -movie is specified.
# #
# Jeremy Meredith, Thu Oct 9 13:12:51 PDT 2003
# Added ability to guess remote client host name from SSH_CLIENT,
# SSH2_CLIENT, or SSH_CONNECTION environment variables.
# Added ia64 linux machine type.
#
############################################################################### ###############################################################################
...@@ -344,6 +349,11 @@ USAGE: visit [arguments] ...@@ -344,6 +349,11 @@ USAGE: visit [arguments]
-foreground <color> Foreground color for GUI -foreground <color> Foreground color for GUI
-nowin Run without viewer windows -nowin Run without viewer windows
Advanced arguments:
-guesshost Try to guess the client host name from one of
the SSH_CLIENT, SSH2_CLIENT, or SSH_CONNECTION
environment variables.
Plugin arguments: Plugin arguments:
-publicpluginsonly Disable all plugins but the default ones -publicpluginsonly Disable all plugins but the default ones
...@@ -488,9 +498,36 @@ while (scalar(@ARGV) > 0) { ...@@ -488,9 +498,36 @@ while (scalar(@ARGV) > 0) {
push @visitargs, "-totalview", $debug_totalview; push @visitargs, "-totalview", $debug_totalview;
} }
} }
elsif ($arg eq "-guesshost" ) { $guesshost=1; }
else { push @visitargs, $arg; } else { push @visitargs, $arg; }
} }
if ($guesshost)
{
if ($ENV{SSH_CLIENT})
{
($remotehost) = split /\s/, $ENV{SSH_CLIENT};
$remotehost_set = 1;
}
elsif ($ENV{SSH2_CLIENT})
{
($remotehost) = split /\s/, $ENV{SSH2_CLIENT};
$remotehost_set = 1;
}
elsif ($ENV{SSH_CONNECTION})
{
($remotehost) = split /\s/, $ENV{SSH_CONNECTION};
$remotehost_set = 1;
}
else
{
print STDERR "Error: -guesshost was specified, but it was\n".
"unable to parse the SSH_CLIENT/CONNECTION\n".
"environment variable to get a valid host name\n";
exit 1;
}
}
# ---- # ----
# TEMPORARY HACK: # TEMPORARY HACK:
# for versions prior to 1.1.4, we need to pass the version info # for versions prior to 1.1.4, we need to pass the version info
...@@ -675,6 +712,9 @@ for ($os) { ...@@ -675,6 +712,9 @@ for ($os) {
if ($mach =~ /alpha/) { if ($mach =~ /alpha/) {
$archdir = "linux-alpha"; $archdir = "linux-alpha";
} }
elsif ($mach =~ /ia64/) {
$archdir = "linux-ia64";
}
else { else {
$archdir = "linux-intel"; $archdir = "linux-intel";
} }
......
...@@ -133,6 +133,9 @@ ...@@ -133,6 +133,9 @@
# Eric Brugger, Tue Sep 23 15:36:07 PDT 2003 # Eric Brugger, Tue Sep 23 15:36:07 PDT 2003
# Added a missing endif. # Added a missing endif.
# #
# Jeremy Meredith, Thu Oct 9 15:44:43 PDT 2003
# Added ia64 linux machine name.
#
#----------------------------------------------------------------------- #-----------------------------------------------------------------------
set DataFiles = "TRUE" set DataFiles = "TRUE"
...@@ -365,7 +368,7 @@ endif ...@@ -365,7 +368,7 @@ endif
mkdir distribution/visit/$Version mkdir distribution/visit/$Version
ln -s $Version distribution/visit/current ln -s $Version distribution/visit/current
set platforms="hp-hpux-pa sgi-irix6-mips2 sun4-sunos5-sparc ibm-aix-pwr dec-osf1-alpha linux-intel linux-alpha intel-tflops-ppro" set platforms="hp-hpux-pa sgi-irix6-mips2 sun4-sunos5-sparc ibm-aix-pwr dec-osf1-alpha linux-intel linux-ia64 linux-alpha intel-tflops-ppro"
foreach platform ($platforms) foreach platform ($platforms)
mkdir distribution/visit/$Version/$platform mkdir distribution/visit/$Version/$platform
mkdir distribution/visit/$Version/$platform/bin mkdir distribution/visit/$Version/$platform/bin
...@@ -451,6 +454,9 @@ switch ($os) ...@@ -451,6 +454,9 @@ switch ($os)
case i686: case i686:
set visitbindir = linux-intel set visitbindir = linux-intel
breaksw breaksw
case ia64:
set visitbindir = linux-ia64
breaksw
case alpha: case alpha:
set visitbindir = linux-alpha set visitbindir = linux-alpha
breaksw breaksw
......
...@@ -71,11 +71,21 @@ ExistingRemoteProcess::~ExistingRemoteProcess() ...@@ -71,11 +71,21 @@ ExistingRemoteProcess::~ExistingRemoteProcess()
// I made all of the command line options be passed to the callback // I made all of the command line options be passed to the callback
// function so launching processes can be done with more flexibility. // function so launching processes can be done with more flexibility.
// //
// Jeremy Meredith, Thu Oct 9 14:04:18 PDT 2003
// Added ability to manually specify a client host name or to have it
// parsed from the SSH_CLIENT (or related) environment variables. Added
// ability to specify an SSH port.
//
// **************************************************************************** // ****************************************************************************
bool bool
ExistingRemoteProcess::Open(const std::string &rHost, int numRead, int numWrite, ExistingRemoteProcess::Open(const std::string &rHost,
bool createAsThoughLocal) HostProfile::ClientHostDetermination chd,
const std::string &clientHostName,
bool manualSSHPort,
int sshPort,
int numRead, int numWrite,
bool createAsThoughLocal)
{ {
// Start making the connections and start listening. // Start making the connections and start listening.
if(!StartMakingConnection(rHost, numRead, numWrite)) if(!StartMakingConnection(rHost, numRead, numWrite))
...@@ -83,7 +93,9 @@ ExistingRemoteProcess::Open(const std::string &rHost, int numRead, int numWrite, ...@@ -83,7 +93,9 @@ ExistingRemoteProcess::Open(const std::string &rHost, int numRead, int numWrite,
// Add all of the relevant command line arguments to a vector of strings. // Add all of the relevant command line arguments to a vector of strings.
stringVector commandLine; stringVector commandLine;
CreateCommandLine(commandLine, rHost, numRead, numWrite, CreateCommandLine(commandLine, rHost,
chd, clientHostName, manualSSHPort, sshPort,
numRead, numWrite,
createAsThoughLocal); createAsThoughLocal);
// //
......
...@@ -22,6 +22,11 @@ ...@@ -22,6 +22,11 @@
// the argument list used to create the process to be the local form // the argument list used to create the process to be the local form
// even though the process may be launched on a remote machine. // even though the process may be launched on a remote machine.
// //
// Jeremy Meredith, Thu Oct 9 14:04:08 PDT 2003
// Added ability to manually specify a client host name or to have it
// parsed from the SSH_CLIENT (or related) environment variables. Added
// ability to specify an SSH port.
//
// **************************************************************************** // ****************************************************************************
class COMM_API ExistingRemoteProcess : public RemoteProcess class COMM_API ExistingRemoteProcess : public RemoteProcess
...@@ -29,7 +34,12 @@ class COMM_API ExistingRemoteProcess : public RemoteProcess ...@@ -29,7 +34,12 @@ class COMM_API ExistingRemoteProcess : public RemoteProcess
public: public:
ExistingRemoteProcess(const std::string &rProgram); ExistingRemoteProcess(const std::string &rProgram);
virtual ~ExistingRemoteProcess(); virtual ~ExistingRemoteProcess();
virtual bool Open(const std::string &rHost, int numRead, int numWrite, virtual bool Open(const std::string &rHost,
HostProfile::ClientHostDetermination chd,
const std::string &clientHostName,
bool manualSSHPort,
int sshPort,
int numRead, int numWrite,
bool createAsThoughLocal = false); bool createAsThoughLocal = false);
void SetConnectCallback(ConnectCallback *cb); void SetConnectCallback(ConnectCallback *cb);
void SetConnectCallbackData(void *data); void SetConnectCallbackData(void *data);
......
...@@ -30,6 +30,7 @@ ...@@ -30,6 +30,7 @@
#include <CouldNotConnectException.h> #include <CouldNotConnectException.h>
#include <DebugStream.h> #include <DebugStream.h>
#include <snprintf.h>
#include <map> #include <map>
#ifdef HAVE_THREADS #ifdef HAVE_THREADS
...@@ -938,11 +939,21 @@ RemoteProcess::MultiThreadedAcceptSocket() ...@@ -938,11 +939,21 @@ RemoteProcess::MultiThreadedAcceptSocket()
// I moved the code that creates the command line into CreateCommandLine // I moved the code that creates the command line into CreateCommandLine
// instead of having it inside of the methods to launch processes. // instead of having it inside of the methods to launch processes.
// //
// Jeremy Meredith, Thu Oct 9 14:02:22 PDT 2003
// Added ability to manually specify a client host name or to have it
// parsed from the SSH_CLIENT (or related) environment variables. Added
// ability to specify an SSH port.
//
// **************************************************************************** // ****************************************************************************
bool bool
RemoteProcess::Open(const std::string &rHost, int numRead, int numWrite, RemoteProcess::Open(const std::string &rHost,
bool createAsThoughLocal) HostProfile::ClientHostDetermination chd,
const std::string &clientHostName,
bool manualSSHPort,
int sshPort,
int numRead, int numWrite,
bool createAsThoughLocal)
{ {
// Start making the connections and start listening. // Start making the connections and start listening.
if(!StartMakingConnection(rHost, numRead, numWrite)) if(!StartMakingConnection(rHost, numRead, numWrite))
...@@ -950,7 +961,9 @@ RemoteProcess::Open(const std::string &rHost, int numRead, int numWrite, ...@@ -950,7 +961,9 @@ RemoteProcess::Open(const std::string &rHost, int numRead, int numWrite,
// Add all of the relevant command line arguments to a vector of strings. // Add all of the relevant command line arguments to a vector of strings.
stringVector commandLine; stringVector commandLine;
CreateCommandLine(commandLine, rHost, numRead, numWrite, CreateCommandLine(commandLine, rHost,
chd, clientHostName, manualSSHPort, sshPort,
numRead, numWrite,
createAsThoughLocal); createAsThoughLocal);
// //
...@@ -1409,11 +1422,20 @@ RemoteProcess::SecureShellArgs() const ...@@ -1409,11 +1422,20 @@ RemoteProcess::SecureShellArgs() const
// Brad Whitlock, Tue Jul 29 10:51:42 PDT 2003 // Brad Whitlock, Tue Jul 29 10:51:42 PDT 2003
// I removed -nread and -nwrite from the command line. // I removed -nread and -nwrite from the command line.
// //
// Jeremy Meredith, Thu Oct 9 14:02:47 PDT 2003
// Added ability to manually specify a client host name or to have it
// parsed from the SSH_CLIENT (or related) environment variables. Added
// ability to specify an SSH port.
//
// **************************************************************************** // ****************************************************************************
void void
RemoteProcess::CreateCommandLine(stringVector &args, const std::string &rHost, RemoteProcess::CreateCommandLine(stringVector &args, const std::string &rHost,
int numRead, int numWrite, bool local) const HostProfile::ClientHostDetermination chd,
const std::string &clientHostName,
bool manualSSHPort,
int sshPort,
int numRead, int numWrite, bool local) const
{ {
// //
// If the host is not local, then add some ssh arguments to the // If the host is not local, then add some ssh arguments to the
...@@ -1442,6 +1464,14 @@ RemoteProcess::CreateCommandLine(stringVector &args, const std::string &rHost, ...@@ -1442,6 +1464,14 @@ RemoteProcess::CreateCommandLine(stringVector &args, const std::string &rHost,
if(sshArgs) if(sshArgs)
args.push_back(sshArgs); args.push_back(sshArgs);
if (manualSSHPort)
{
char portStr[256];
SNPRINTF(portStr, 256, "%d", sshPort);
args.push_back("-p");
args.push_back(portStr);
}
// Set the username. // Set the username.
if(remoteUserName != std::string("notset")) if(remoteUserName != std::string("notset"))
{ {
...@@ -1474,8 +1504,20 @@ RemoteProcess::CreateCommandLine(stringVector &args, const std::string &rHost, ...@@ -1474,8 +1504,20 @@ RemoteProcess::CreateCommandLine(stringVector &args, const std::string &rHost,
// //
// Add the local hostname and the ports we'll be talking on. // Add the local hostname and the ports we'll be talking on.
// //
args.push_back("-host"); switch (chd)
args.push_back(localHost.c_str()); {
case HostProfile::MachineName:
args.push_back("-host");
args.push_back(localHost.c_str());
break;
case HostProfile::ManuallySpecified:
args.push_back("-host");
args.push_back(clientHostName);
break;
case HostProfile::ParsedFromSSHCLIENT:
args.push_back("-guesshost");
break;
}
args.push_back("-port"); args.push_back("-port");
char tmp[20]; char tmp[20];
......
...@@ -8,6 +8,7 @@ ...@@ -8,6 +8,7 @@
#include <netinet/in.h> #include <netinet/in.h>
#endif #endif
#include <vectortypes.h> #include <vectortypes.h>
#include <HostProfile.h>
class Connection; class Connection;
...@@ -66,6 +67,11 @@ class Connection; ...@@ -66,6 +67,11 @@ class Connection;
// Jeremy Meredith, Thu Jul 3 14:49:23 PDT 2003 // Jeremy Meredith, Thu Jul 3 14:49:23 PDT 2003
// Added ability to disable ptys. // Added ability to disable ptys.
// //
// Jeremy Meredith, Thu Oct 9 13:56:56 PDT 2003
// Added ability to manually specify a client host name or to have it
// parsed from the SSH_CLIENT (or related) environment variables. Added
// ability to specify an SSH port.
//
// **************************************************************************** // ****************************************************************************
class COMM_API RemoteProcess class COMM_API RemoteProcess
...@@ -73,7 +79,12 @@ class COMM_API RemoteProcess ...@@ -73,7 +79,12 @@ class COMM_API RemoteProcess
public: public:
RemoteProcess(const std::string &rProgram); RemoteProcess(const std::string &rProgram);
virtual ~RemoteProcess(); virtual ~RemoteProcess();
virtual bool Open(const std::string &rHost, int numRead, int numWrite, virtual bool Open(const std::string &rHost,
HostProfile::ClientHostDetermination chd,
const std::string &clientHostName,
bool manualSSHPort,
int sshPort,
int numRead, int numWrite,
bool createAsThoughLocal = false); bool createAsThoughLocal = false);
void WaitForTermination(); void WaitForTermination();
void AddArgument(const std::string &arg); void AddArgument(const std::string &arg);
...@@ -96,6 +107,10 @@ protected: ...@@ -96,6 +107,10 @@ protected:
bool CallProgressCallback(int stage); bool CallProgressCallback(int stage);
bool HostIsLocal(const std::string &rHost) const; bool HostIsLocal(const std::string &rHost) const;
void CreateCommandLine(stringVector &args, const std::string &rHost, void CreateCommandLine(stringVector &args, const std::string &rHost,
HostProfile::ClientHostDetermination chd,
const std::string &clientHostName,
bool manualSSHPort,
int sshPort,
int numRead, int numWrite, bool local) const; int numRead, int numWrite, bool local) const;
protected: protected:
int listenPortNum; int listenPortNum;
......
...@@ -62,13 +62,21 @@ RemoteProxyBase::~RemoteProxyBase() ...@@ -62,13 +62,21 @@ RemoteProxyBase::~RemoteProxyBase()
// Creation: Fri May 2 14:57:06 PST 2003 // Creation: Fri May 2 14:57:06 PST 2003
// //
// Modifications: // Modifications:
// // Jeremy Meredith, Thu Oct 9 14:04:45 PDT 2003
// Added ability to manually specify a client host name or to have it
// parsed from the SSH_CLIENT (or related) environment variables. Added
// ability to specify an SSH port.
//
// **************************************************************************** // ****************************************************************************
void void
RemoteProxyBase::Create(const std::string &hostName, RemoteProxyBase::Create(const std::string &hostName,
ConnectCallback *connectCallback, void *data, HostProfile::ClientHostDetermination chd,
bool createAsThoughLocal) const std::string &clientHostName,
bool manualSSHPort,
int sshPort,
ConnectCallback *connectCallback, void *data,
bool createAsThoughLocal)
{ {
// Create a remote process object for the remote component. // Create a remote process object for the remote component.
if(connectCallback == NULL) if(connectCallback == NULL)
...@@ -96,7 +104,9 @@ RemoteProxyBase::Create(const std::string &hostName, ...@@ -96,7 +104,9 @@ RemoteProxyBase::Create(const std::string &hostName,
// //
// Open the remote component. // Open the remote component.
// //
component->Open(hostName, nRead, nWrite, createAsThoughLocal); component->Open(hostName, chd, clientHostName,
manualSSHPort, sshPort,
nRead, nWrite, createAsThoughLocal);
// //
// Hook up the sockets to the xfer object. // Hook up the sockets to the xfer object.
......
...@@ -4,6 +4,7 @@ ...@@ -4,6 +4,7 @@
#include <Xfer.h> #include <Xfer.h>
#include <QuitRPC.h> #include <QuitRPC.h>
#include <ConnectCallback.h> #include <ConnectCallback.h>
#include <HostProfile.h>
#include <string> #include <string>
// Forward declaration. // Forward declaration.
...@@ -25,6 +26,11 @@ class RemoteProcess; ...@@ -25,6 +26,11 @@ class RemoteProcess;
// Added parallel functions that were only needed for the engine but // Added parallel functions that were only needed for the engine but
// that are helpful to have in the base class. // that are helpful to have in the base class.
// //
// Jeremy Meredith, Thu Oct 9 14:04:37 PDT 2003
// Added ability to manually specify a client host name or to have it
// parsed from the SSH_CLIENT (or related) environment variables. Added
// ability to specify an SSH port.
//
// **************************************************************************** // ****************************************************************************
class PROXYBASE_API RemoteProxyBase class PROXYBASE_API RemoteProxyBase
...@@ -37,7 +43,12 @@ public: ...@@ -37,7 +43,12 @@ public:
void SetProgressCallback(bool (*cb)(void *, int), void *data); void SetProgressCallback(bool (*cb)(void *, int), void *data);
void AddArgument(const std::string &arg); void AddArgument(const std::string &arg);
void Create(const std::string &hostName, ConnectCallback *connectCallback = 0, void Create(const std::string &hostName,
HostProfile::ClientHostDetermination chd,
const std::string &clientHostName,
bool manualSSHPort,
int sshPort,
ConnectCallback *connectCallback = 0,
void *data = 0, bool createAsThoughLocal = false); void *data = 0, bool createAsThoughLocal = false);
void Close(); void Close();
......
...@@ -199,7 +199,7 @@ AnnotationAttributes::BackgroundMode_FromString(const std::string &s, Annotation ...@@ -199,7 +199,7 @@ AnnotationAttributes::BackgroundMode_FromString(const std::string &s, Annotation
// Note: Autogenerated by xml2atts. // Note: Autogenerated by xml2atts.
// //
// Programmer: xml2atts // Programmer: xml2atts
// Creation: Wed Jul 23 11:29:28 PDT 2003 // Creation: Thu Oct 9 13:27:00 PST 2003
// //
// Modifications: // Modifications:
// //
...@@ -284,7 +284,7 @@ AnnotationAttributes::AnnotationAttributes() : AttributeSubject("bbbbbbbbddddddd ...@@ -284,7 +284,7 @@ AnnotationAttributes::AnnotationAttributes() : AttributeSubject("bbbbbbbbddddddd
// Note: Autogenerated by xml2atts. // Note: Autogenerated by xml2atts.
// //
// Programmer: xml2atts // Programmer: xml2atts
// Creation: Wed Jul 23 11:29:28 PDT 2003 // Creation: Thu Oct 9 13:27:00 PST 2003
// //
// Modifications: // Modifications:
// //
...@@ -373,7 +373,7 @@ AnnotationAttributes::AnnotationAttributes(const AnnotationAttributes &obj) : At ...@@ -373,7 +373,7 @@ AnnotationAttributes::AnnotationAttributes(const AnnotationAttributes &obj) : At
// Note: Autogenerated by xml2atts. // Note: Autogenerated by xml2atts.
// //
// Programmer: xml2atts // Programmer: xml2atts
// Creation: Wed Jul 23 11:29:28 PDT 2003 // Creation: Thu Oct 9 13:27:00 PST 2003
// //
// Modifications: // Modifications:
// //
...@@ -393,7 +393,7 @@ AnnotationAttributes::~AnnotationAttributes() ...@@ -393,7 +393,7 @@ AnnotationAttributes::~AnnotationAttributes()
// Note: Autogenerated by xml2atts. // Note: Autogenerated by xml2atts.
// //
// Programmer: xml2atts // Programmer: xml2atts
// Creation: Wed Jul 23 11:29:28 PDT 2003 // Creation: Thu Oct 9 13:27:00 PST 2003
// //
// Modifications: // Modifications:
// //
...@@ -483,7 +483,7 @@ AnnotationAttributes::operator = (const AnnotationAttributes &obj) ...@@ -483,7 +483,7 @@ AnnotationAttributes::operator = (const AnnotationAttributes &obj)
// Note: Autogenerated by xml2atts. // Note: Autogenerated by xml2atts.
// //
// Programmer: xml2atts // Programmer: xml2atts
// Creation: Wed Jul 23 11:29:28 PDT 2003 // Creation: Thu Oct 9 13:27:00 PST 2003
// //
// Modifications: // Modifications:
// //
...@@ -572,7 +572,7 @@ AnnotationAttributes::operator == (const AnnotationAttributes &obj) const ...@@ -572,7 +572,7 @@ AnnotationAttributes::operator == (const AnnotationAttributes &obj) const
// Note: Autogenerated by xml2atts. // Note: Autogenerated by xml2atts.
// //
// Programmer: xml2atts // Programmer: xml2atts
// Creation: Wed Jul 23 11:29:28 PDT 2003 // Creation: Thu Oct 9 13:27:00 PST 2003
// //
// Modifications: // Modifications:
// //
...@@ -593,7 +593,7 @@ AnnotationAttributes::operator != (const AnnotationAttributes &obj) const ...@@ -593,7 +593,7 @@ AnnotationAttributes::operator != (const AnnotationAttributes &obj) const
// Note: Autogenerated by xml2atts. // Note: Autogenerated by xml2atts.
// //
// Programmer: xml2atts // Programmer: xml2atts
// Creation: Wed Jul 23 11:29:28 PDT 2003 // Creation: Thu Oct 9 13:27:00 PST 2003
// //
// Modifications: // Modifications:
//