nodeLeave Event
This event is triggered when a node leaves the cluster, is expelled, or shut down.
The processing of this event is similar to the diskFailure event, except that disks may not already be marked as Down when this event is received. Note that a diskFailure event can still be generated based on an I/O activity in the cluster. If it is generated, no action will be taken by the diskFailure event handler if the owning node is also down, thereby allowing the nodeLeave event to control the recovery. In most cases, the disk state could be ready/up if no I/O operation has been performed or ready/down. However, based on prior events the state could be suspended/down or unrecovered/recovering.
Recovery process
- Wait for the specified duration to give the failed nodes a chance to recover.
- Check the Down nodes count, Down disks count and available data and metadata FG count to check against the maximum limit.
- Build a list of disk to act upon, ignoring suspended, empty, to be emptied.
- Run tsrestripefs to restore replica count to the stated values.
- After successful completion, disks can be in the suspended/down state or no action may be taken if the nodeJoin event is triggered within the recoveryWaitPeriod.