主权项 |
1. A method for electing a master blade in a virtual application distribution chassis, the virtual application distribution chassis comprising a plurality of blades, the method comprising:
sending by each blade of the plurality of blades a virtual application distribution chassis message to each of the other blades in the virtual application distribution chassis; determining by each blade whether the virtual application distribution chassis message was received from the master blade within a predetermined period of time; in response to determining that the virtual application distribution chassis message was not received from the master blade within the predetermined period of time, sending a master claim message by each blade to each of the other blades in the virtual application distribution chassis, each master claim message comprising a blade priority for the sending blade and a blade identity of the sending blade; comparing, by a given receiving blade, the blade priority obtained from a first master claim message with the blade priority of the given receiving blade; determining by the given receiving blade that the blade priority obtained from the first master claim message is equal to the blade priority of the given receiving blade; in response to determining that the blade priority obtained from the first master claim message is equal to the blade priority of the given receiving blade, determining whether the blade identity obtained from the first master claim message is numerically smaller than the blade identity of the given receiving blade; in response to determining that the blade identity from the first master claim message is numerically smaller than the blade identity of the given receiving blade, comparing, by a given receiving blade, the blade priority obtained from a second received master claim message with the blade priority of the given receiving blade; and in response to determining that the blade priority of the given receiving blade is either higher than, or the blade priority of the given receiving blade is equal to and the blade identity of the given receiving blade is numerically greater than, the blade priority and the blade identity obtained from the second received master claim message, setting the status of the given receiving blade to the new master blade; and sending by the given receiving blade a second virtual application distribution chassis message to the other blades in the virtual application distribution chassis, the second virtual application distribution chassis message indicating the status of the new master blade of the given receiving blade. |