admin@glassfish.java.net

Re: directory layout

From: Dies Koper <diesk_at_fast.au.fujitsu.com>
Date: Thu, 11 Mar 2010 11:21:34 +1100

> What happens to log files? Do all instances log to the same log
> file? I assume not. I assume they each have their own log file
> in the <instance>/logs directory and the agent/logs directory is
> used for logs for the node agent itself. Correct?

Yes.
Also, a directory with the name of the instance will be created in the
log directory to store the transaction logs. (Which are not
human-readable, they contain data on on-going transactions, to be able
to clean them up if the instance suddenly dies in the middle of a global
transaction). These shouldn't be sync'ed either.

> If the instances do their own synchronization, it seems that we can't
> support having a single config directory per node, shared by all the
> instances. The config data will have to be moved under the
> <instance>/config directory. Anyone see any problems with that?

As it is in V2, right?

> We need to allow both an instance and the DAS to run on the same machine
> using the same software installation image. That means the instance
> can't keep its data under the domains directory. With no node agent,
> does it make sense to keep the data under the nodeagents directory?
> We could use a fake node agent name such as "default" or "none" for
> this case.
>
> With a single v2 software installation, multiple node agents supporting
> instances in multiple domains can be created. With no actual node
> agents, how can we support the same? Seems like we need multiple
> "fake" node agent directories. Should the names of these directories
> be derived from the domain name or the DAS address, at least by default,
> so that users don't need to choose the name of a directory that doesn't
> matter to them?

As we discussed yesterday, there is only one node agent per domain per
machine. So I thought, why not make the name exactly the same as the
domain name?

domains
  || ---- domain1

nodeagents
  || ---- domain1 (<nodeagent1> in GF V2)
      || ---- agent
      || ---- <instance1>

But with no nodeagent, and these files still being part of the domain,
why not merge them?

domains
  || ---- domain1
      || ---- server (this is new to put the DAS files in the same
position as the other instance)
      || ---- <instance1>

But such a change might have a bigger impact, so probably the current
structure with better names is better:

domains
  || ---- domain1

nodes (/instances/servers, etc., was 'nodeagents' in GF V2)
  || ---- domain1 (was <nodeagent1> in GF V2)
      || ---- agent (once the node agent is supported again)
      || ---- <instance1>

> Alternatively, we could enhance the create-node-agent command to have
> a "--fake" option, or something like that, so that we could use it to
> create the directory structure above. Then a "create-local-instance"
> command (or "create-instance --local") could be used to configure the
> instance-specific part.
>
> I'm leaning towards this latter approach.

If the former approach is to rename the directories, why not both?
I never really understood the reason to let users name the node agent.
The create-node-agent command (with the fake option) could be run as
part of 'ant -f setup-cluster.xml' or whatever mechanism we'll have in
GFv3.1 to enable cluster mode.

Regards,
Dies