From: Thomas Lamprecht Date: Wed, 22 Feb 2017 15:59:04 +0000 (+0100) Subject: pvecm add: fix check if corosync alread runs X-Git-Url: https://git.proxmox.com/?p=pve-cluster.git;a=commitdiff_plain;h=cecd0323cc841d0ae2a6395d9e1e6fec6115c93b pvecm add: fix check if corosync alread runs `corosync-quorumtool` exit with 1 (CS_OK) if corosync runs and is quorate. Use `corosync-quorumtool -l` (list nodes) instead, this returns 1 if corosync does not run 0 if corosync runs, independent if a cluster is quorate or not. Signed-off-by: Thomas Lamprecht --- diff --git a/data/PVE/CLI/pvecm.pm b/data/PVE/CLI/pvecm.pm index a704201..c95e8c6 100755 --- a/data/PVE/CLI/pvecm.pm +++ b/data/PVE/CLI/pvecm.pm @@ -509,7 +509,7 @@ __PACKAGE__->register_method ({ die "this host already contains virtual machines - please remove them first\n"; } - if (system("corosync-quorumtool >/dev/null 2>&1") == 0) { + if (system("corosync-quorumtool -l >/dev/null 2>&1") == 0) { die "corosync is already running\n"; } }