]> git.proxmox.com Git - pve-manager.git/commitdiff
5to6: make corosync totem checks more verbose
authorFabian Grünbichler <f.gruenbichler@proxmox.com>
Mon, 8 Jul 2019 11:54:09 +0000 (13:54 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Mon, 8 Jul 2019 16:27:23 +0000 (18:27 +0200)
to avoid just printing the subheader with no results

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
(cherry picked from commit c4bc94bb7b019e3c5a4518eda55883bb989146c5)

PVE/CLI/pve5to6.pm

index 0c7efbb1c8af597932e00a1131d63f510036a60d..618f20aaecd584cf380ed98210839ec7b77dfaf8 100644 (file)
@@ -459,15 +459,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";