admin@glassfish.java.net

Re: Commands that save files

From: Tom Mueller <tom.mueller_at_oracle.com>
Date: Mon, 04 Oct 2010 09:23:25 -0500

  It looks like this is a situation where we either have inconsistency
or we break backward compatibility somewhere.

export-http-lb-config is documented in 2.1 to export the file to
"<domain>/generated" by default.

backup-domain is documented in 2.1 to export the the file
"<domain>/backups"by default. However, this documentation is only in
the Examples section; it doesn't specifically say that the backup goes
to the backups subdirectory under the domain dir.

Options are:
1) do nothing - leave the inconsistency there

2) declare that all commands that create output files for a domain
should store those files in a command-specific subdirectory under the
domain directory, i.e., (sync, backups, load-balancer)

3) declare that there should be a new directory, "exported", under the
domain directory, and all commands that create-output files for a domain
should store those files in a command-specific subdirectory under the
"exported" directory.

With (1) no one has to change anything.
With (2) only Kshitiz has to change export-http-lb-config, and we have
an incompatibility there.
With (3) all three commands have to change, and we have two
incompatibilities.

Maybe consistency isn't important in this area.

I'm leaning towards (2) at this point because it gives us the greatest
consistency with the least change and the least compatibility breakage.

I think (3) would be the better technical solution because it give a
user the ability to find and cleanup their exported stuff easily. But it
has some the drawbacks listed above.

Thoughts?
Tom


On 10/4/2010 2:12 AM, Bill Shannon wrote:
> I don't have a strong opinion either way. A common directory for all
> commands to use, or a directory per command would be fine. Given that
> the latter is currently more common, maybe that's the simplest approach
> for now?
>
>
> Tom Mueller wrote on 10/02/2010 12:32 PM:
>> What other location? Should each command create its own directory for
>> it's output files? Export-sync-bundle and backup-domains already do
>> this. Export-http-lb-config doesn't.
>>
>> Tom
>>
>>
>>
>> On Oct 1, 2010, at 6:01 PM, Bill Shannon <bill.shannon_at_oracle.com>
>> wrote:
>>
>>> My impression of the "generated" directory was more that it was for the
>>> server's own use and users shouldn't be poking around in there. What's
>>> in there and how it's organized might change from release to release.
>>>
>>> I think it would be better to create the files in another location.
>>>
>>>
>>> Tom Mueller wrote on 09/30/10 07:26 AM:
>>>> I haven't seen any response to this other than from Kshitiz.
>>>>
>>>> Chris, Jennifer, do you think it would be more appropriate to
>>>> generate backup
>>>> and sync-bundles into the generated directory by default since that
>>>> is where
>>>> other GlassFish generated files go?
>>>>
>>>> It seems inconsistent to me to look in generated for one type of
>>>> file and then
>>>> in special purpose directories for the other files.
>>>>
>>>> There are also subdirectories under generated (ejb, jsp, policy,
>>>> xml). Maybe
>>>> sync and backups should be subdirectories under generated?
>>>>
>>>> Tom
>>>>
>>>>
>>>> On 9/27/2010 11:00 AM, Kshitiz Saxena wrote:
>>>>> I have used /*generated*/ directory as same was used in GlassFish
>>>>> 2.1.1. In
>>>>> many cases, user will provide absolute path specifying the
>>>>> directory where
>>>>> load-balancer xml file need to be created.
>>>>>
>>>>> Since generated directory is used for files generated/exploded by
>>>>> GlassFish,
>>>>> it is best to use the same for load-balancer as well.
>>>>>
>>>>> Thanks,
>>>>> Kshitiz
>>>>>
>>>>> On Monday 27 September 2010 07:24 PM, Tom Mueller wrote:
>>>>>> We have several commands that save files on the DAS within the
>>>>>> domain
>>>>>> directory tree. Here is a (partial?) list and where the files
>>>>>> are written:
>>>>>>
>>>>>> Command
>>>>>> Output file location
>>>>>> backup-domain <domaindir>/backups
>>>>>> export-http-lb-config
>>>>>> <domaindir>/generated
>>>>>> collect-log-files
>>>>>> no default - --outputfilepath is required param - file is
>>>>>> saved on DAS,
>>>>>> param is absolute pathname, no option to save locally (--retrieve)
>>>>>> export-sync-bundle
>>>>>> <domaindir>/sync
>>>>>>
>>>>>>
>>>>>> I'm just checking to make sure this is ok when looking at this
>>>>>> across all of
>>>>>> the commands.
>>>>>>
>>>>>> backup-domain and export-sync-bundle are creating their own
>>>>>> directory for
>>>>>> this, while export-http-lb-config is reusing a directory that is
>>>>>> already
>>>>>> there. Should the former commands use the generated directory
>>>>>> too? Should
>>>>>> export-http-lb-config create its own directory? Should
>>>>>> collect-log-files have
>>>>>> a default place within the domain tree to put the files?
>>>>>>
>>>>>> Thoughts?
>>>>>> Tom
>>>>>>
>