Fixing versioning issue

Added a line to wait for the replication to become active
Replaced set_server_role with set_server_roles method,
Fixed issue with set_replication_host.