Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] GRAM job manager error because of the non-standard installation path "\" #93

Closed
iWangJiaxiang opened this issue Jul 4, 2019 · 1 comment

Comments

@iWangJiaxiang
Copy link
Contributor

Description

Hello dear developers,

This is a bug that occurs when use the non-standard installation path (not \).

I tried to compile and install GCT on a custom path (not standard path \) but I got errors when running globus-job-run. The error looks like below:

GRAM Job failed because the job manager detected an invalid script status (error code 25)

Reproduction

Just compile and install GCT to a custom path and run globus-job-run after proper configuration.

Research

After referring the official doc I found more details:

Error Code Reason Possible Solutions
25 the job manager detected an invalid script status Check job manager logs. This is likely a bug in the LRM script.

I followed the doc to diagnose LRM error. When I run the command globus-job-manager-script.pl -h, I got nothing on Installed managers.

According to the globus-job-manager-script.pl perl script, -h option should have listed all install LRM managers but I got nothing. The relative code is as below:

if ($help)
{
    my $managers;
    print "USAGE: $0 -m MANAGER -f FILE -c COMMAND\n";
    print "Installed managers:";
    foreach (<$perlmoduledir/Globus/GRAM/JobManager/*.pm>)
    {
        my $manager = $_;
        chomp($manager);
        $manager =~ s|.*/||;
        $manager =~ s|\.pm$||;
        print " $manager";
    }
    print "\n";
    exit(0);
}

After more review of the script, I found the reason was the $perlmoduledir variable which should have correct path but not (the value was just /perl). That's because the initialization of $perlmoduledir needs to contain the value of $libdir` as the code below.

$perlmoduledir = "${libdir}/perl";

However, the $libdir is defined but a value is never assigned to it. So the $perlmoduledir would never get correct path to locate LRM scripts.

Reason

$perlmoduledir not properly assigned because of un-assigned variable $libdir.

I checked line 49 in the source file and the code is $perlmoduledir = "@perlmoduledir@";. This mighit be fixed in the initialization of GCT installation.

Solution

For now my workaround is manually assigning the lib directory to $libdir before the assignment of $perlmoduledir in the file globus-job-manager-script.pl. Just like below:

...
$libdir = "/path/to/globus/lib";
$perlmoduledir = "${libdir}/perl";
...

Hope this could help~

@fscheiner
Copy link
Member

fscheiner commented Sep 19, 2019

Fixed in GCT v6.2.20190906.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants