We should fix this through the properties file. The joba agents are 
running on different hosts so the BASE server should not try set the 
temporary directory for another machine. I have added this as a ticket, 
http://base.thep.lu.se/ticket/897


Jari


Nicklas Nordborg skrev:
> Jari Häkkinen wrote:
>>>> 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 server on a host there is a potential clash. A plugin running 
>>>> in the different BASEs may allocate the same temporary directory (since 
>>>> jobids may match).
>>>>
>>>> The java.io.tmpdir returns /tmp on linux irrespective what 
>>>> CATALINA_TMPDIR is set to. /tmp is the Java default on linux and running 
>>>> tomcat CATALINA_TMPDIR is set properly by default. This means that the 
>>>> tmp for running tomcat server is /path/to/tomcat/temp as expected.
>>>>
>>>> So, the BASEcore is proably using the CATALINA_TMPDIR whereas the 
>>>> plugins are using the system default. This must be an effect of how 
>>>> plugins are started by the core. Is it possible to pass the tmp 
>>>> directory to the plug-in running environment?
>>> I am not sure that I understand why using one directory would be better 
>>> than the other. Wouldn't the name clash still happen if 
>>> /path/to/tomcat/temp was used instead of /tmp?
>> I would like to use SEVERAL temporary directories, one for each tomcat 
>> server running. In my setup I have several BASE instances running, each 
>> in they own tomcat instance. I can setup up the tomcats to use different 
>> temporary directories (well, it does that by default so I am not really 
>> doing anything), but the problem occurs as soon as any of the BASE 
>> servers starts a plugin requiring temporary disk space. Independent of 
>> assigned tomcat temporary directories all plugins use /tmp.
>>
>> In the start up of the different tomcat servers, java.io.tmpdir is set 
>> to private tempdirs like
>> /path/to/tomcat1/temp
>> /path/to/tomcat2/temp
>> (logs, conf, and ordinary tomcat stuff are set up similarly). The 
>> problem is that when tomcat/BASE starts a plugin execution the temporary 
>> directory is reset to /tmp. This could be that plugins runs in a ... 
>> jobagent ... which doesn't know anything about the temporary directory 
>> structure ... Hm, this is probably the issue. So, a new question. Can we 
>> tell the jobagents which temporary directory to use? I suppose a 
>> configuration parameter would solve it but dynamically on the fly?
> 
> I guess that this is what is causing it. If a plug-in is executed within 
> Tomcat it will most likely get the same temporary directory as Tomcat is 
> using. The BASE core is not messing with it. Neither is the job agent 
> code, which means that they will all get the system default temporary 
> directory.
> 
> Hmm... maybe the job agent should be messing with the temporary 
> directory the same way as tomcat does... Maybe it can be a configuration 
> property in jobagent.properties, or maybe we can find some way to assign 
> a directory by default, or a combination... Any ideas?

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
basedb-devel mailing list
basedb-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/basedb-devel

Reply via email to