Zookeeper failover:

Before the controller performs a set of related
operations (e.g. source learning, arp learning),
it would create a znode at zookeeper for failover
logging. After the operations are finished, the
znode created will be deleted.
If the controller crashes in the middle of carrying
out operations, the backup controller will read
information from the znode and take over the task.
We make each operation idempotent, so that all
operations can be performed several times without
changing the final result.