]> git.proxmox.com Git - qemu-server.git/commitdiff
vzdump: reword "master-key but no encryption key" message
authorThomas Lamprecht <t.lamprecht@proxmox.com>
Wed, 5 Jul 2023 16:25:21 +0000 (18:25 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Thu, 6 Jul 2023 13:39:30 +0000 (15:39 +0200)
.. and make it use a warn level, which can then also mark the whole
task as potentially problematic as with a new enough pve-guest-common
the REST environment worker warn counters are then increased.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
PVE/VZDump/QemuServer.pm

index 3c4ba52821ce1393ba6639343759d63661457bd8..d0d9240b8dd41e3020200bedb94cc76e7b597be3 100644 (file)
@@ -539,8 +539,14 @@ sub archive_pbs {
            my $encryption_fp = $scfg->{'encryption-key'};
            die "encryption configured ('$encryption_fp') but no encryption key file found!\n"
                if $encryption_fp;
-           $self->loginfo("WARNING: backup target is configured with master key, but this backup is not encrypted - master key settings will be ignored!")
-               if defined($master_keyfile) && -e $master_keyfile;
+
+           if (-e $master_keyfile) {
+               $self->log(
+                   'warn',
+                   "backup target storage is configured with master-key, but no encryption key set!"
+                   ." Ignoring master key settings and creating unencrypted backup."
+               );
+           }
        }
 
        push @$cmd, "qemu-server.conf:$conffile";
@@ -619,8 +625,13 @@ sub archive_pbs {
            my $encryption_fp = $scfg->{'encryption-key'};
            die "encryption configured ('$encryption_fp') but no encryption key file found!\n"
                if $encryption_fp;
-           $self->loginfo("WARNING: backup target is configured with master key, but this backup is not encrypted - master key settings will be ignored!")
-               if defined($master_keyfile) && -e $master_keyfile;
+           if (-e $master_keyfile) {
+               $self->log(
+                   'warn',
+                   "backup target storage is configured with master-key, but no encryption key set!"
+                   ." Ignoring master key settings and creating unencrypted backup."
+               );
+           }
            $params->{encrypt} = JSON::false;
        }