[Debian-ha-commits] [crmsh] 01/01: d/patches: fix crm cluster stop/start on Debian

Valentin Vidic vvidic-guest at moszumanska.debian.org
Fri Oct 20 14:09:26 UTC 2017


This is an automated email from the git hooks/post-receive script.

vvidic-guest pushed a commit to branch master
in repository crmsh.

commit 9081594e3084414927b5f42b059b9e65bf8d7986
Author: Valentin Vidic <Valentin.Vidic at CARNet.hr>
Date:   Fri Oct 20 15:28:09 2017 +0200

    d/patches: fix crm cluster stop/start on Debian
    
    Corosync remains running after 'crm cluster stop'.
    Don't rely on systemd service dependencies to stop it
    and also make it work with sysv init.
---
 debian/patches/0014-Fix-cluster-stop-start.patch | 35 ++++++++++++++++++++++++
 debian/patches/series                            |  1 +
 2 files changed, 36 insertions(+)

diff --git a/debian/patches/0014-Fix-cluster-stop-start.patch b/debian/patches/0014-Fix-cluster-stop-start.patch
new file mode 100644
index 0000000..0dcebf5
--- /dev/null
+++ b/debian/patches/0014-Fix-cluster-stop-start.patch
@@ -0,0 +1,35 @@
+Description: Fix crm cluster stop/start on Debian
+ Corosync remains running after 'crm cluster stop'.
+ Don't rely on systemd service dependencies to stop it
+ and also make it work with sysv init.
+Author: Valentin Vidic <Valentin.Vidic at CARNet.hr>
+Last-Update: 2017-10-20
+--- a/crmsh/ui_cluster.py
++++ b/crmsh/ui_cluster.py
+@@ -62,9 +62,14 @@
+         '''
+         Starts the cluster services on this node
+         '''
++        rc, out, err = utils.get_stdout_stderr('service corosync start')
++        if rc != 0:
++            context.fatal_error("Failed to start corosync service: %s" % (err))
++
+         rc, out, err = utils.get_stdout_stderr('service pacemaker start')
+         if rc != 0:
+             context.fatal_error("Failed to start pacemaker service: %s" % (err))
++
+         err_buf.info("Cluster services started")
+ 
+         # TODO: optionally start services on all nodes or specific node
+@@ -77,6 +82,11 @@
+         rc, out, err = utils.get_stdout_stderr('service pacemaker stop')
+         if rc != 0:
+             context.fatal_error("Failed to stop pacemaker service: %s" % (err))
++
++        rc, out, err = utils.get_stdout_stderr('service corosync stop')
++        if rc != 0:
++            context.fatal_error("Failed to stop corosync service: %s" % (err))
++
+         err_buf.info("Cluster services stopped")
+ 
+         # TODO: optionally stop services on all nodes or specific node
diff --git a/debian/patches/series b/debian/patches/series
index dd9aa4f..3d4cfc8 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -7,3 +7,4 @@
 0011-Fix-scripts-init.patch
 0012-Fix-crm-history.patch
 0013-Fix-cluster-bootstrap.patch
+0014-Fix-cluster-stop-start.patch

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-ha/crmsh.git



More information about the Debian-HA-Commits mailing list