def __init__(self, params): self._ip = params.ip self._local_site = params.local_site self._sig_namespace = params.signaling_namespace _log.debug("Raising Cassandra not-clustered alarm") issue_alarm(constants.RAISE_CASSANDRA_NOT_YET_CLUSTERED) pdlogs.NOT_YET_CLUSTERED_ALARM.log(cluster_desc=self.cluster_description())
def __init__(self, params): self._ip = params.ip self._local_site = params.local_site self._sig_namespace = params.signaling_namespace self._key = params.etcd_key _log.debug("Raising Cassandra not-clustered alarm") issue_alarm(alarm_constants.CASSANDRA_NOT_YET_CLUSTERED_MAJOR) pdlogs.NOT_YET_CLUSTERED_ALARM.log( cluster_desc=self.cluster_description())
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]): # 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_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_leaving_cluster(self, cluster_view): issue_alarm(constants.RAISE_CASSANDRA_NOT_YET_DECOMMISSIONED) leave_cassandra_cluster(self._sig_namespace) issue_alarm(constants.CLEAR_CASSANDRA_NOT_YET_DECOMMISSIONED) pass
def on_leaving_cluster(self, cluster_view): issue_alarm(alarm_constants.CASSANDRA_NOT_YET_DECOMMISSIONED_MAJOR) leave_cassandra_cluster(self._sig_namespace) issue_alarm(alarm_constants.CASSANDRA_NOT_YET_DECOMMISSIONED_CLEARED) pass
def on_leaving_cluster(self, cluster_view): issue_alarm(alarm_constants.CASSANDRA_NOT_YET_DECOMMISSIONED_MAJOR) leave_cassandra_cluster(self._sig_namespace) issue_alarm(alarm_constants.CASSANDRA_NOT_YET_DECOMMISSIONED_CLEARED) pass
def __init__(self, params): issue_alarm(constants.RAISE_MEMCACHED_NOT_YET_CLUSTERED) pdlogs.NOT_YET_CLUSTERED_ALARM.log(cluster_desc=self.cluster_description()) self._key = "/clearwater/{}/sprout/clustering/memcached".format(params.local_site)
def on_stable_cluster(self, cluster_view): self.on_cluster_changing(cluster_view) issue_alarm(constants.CLEAR_MEMCACHED_NOT_YET_CLUSTERED)
def __init__(self, params): self.local_server = params.ip self._key = "/{}/{}/{}/clustering/chronos".format(params.etcd_key, params.local_site, params.etcd_cluster_key) issue_alarm(alarm_constants.CHRONOS_NOT_YET_CLUSTERED_MAJOR) pdlogs.NOT_YET_CLUSTERED_ALARM.log(cluster_desc=self.cluster_description())
def on_stable_cluster(self, cluster_view): self.on_cluster_changing(cluster_view) issue_alarm(alarm_constants.CHRONOS_NOT_YET_CLUSTERED_CLEARED)
def on_stable_cluster(self, cluster_view): self.on_cluster_changing(cluster_view) issue_alarm(constants.CLEAR_CHRONOS_NOT_YET_CLUSTERED) _log.debug("Ralf Chronos cluster is stable again")
def __init__(self, params): self.local_server = params.ip self._key = "/clearwater/{}/ralf/clustering/chronos".format(params.local_site) _log.debug("Raising not-clustered alarm") issue_alarm(constants.RAISE_CHRONOS_NOT_YET_CLUSTERED) pdlogs.NOT_YET_CLUSTERED_ALARM.log(cluster_desc=self.cluster_description())
def __init__(self, params): issue_alarm(alarm_constants.MEMCACHED_NOT_YET_CLUSTERED_MAJOR) pdlogs.NOT_YET_CLUSTERED_ALARM.log(cluster_desc=self.cluster_description()) self._key = "/{}/{}/{}/clustering/memcached".format(params.etcd_key, params.local_site, params.etcd_cluster_key)