Sorting gmetad cluster information for preventing restarts