Bug 1556 - Environment fix for PBS
 Summary: Environment fix for PBS
 Depends on: Blocks: Status: RESOLVED FIXED Product: GRAM Component: gt2 Gatekeeper/Jobmanager Version: 1.6 Platform: PC All Importance: P1 major Target Milestone: 4.0 Assigned To: Joe Bester URL: Keywords: Show dependency tree / graph

 Reported: 2004-02-13 16:47 by Alain Roy Modified: 2004-11-16 15:59 (History)

Attachments
pbs_env_fix.diff (566 bytes, patch)
2004-02-16 09:11, Maarten Litmaath
Details
pbs-env-patch.diff (2.42 KB, patch)
2004-11-12 08:30, Joe Bester
Details

 Note You need to log in before you can comment on or make changes to this bug. Description From 2004-02-13 16:47:20 PBS is annoying. Here's the deal: When environment variables have commas in them, it causes problems with PBS. (I'm not sure which version of PBS: Maarten, can you comment?) GLOBUS_TCP_PORT_RANGE has commas in it, so it is a regular source of problems. The right way to fix this may be to scan the environment for any variables that have commas in them, and remove them from the environment. In lieu of that, this is a patch that just undefined GLOBUS_TCP_PORT_RANGE. It's an incomplete solution, but it helps many of the problems, so it's useful. We'd like to either see this hack added, or a better solution developed. We're happy to work with you to develop something better, if you would prefer. Thanks! -alain --- globus_2_4_3_adv2003_fix892_fix956_more/gram/jobmanager/setup/pbs/pbs.in Fri Mar 28 00:00:31 2003 +++ globus_2_4_3_adv2003_fix892_fix956_plus/gram/jobmanager/setup/pbs/pbs.in Sun Jan 4 04:55:44 2004 @@ -233,7 +233,11 @@ \$library_vars{\$tuple->[0]} = 1; } - push(@new_env, \$tuple->[0] . "=" . '"' . \$tuple->[1] . '"'); + # Hack to unset GLOBUS_TCP_PORT_RANGE, because it may contain a comma, + # which cannot be handled by PBS in an environment line. EDG bug 1208. + + push(@new_env, \$tuple->[0] . "=" . '"' . \$tuple->[1] . '"') + unless \$tuple->[0] =~ /^GLOBUS_(TCP|UDP)_PORT_RANGE\$/; \$tuple->[0] =~ s/\\/\\\\/g; \$tuple->[0] =~ s/\\$/\\\\$/g; ------- Comment #1 From 2004-02-16 09:11:58 ------- pbs_env_fix.diff Since PBS cannot handle *any* environment variable with a comma, I think the patch should rather be as attached here. ------- Comment #2 From 2004-02-16 09:19:42 ------- At least openpbs-2.3.16 has the problem. ------- Comment #3 From 2004-02-26 15:57:13 ------- PBS people tell me that this has been fixed in PBS pro, but not yet in open pbs. So we cannot just reject all env RSL's with commas for all pbs versions. We will need to detect which PBS version it is and handle it accordingly. ------- Comment #4 From 2004-11-12 08:30:37 ------- pbs-env-patch.diff Can you try this patch and see if this is satisfactory? This bypasses using the -v option for environment variables and just sets them in the script which the pbs system executes. This patch is against the trunk, but patches cleanly against the head of the 3.2 branch as well. ------- Comment #5 From 2004-11-12 17:10:53 ------- In the patch I see the "#PBS -v " line has been removed, but I do not see the variables getting set anywhere else? ------- Comment #6 From 2004-11-12 17:13:27 ------- Please ignore my previous question... (it is evident after all). ------- Comment #7 From 2004-11-16 15:59:52 ------- Patch committed to trunk after running GRAM tests.