7 Replies Latest reply on Jul 1, 2005 11:27 AM by Luca Comodi

    Leave/Join Partition

    Luca Comodi Newbie

      In a mixed architecture (here an example):

      [HostA, HostB are Jboss instance on separated machine and Part1, Part2, Part3 are Jboss defined partitions]

      HostA: member of Part1 and Part2
      HostB: member of Part1 and Part3

      How can HostA leave Part2 and join Part3?
      Is there a not-standard way to define partitions?

      Here an example of Part1 configuration file:

      
      <server>
       <classpath codebase="lib" archives="jbossha.jar"/>
      
       <mbean code="org.jboss.ha.framework.server.ClusterPartition"
       name="jboss:service=Part1Partition">
      
       <!-- Name of the partition being built -->
       <attribute name="PartitionName">Part1Partition</attribute>
       <!-- The address used to determine the node name -->
       <attribute name="NodeAddress">${jboss.bind.address}</attribute>
       <!-- Determine if deadlock detection is enabled -->
       <attribute name="DeadlockDetection">False</attribute>
      
       <!-- Time in milliseconds to wait for state to be transferred -->
       <attribute name="StateTransferTimeout">60000</attribute>
      
       <!-- The JGroups protocol configuration -->
       <attribute name="PartitionConfig">
       <Config>
      
       <UDP mcast_addr="228.1.2.5" mcast_port="45569" bind_addr="192.168.20.102"
       ip_ttl="32" ip_mcast="true"
       mcast_send_buf_size="800000" mcast_recv_buf_size="150000"
       ucast_send_buf_size="800000" ucast_recv_buf_size="150000"
       loopback="true" />
       <PING timeout="2000" num_initial_members="3"
       up_thread="true" down_thread="true" />
       <MERGE2 min_interval="10000" max_interval="20000" />
       <FD shun="true" up_thread="true" down_thread="true"
       timeout="2500" max_tries="5" />
       <VERIFY_SUSPECT timeout="3000" num_msgs="3"
       up_thread="true" down_thread="true" />
       <pbcast.NAKACK gc_lag="50" retransmit_timeout="300,600,1200,2400,4800"
       max_xmit_size="8192"
       up_thread="true" down_thread="true" />
       <UNICAST timeout="300,600,1200,2400,4800" window_size="100" min_threshold="10"
       down_thread="true" />
       <pbcast.STABLE desired_avg_gossip="20000"
       up_thread="true" down_thread="true" />
       <FRAG frag_size="8192"
       down_thread="true" up_thread="true" />
       <pbcast.GMS join_timeout="5000" join_retry_timeout="2000"
       shun="true" print_local_addr="true" />
       <pbcast.STATE_TRANSFER up_thread="true" down_thread="true" />
       </Config>
       </attribute>
      
       </mbean>
      </server>
      
      


      Thanks for collaboration! :-)

      L.

        • 1. Re: Leave/Join Partition
          Bela Ban Master

          You'd need to do the following:
          - get a hold of the ClusterPartition MBean on host A (Part2)
          - Call stop()
          - Change the configuration (setPartitionConfig()) to point to Part3, e.g. different mcast address/port etc
          - Call start()

          • 2. Re: Leave/Join Partition
            Luca Comodi Newbie

            1st of all: really thanks for your answer!

            [and now: sorry for the newbie reply... :-) ]

            Intro: I'm using Jboss 3.2.5 (yes i know it's a little bit old but i must use this version)

            Is it possible that up to now i never use the ClusterPartition MBean?

            How can i "bind" my current partition (for example Part2) to the ClusterPartition MBean? In order to use the useful (sounds great) setPartitionConfig() method?

            sorry for my "scolastic" english and if my question is not clear please tell me, i'll be happy to give you all details.

            • 3. Re: Leave/Join Partition
              Bela Ban Master

              I suggest read up a bit on JMX (all JBoss docu is free), then it will become clear

              • 4. Re: Leave/Join Partition
                Luca Comodi Newbie

                bela thanks again!

                after better reading the docu i realize that i made a really newbie question ;-)

                after that..

                with setPartitionConfig() to make possible a node leaving a partition and joining another i must change: mcast_addr and mcast_port... but...
                (i think) i must also use setPartitionName() right?


                My dubt now is, using setPartitionConfig() and setPartitionName() i "alter" an already existing ClusterPartition MBean named for example Part2 changing its propreties to point to another partition. In this way the partition name change but the mbean name remain the same.. right?
                (is the only way for leave/join partition?)

                Really thanks again,

                L.

                • 5. Re: Leave/Join Partition
                  Bela Ban Master

                  I wouldn't change the partition name, because this has to be changed in other MBeans (which depend on it) too. Simply changing the mcast address and/or port helps

                  • 6. Re: Leave/Join Partition
                    Luca Comodi Newbie



                    When i try to restart the partition i get this error:

                    ERROR [ProtocolStack] no down protocol available !


                    any ideas?

                    • 7. Re: Leave/Join Partition
                      Luca Comodi Newbie

                       

                      When i try to restart the partition i get this error:

                      Quote:
                      ERROR [ProtocolStack] no down protocol available !


                      any ideas?


                      Probably i find the solution: the correct sequence is: Stop --> Create --> Start