dev@glassfish.java.net

Re: Behavior of asadmin stop-instance command

From: Ken <ken.cavanaugh_at_oracle.com>
Date: Wed, 03 Nov 2010 11:36:31 -0700

Ken Cavanaugh wrote:
> Byron Nevins wrote:
>> Yes - that is how stop-server commands work. Before the --force
>> option was 100% ignored. Now it is used. If you set --force to
>> false, then the server will not stop. That's because System.exit()
>> is not called and your server has non-daemon threads left running -
>> so it will never stop.
>>
So what you are saying is, if a user types "stop-instance --force
false", the instance does not stop. Worse, the
instance is left in a zombie state (e.g. ORB still runs, but EJBs are
undeployed). I don't see that this is a useful
behavior to expose to the customer. From our meeting this morning, I
think the docs and SQE folks agree with
this.

I can understand that there might be a desire to have a clean shutdown
option (e.g. kill vs. kill -9),
but if the clean shutdown doesn't work, we shouldn't support it. It's
not clear to me what your
plan is for MS7 (and FCS) in GF 3.1, but it seems that either
stop-instance --force false should
result in useful behavior (at least in a "normal" case), or
stop-instance --force false should
not be supported. If the --force option is needed for other plans (e.g.
backward compatibility or
future support), I think --force false should produce a warning and do
nothing. Otherwise, the
--force option should be removed.

Another question is: how should SQE test stop-instance --force false?
The current behavior is not
well-defined, and cannot be tested.

My desire here is simple: avoid situations that confuse the user. If
the option is not useful, it
should not be supported.

Thanks,

Ken.