Hi Olivier
Olivier LAGACHE wrote:
> Hi,
>
> We are trying to integrate Shoal since a few weeks into our web
> applications deployed on a Glassfish 2ur1 cluster (2 instances so far).
Very glad to know you are trying out Shoal. Please dont hesitate to ask
us for any help with Shoal.
> Our main purpose is to be able to determine which instance of the
> cluster is the current "master" in order to perform a one time task.
Typically in GlassFish, since the Domain Admin Server is the one present
when the cluster is created, it ends up becoming the master of the
cluster until it dies or is shutdown.
>
> While using the version 1.0-11142007, the Shoal cluster was unable to
> elect a new master after an application redeploy OR undeploy/deploy
> almost each time.
Could you explain this a bit more as to why you expect a new master to
be selected with an app deploy/redeploy?
As DAS is still around right from the time a cluster is created, it
remains a master. It is not affected by the deploy/redeploy actions.
If your use case is to pick one member of the cluster (and not including
DAS), then this approach will not work. What you could do is to call
GroupHandle.getCurrentCoreMembers(). This returns the cluster members
who join the group as core members (as opposed to DAS which is a
Spectator member). You can then choose the first or a specific member to
be the one you are looking for, to perform the one time task.
> With the version 1.1-03242008 using jxta 2.5, we are still
> experiencing the same problem but less frequently (once each 10/15 times).
Once you give us a few more details with steps to reproduce, that would
help us address the issue.
>
> We tried to work around this problem with a basic admin interface
> allowing us, for each instance, to shut it down or join a group.
> However, after a shutdown/join (with the famous "MASTER_CHANGE_EVENT,
> ..." log), a call to "getGms().getGroupHandle().isGroupLeader()"
> returns false on each instance.
That is understandable as DAS is the master node. If you call
getGroupHandle().getGroupLeader() and print it, you should see who the
master is. Could you do this and post that information here ?
>
> Did you already run into this problem before ? Could it be linked to
> the usage of Shoal by the Glassfish cluster ?
I hope you are not starting Shoal in your app. If you are comfortable,
do send us the code you have written to call Shoal APIs and we can give
you a review on usage.
Best regards
Shreedhar
>
> Thanks in anticipation,
>
> Regards