ca126a8f3bb45e369344348a2bbab6609d40a8a7
galt
  Wed Jun 25 14:15:07 2025 -0700
Fix parasol version 12.20 so paraNodeStart passes the name in cluster.ms to the paraNode via new node option and this overrides getMachine() and so resurrect and checkJob will work correctly even for hgwdev-101.

diff --git src/parasol/paraNode/paraNode.c src/parasol/paraNode/paraNode.c
index 428c1f57e6c..2e545990959 100644
--- src/parasol/paraNode/paraNode.c
+++ src/parasol/paraNode/paraNode.c
@@ -20,58 +20,60 @@
 
 /* command line option specifications */
 static struct optionSpec optionSpecs[] = {
     {"logFacility", OPTION_STRING},
     {"logMinPriority", OPTION_STRING},
     {"log", OPTION_STRING},
     {"debug", OPTION_BOOLEAN},
     {"hub", OPTION_STRING},
     {"umask", OPTION_INT},
     {"userPath", OPTION_STRING},
     {"sysPath", OPTION_STRING},
     {"env", OPTION_STRING|OPTION_MULTI},
     {"randomDelay", OPTION_INT},
     {"cpu", OPTION_INT},
     {"localhost", OPTION_STRING},
+    {"node", OPTION_STRING},
     {NULL, 0}
 };
 
 char *version = PARA_VERSION;   /* Version number. */
 
 void usage()
 /* Explain usage and exit. */
 {
 errAbort("paraNode - version %s\n"
 	 "Parasol node server.\n"
          "usage:\n"
 	 "    paraNode start\n"
 	 "options:\n"
 	 "    -logFacility=facility  Log to the specified syslog facility - default local0.\n"
          "    -logMinPriority=pri minimum syslog priority to log, also filters file logging.\n"
          "     defaults to \"warn\"\n"
          "    -log=file  Log to file instead of syslog.\n"
          "    -debug  Don't daemonize\n"
 	 "    -hub=host  Restrict access to connections from hub.\n"
 	 "    -umask=000  Set umask to run under - default 002.\n"
 	 "    -userPath=bin:bin/i386  User dirs to add to path.\n"
 	 "    -sysPath=/sbin:/local/bin  System dirs to add to path.\n"
          "    -env=name=value - add environment variable to jobs.  Maybe repeated.\n"
 	 "    -randomDelay=N  Up to this many milliseconds of random delay before\n"
 	 "        starting a job.  This is mostly to avoid swamping NFS with\n"
 	 "        file opens when loading up an idle cluster.  Also it limits\n"
 	 "        the impact on the hub of very short jobs. Default 5000.\n"
 	 "    -cpu=N  Number of CPUs to use - default 1.\n"
+	 "    -node=host  name used to identify this machine including resurrect and checkjob.\n"
 	, version
 	);
 }
 
 
 /* Command line overwriteable variables. */
 char *hubName;			/* Name of hub machine, may be NULL. */
 int umaskVal = 0002;		/* File creation mask. */
 int maxProcs = 1;		/* Number of processers allowed to use. */
 char *userPath = "";		/* User stuff to add to path. */
 char *sysPath = "";		/* System stuff to add to path. */
 struct slName *envExtra = NULL; /* Add to environment */ 
 int randomDelay = 5000;		/* How much to delay job startup. */
 
 /* Other globals. */
@@ -802,31 +804,30 @@
     pmClear(&pmIn);
     pmPrintf(&pmIn, "%s", job->doneMessage);
     if (!pmSend(&pmIn, mainRudp))
         return;
     }
 }
 
 void paraNode()
 /* paraNode - a net server. */
 {
 char *line;
 char *command;
 struct sockaddr_storage sai;
 
 /* We have to know who we are... */
-hostName = getMachine();
 initRandom();
 getTicksToHundreths();
 
 /* log init */
 if (optionExists("log"))
     logOpenFile("paraNode", optionVal("log", NULL));
 else    
     logOpenSyslog("paraNode", optionVal("logFacility", NULL));
 logSetMinPriority(optionVal("logMinPriority", "info"));
 logInfo("starting paraNode on %s", hostName);
 
 /* Make job lists. */
 jobsRunning = newDlList();
 jobsFinished = newDlList();
 
@@ -893,27 +894,28 @@
 rudpClose(&mainRudp);
 }
 
 int main(int argc, char *argv[])
 /* Process command line. */
 {
 optionInit(&argc, argv, optionSpecs);
 if (argc != 2)
     usage();
 maxProcs = optionInt("cpu", 1);
 umaskVal = optionInt("umask", 0002);
 userPath = optionVal("userPath", userPath);
 sysPath = optionVal("sysPath", sysPath);
 envExtra = optionMultiVal("env", NULL);
 randomDelay = optionInt("randomDelay", randomDelay);
+hostName = optionVal("node", getMachine());
 
 /* Look up IP addresses. */
 lookupIp("localhost", localIp, sizeof localIp);
 hubName = optionVal("hub", NULL);
 if (hubName != NULL)
     lookupIp(hubName, hubIp, sizeof hubIp);
 paraDaemonize("paraNode");
 paraNode();
 return 0;
 }