Opened 17 years ago

Closed 17 years ago

#897 closed defect (wontfix)

Potential temporary directory clash for plugins running through job agents

Reported by: Jari Häkkinen Owned by: everyone
Priority: major Milestone: BASE 2.7.1
Component: core Version: trunk
Keywords: Cc:

Description

With modern multi-core machines there will probably be a desire to run several job agents on a single machine. Theses job agents may be running against different BASE servers and this has a potential impact on job execution.

Many plug-ins acquire a working directory with code similar to the sample attached below. This is mostly safe but when running more than one BASE job agent on a single host there is a potential clash. A plugin running in different agents (that are running against different BASE servers, if the agents are running against the same BASE server the core guards against this problem ... I hope) may allocate temporary directories with the same (since jobids may match).

protected java.io.File getExecDirectory()
{
   if (execDirectory == null) {
     execDirectory = new java.io.File
        (System.getProperty("java.io.tmpdir") + java.io.File.separator +
        getAbout().getName() + java.io.File.separator + job.getId());
     execDirectory.mkdirs();
   }

The java.io.tmpdir returns a default directory (/tmp on linux). We need to facilitate a way to set the temporary directory differently for different job agents. I suggest that we add a configuration option to the job agent properties file.

Change History (2)

comment:1 by Nicklas Nordborg, 17 years ago

Possible workaround for this is to modify the jobagent.sh script for each BASE installation. Add the option -Djava.io.tmpdir=/path/to/tmpdir to the line containing the java command (that last line). Use different paths for each BASE installation.

comment:2 by Jari Häkkinen, 17 years ago

Milestone: BASE 2.7.1
Resolution: wontfix
Status: newclosed

This issue is something that the administrator and plugin programmer must resolve.

Note: See TracTickets for help on using tickets.