def on_joining_cluster(self, cluster_view): join_cassandra_cluster(cluster_view, "/etc/cassandra/cassandra.yaml", "/etc/cassandra/cassandra-rackdc.properties", self._ip, self._local_site) if (self._ip == sorted(cluster_view.keys())[0]): _log.debug("Adding Memento schema") run_command("/usr/share/clearwater/cassandra-schemas/memento.sh") _log.debug("Clearing Cassandra not-clustered alarm") issue_alarm(constants.CLEAR_CASSANDRA_NOT_YET_CLUSTERED)
def on_joining_cluster(self, cluster_view): join_cassandra_cluster(cluster_view, "/etc/cassandra/cassandra.yaml", "/etc/cassandra/cassandra-rackdc.properties", self._ip, self._local_site) if (self._ip == sorted(cluster_view.keys())[0]): _log.debug("Adding Homestead schema") run_command( "/usr/share/clearwater/cassandra-schemas/homestead_cache.sh") run_command( "/usr/share/clearwater/cassandra-schemas/homestead_provisioning.sh" ) _log.debug("Clearing Cassandra not-clustered alarm") issue_alarm(alarm_constants.CASSANDRA_NOT_YET_CLUSTERED_CLEARED)
def on_joining_cluster(self, cluster_view): join_cassandra_cluster(cluster_view, "/etc/cassandra/cassandra.yaml", "/etc/cassandra/cassandra-rackdc.properties", self._ip, self._local_site) if (self._ip == sorted(cluster_view.keys())[0]): # The schema could have been lost, or not installed due to cassandra # not running. Add it now to one of the Homers. _log.debug("Adding Homer schema") run_command("/usr/share/clearwater/cassandra-schemas/homer.sh") _log.debug("Clearing Cassandra not-clustered alarm") issue_alarm(alarm_constants.CASSANDRA_NOT_YET_CLUSTERED_CLEARED)
def on_cluster_changing(self, cluster_view): if self._remote_site != "": write_memcached_cluster_settings("/etc/clearwater/remote_cluster_settings", cluster_view) run_command("/usr/share/clearwater/bin/reload_memcached_users")
def on_new_cluster_config_ready(self, cluster_view): run_command("service astaire reload") run_command("service astaire wait-sync")
def on_cluster_changing(self, cluster_view): write_memcached_cluster_settings("/etc/clearwater/memento_cluster_settings", cluster_view) run_command("/usr/share/clearwater/bin/reload_memcached_users")
def on_new_cluster_config_ready(self, cluster_view): _log.debug("Started running Chronos resynchronization") run_command("service chronos resync") run_command("service chronos wait-sync") _log.debug("Finished running Chronos resynchronization")
def on_cluster_changing(self, cluster_view): _log.debug("Ralf's Chronos cluster is changing") write_chronos_cluster_settings("/etc/chronos/chronos_cluster.conf", cluster_view, self.local_server) run_command("service chronos reload")