Project

General

Profile

Bug #10136

SESSION:TEMP-DIRECTORY missing directory

Added by Teodor Gorghe about 1 year ago. Updated about 1 year ago.

Status:
Test
Priority:
Normal
Assignee:
Target version:
-
Start date:
Due date:
% Done:

100%

billable:
No
vendor_id:
GCD
case_num:
version_reported:
version_resolved:
production:
No
env_name:
topics:

Related issues

Related to Runtime Infrastructure - Bug #11325: JVM shutdown hooks executed on FWD server, but they belong to the FWD client Test

History

#1 Updated by Teodor Gorghe about 1 year ago

When using Startup Parameters, SESSION:TEMP-DIRECTORY directory is not created.

#3 Updated by Teodor Gorghe about 1 year ago

  • Status changed from WIP to Review
  • % Done changed from 0 to 50

Created task branch 10136a.
Committed revision 15981 on task branch 10136a:
- SESSION:TEMP-DIRECTORY getter: create a temporary directory if it does not exist when Startup Parameter is set.

#4 Updated by Greg Shah about 1 year ago

We only should implement the change if that is how OE works.

#5 Updated by Teodor Gorghe about 1 year ago

On OE Developer Studio, the default value for SESSION:TEMP-DIRECTORY is C:\Progress\OE116_64WRK\, which is already created before running the application. The same applies when you specify the path with -T startup parameter.
On FWD, the default temp directory is /tmp/fwd{random digits}:

private String defaultFwdTempFolder = "fwd" + new Random().nextLong();
. I don't quite understand the reason why, but I think this decision was made to separate the temp files between clients. The path is generated on runtime and that path is unknown before running the application, so that folder must be created before using any new File(EnvironmentOps.getTempDirectory() + filename) in places like XmlExport.
Before the changes on this task, FWD create a temp directory, like /tmp/fwd{random digits}, but when you specify it with the Startup Parameter, that temp directory (like ../tmp/fwd{random digits} is no longer created.

One alternative for this fix is the following:
- when you specify the startup parameter, I think is better to just not generate a random directory name inside it, but just keep returning the root file. Example: When you specify in the client bootstrap the temporary folder, ../tmp/, the SESSION:TEMP-DIRECTORY can just return ../tmp/, without that randomly generated path ../tmp/fwd{random digits}.

#6 Updated by Constantin Asofiei about 1 year ago

The fwd{random-digits} folder is used to isolate Web clients (like GUI or ChUI), which on the original env, were running on different machines, thus different temp folders for each.

In the appserver case, the temp folder is common for all, as they are all running on the same machine. I'm split between using the same logic of creating distinct temp folders, or, when -T is used, use that folder.

An important note is that when fwd{random-digits} was added, that customer was setting the temporary directory via -Djava.io.tmpdir=/tmp/ at the FWD client's jvmArgs in directory.xml.

#7 Updated by Greg Shah about 1 year ago

The same applies when you specify the path with -T startup parameter.

If you pass a non-existing directory name to the -T option, OE creates that directory? Please create testcases for this, including what happens if the parent directory path doesn't exist and what happens when the permissions don't allow drecetory creation.

#8 Updated by Constantin Asofiei about 1 year ago

Teodor: please post your findings about what Greg mentioned.

Greg: my points about the temp dir are this:
  • for GUI clients (which in the legacy deployment are on different machines) we need the segregation via fwd{random-digits} folder - and this was the original reason why it was added. I don't recall if -T was specified for that customer project's temporary directory in OpenEdge
  • for appserver agents, they all run on the same machine, with the same configuration. So -T means that they share the temporary directory. But, in 4GL, -T can be passed to GUI clients, also. So, if we honor tmp{random-digits} segregation for appserver agents, the only downside I see is some application which relies on the shared -T folder, to i.e. share data between agents. And I think this is enough to make the distinction (via AppServerManager.isRemote()) that a -T should have the fwd{random-digits} folder or not.

#9 Updated by Greg Shah about 1 year ago

I don't object to your idea, but I'm also OK with always having the tmp{random-digits} segregation. If a customer has a requirement for sharing the temp directory, we can implement a configurable feature to use a fixed value.

#10 Updated by Constantin Asofiei about 1 year ago

Greg Shah wrote:

I don't object to your idea, but I'm also OK with always having the tmp{random-digits} segregation. If a customer has a requirement for sharing the temp directory, we can implement a configurable feature to use a fixed value.

OK, then we can leave the current approach.

#11 Updated by Constantin Asofiei about 1 year ago

  • Status changed from Review to Merge Pending

Please merge 10136a now.

#12 Updated by Teodor Gorghe about 1 year ago

  • Status changed from Merge Pending to Test
  • % Done changed from 50 to 100

Branch 10136a was merged to trunk rev 15987 and archived.

#13 Updated by Teodor Gorghe 4 months ago

  • Related to Bug #11325: JVM shutdown hooks executed on FWD server, but they belong to the FWD client added

Also available in: Atom PDF