From 82662dc83a73c6cfd85da93f0012b8c07b0a8fdb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabian=20Gr=C3=BCnbichler?= Date: Fri, 5 Jul 2019 14:44:09 +0200 Subject: [PATCH] 5to6: make corosync totem checks more verbose MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit to avoid just printing the subheader with no results Signed-off-by: Fabian Grünbichler --- PVE/CLI/pve5to6.pm | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/PVE/CLI/pve5to6.pm b/PVE/CLI/pve5to6.pm index edcddaaa..2724e33d 100644 --- a/PVE/CLI/pve5to6.pm +++ b/PVE/CLI/pve5to6.pm @@ -395,15 +395,23 @@ sub check_cluster_corosync { my $totem = $conf->{main}->{totem}; my $transport = $totem->{transport}; if (defined($transport)) { - log_fail("Corosync transport explicitly set to '$transport' instead of implicit default!"); + if ($transport ne 'knet') { + log_fail("Corosync transport explicitly set to '$transport' instead of implicit default!"); + } else { + log_pass("Corosync transport set to '$transport'."); + } + } else { + log_pass("Corosync transport set to implicit default."); } if ((!defined($totem->{secauth}) || $totem->{secauth} ne 'on') && (!defined($totem->{crypto_cipher}) || $totem->{crypto_cipher} eq 'none')) { log_fail("Corosync authentication/encryption is not explicitly enabled (secauth / crypto_cipher / crypto_hash)!"); - } - - if (defined($totem->{crypto_cipher}) && $totem->{crypto_cipher} eq '3des') { - log_fail("Corosync encryption cipher set to '3des', no longer supported in Corosync 3.x!"); + } else { + if (defined($totem->{crypto_cipher}) && $totem->{crypto_cipher} eq '3des') { + log_fail("Corosync encryption cipher set to '3des', no longer supported in Corosync 3.x!"); + } else { + log_pass("Corosync encryption and authentication enabled."); + } } print "\n";