]> git.proxmox.com Git - pve-guest-common.git/commitdiff
replication: replicate_volume: rate can be undefined
authorWolfgang Bumiller <w.bumiller@proxmox.com>
Wed, 14 Jun 2017 08:23:51 +0000 (10:23 +0200)
committerDietmar Maurer <dietmar@proxmox.com>
Mon, 19 Jun 2017 07:58:08 +0000 (09:58 +0200)
as it is optional in which case we want to pass undef to
stogae_migrate

PVE/Replication.pm

index bae4c739d8fdccdf4f1fd79141a77bd17395c974..ed8d07b3538bafd7d49fdcd0c733b3d45928f360 100644 (file)
@@ -111,7 +111,7 @@ sub replicate_volume {
 
     my ($storeid, $volname) = PVE::Storage::parse_volume_id($volid);
 
-    my $ratelimit_bps = int(1000000*$rate);
+    my $ratelimit_bps = int(1000000*$rate) if $rate;
     PVE::Storage::storage_migrate($storecfg, $volid, $ssh_info, $storeid, $volname,
                                  $base_snapshot, $sync_snapname, $ratelimit_bps, $insecure);
 }