Topic
  • 3 replies
  • Latest Post - ‏2013-08-21T22:38:57Z by SolomanBarghouthi
SolomanBarghouthi
SolomanBarghouthi
8 Posts

Pinned topic Questions on "WAS 8.5.5 Liberty profile Collective" feature

‏2013-08-21T22:35:12Z |

We have came across this question from a customer which the Liberty dev team answered, but we thought this is very useful to others, so i am going to put the question here and put the answers as a reply. Enjoy the reading.

 

Question:

I am able to use the sample Jython programs to manage the most of Liberty Profile administration tasks. The "hostname" present the biggest challenge for us. Even though I specify the short name (such as myhost) in hostAuth definition, apparently it is registered as fqdn (myhost.mycompany.com). When I specified the short name in Jython, the task failed with return code 2. Cannot figure out what does rc=2 mean until I play with JConsole to get some sense out it. Fully qualified name is not desired in our environment. We are using the short name to help us implement DR by resolve the name dynamically with different resolv.conf in each DC. Could you kindly help to answer few questions:
  
1)      How can I examine the Liberty Repository to determine which hostname is registered?
2)      How can I persuade Liberty Profile to accept both short Name and full qualified name during Jython start/stop action?
3)      How can I persuade Liberty Profile to register the Host with Short Name, so it will not interfere with my company DR strategy?
 
In the DR site, the identical images are cloned from Data Center 1 to Data Center 2 constantly. To unregister and register a couple of hundreds  Host info during DR scenario is not our best interest.
 
 
  • SolomanBarghouthi
    SolomanBarghouthi
    8 Posts

    Re: Questions on "WAS 8.5.5 Liberty profile Collective" feature

    ‏2013-08-21T22:37:03Z  
    >>>>>>>1)      How can I examine the Liberty Repository to determine which hostname is registered?
    Use the dump operation on the CollectiveRepository MBean. The easiest access to this MBean is through JConsole.  Invoke it with parameters dump("/","/tmp/repository.txt","") to 
    dump the entire repository in human readable format to file /tmp/repository.  

     

     

    >>>>>>2)      How can I persuade Liberty Profile to accept both short Name and full qualified name during Jython start/stop action?
    Each Liberty server is uniquely identified in the collective with the triplet:  hostName, userdir, serverName.   This triplet is established when the Liberty server is joined to the collective.
    You must specify this triplet on the start/stop action to identify the Liberty server to which the action applies.    

     

    >>>>>>3)      How can I persuade Liberty Profile to register the Host with Short Name, so it will not interfere with my company DR strategy?

    There is no way to specify both,  however it seems to me you just want to use the short name.   You already specified it in your hostAuth definition.  You still need that.  You need to also specify the short name on the optional --hostName parameter when you join a Liberty server to the collective.  The --hostName value defaults to the fully qualified name.   The --hostName value forms the "hostName" portion of the identity triplet.   If you do this, you will be able to start/stop your Liberty server with the short name.  
  • SolomanBarghouthi
    SolomanBarghouthi
    8 Posts

    Re: Questions on "WAS 8.5.5 Liberty profile Collective" feature

    ‏2013-08-21T22:38:12Z  
    >>>>>>>1)      How can I examine the Liberty Repository to determine which hostname is registered?
    Use the dump operation on the CollectiveRepository MBean. The easiest access to this MBean is through JConsole.  Invoke it with parameters dump("/","/tmp/repository.txt","") to 
    dump the entire repository in human readable format to file /tmp/repository.  

     

     

    >>>>>>2)      How can I persuade Liberty Profile to accept both short Name and full qualified name during Jython start/stop action?
    Each Liberty server is uniquely identified in the collective with the triplet:  hostName, userdir, serverName.   This triplet is established when the Liberty server is joined to the collective.
    You must specify this triplet on the start/stop action to identify the Liberty server to which the action applies.    

     

    >>>>>>3)      How can I persuade Liberty Profile to register the Host with Short Name, so it will not interfere with my company DR strategy?

    There is no way to specify both,  however it seems to me you just want to use the short name.   You already specified it in your hostAuth definition.  You still need that.  You need to also specify the short name on the optional --hostName parameter when you join a Liberty server to the collective.  The --hostName value defaults to the fully qualified name.   The --hostName value forms the "hostName" portion of the identity triplet.   If you do this, you will be able to start/stop your Liberty server with the short name.  
    Thank you. It is very helpful.  I will follow your recommendation and remove and join the collective member again. Just curious, do we have way to update host info instead of going thru entire exercise again? Just for argument sake, what is going to happen if some of the cluster members in same machine are joining without specify the name and some members joined with short name?
     
     
  • SolomanBarghouthi
    SolomanBarghouthi
    8 Posts

    Re: Questions on "WAS 8.5.5 Liberty profile Collective" feature

    ‏2013-08-21T22:38:57Z  
    Thank you. It is very helpful.  I will follow your recommendation and remove and join the collective member again. Just curious, do we have way to update host info instead of going thru entire exercise again? Just for argument sake, what is going to happen if some of the cluster members in same machine are joining without specify the name and some members joined with short name?
     
     
    There is no API to update a collective member.  You can only remove and join again.  If some of your cluster members are registered with long name and others with short name,  the following statements are true:
     
    The ClusterManager MBean start/stop operations will work normally because they use the hostName given to each member to do the start/stop.
    Starting/stopping individual cluster members through the ServerCommand MBean start/stop operations will require you to specify long or short host name, depending on how server was defined. 
     
    If is probably more rational  to use all long or short names for members in the same cluster.