diff --git a/config.yaml b/config.yaml index 5512936..83da640 100644 --- a/config.yaml +++ b/config.yaml @@ -6,12 +6,6 @@ options: Multicast IP address to use for exchanging messages over the network. If multiple clusters are on the same bindnetaddr network, this value can be changed. - corosync_pcmk_ver: - default: 0 - type: int - description: | - Service version for the Pacemaker service version. This will tell - Corosync how to start pacemaker corosync_key: type: string default: "64RxJNcCkwo8EJYBsaacitUvbQp5AW4YolJi5/2urYZYp2jfLxY+3IUCOaAUJHPle4Yqfy+WBXO0I/6ASSAjj9jaiHVNaxmVhhjcmyBqy2vtPf+m+0VxVjUXlkTyYsODwobeDdO3SIkbIABGfjLTu29yqPTsfbvSYr6skRb9ne0=" diff --git a/hooks/hooks.py b/hooks/hooks.py index a6e9fc8..729962b 100755 --- a/hooks/hooks.py +++ b/hooks/hooks.py @@ -113,14 +113,11 @@ def upgrade_charm(): def restart_corosync(): - if int(utils.config_get('corosync_pcmk_ver')) == 1: - if utils.running("pacemaker"): - utils.stop("pacemaker") - utils.restart("corosync") - time.sleep(2) - utils.start("pacemaker") - else: - utils.restart("corosync") + if utils.running("pacemaker"): + utils.stop("pacemaker") + utils.restart("corosync") + time.sleep(5) + utils.start("pacemaker") HAMARKER = '/var/lib/juju/haconfigured' diff --git a/templates/corosync.conf b/templates/corosync.conf index aa60f32..ea470dc 100644 --- a/templates/corosync.conf +++ b/templates/corosync.conf @@ -45,27 +45,23 @@ totem { } } -amf { - mode: disabled -} - -service { - # Load the Pacemaker Cluster Resource Manager - ver: {{ corosync_pcmk_ver }} - name: pacemaker +quorum { + # Enable and configure quorum subsystem (default: off) + # see also corosync.conf.5 and votequorum.5 + provider: corosync_votequorum + expected_votes: 2 } logging { fileline: off to_stderr: yes - to_logfile: no + to_logfile: yes + logfile: /var/log/cluster/corosync.log to_syslog: yes - syslog_facility: daemon + syslog_facility: daemon debug: off - timestamp: on logger_subsys { - subsys: AMF + subsys: QUORUM debug: off - tags: enter|leave|trace1|trace2|trace3|trace4|trace6 } }