def initiate
      primary, *secondaries = @nodes.shuffle

      primary.promote
      secondaries.each(&:demote)

      return primary, secondaries
    end
def initiate
      primary, *secondaries = @nodes.shuffle

      primary.promote
      secondaries.each(&:demote)

      return primary, secondaries
    end
Pick a node to be master, and mark the rest as secondary