replica_primary: Check for persistent primary node
Explicit usage of python2 in shebang