]> git.proxmox.com Git - pve-guest-common.git/commitdiff
fix previous commit
authorDietmar Maurer <dietmar@proxmox.com>
Wed, 28 Jun 2017 10:05:18 +0000 (12:05 +0200)
committerDietmar Maurer <dietmar@proxmox.com>
Wed, 28 Jun 2017 10:05:18 +0000 (12:05 +0200)
PVE/ReplicationState.pm

index 1e74809a00999f2d7a6d03070c72dd1eedb1a160..09f628313954992a6ef4fbbebe918797be5c56ea 100644 (file)
@@ -319,10 +319,12 @@ sub get_next_job {
 
 sub schedule_job_now {
     my ($jobcfg) = @_;
+
     PVE::GuestHelpers::guest_migration_lock($jobcfg->{guest}, undef, sub {
        PVE::Tools::lock_file($state_lock, 10, sub {
            my $stateobj = read_state();
            my $vmid = $jobcfg->{guest};
+           my $plugin = PVE::ReplicationConfig->lookup($jobcfg->{type});
            my $tid = $plugin->get_unique_target_id($jobcfg);
            # no not modify anything if there is no state
            return if !defined($stateobj->{$vmid}->{$tid});