> On June 9, 2017 at 11:17 AM Fabian Grünbichler <f.gruenbich...@proxmox.com>
> wrote:
> 
> 
> On Fri, Jun 09, 2017 at 08:19:47AM +0200, Wolfgang Link wrote:
> > ---
> >  PVE/ReplicationConfig.pm | 14 ++++++++++++++
> >  1 file changed, 14 insertions(+)
> > 
> > diff --git a/PVE/ReplicationConfig.pm b/PVE/ReplicationConfig.pm
> > index 01e7206..b4f0fe9 100644
> > --- a/PVE/ReplicationConfig.pm
> > +++ b/PVE/ReplicationConfig.pm
> > @@ -209,6 +209,20 @@ sub check_for_existing_jobs {
> >      return undef;
> >  }
> >  
> > +sub get_jobid {
> > +    my ($cfg, $vmid, $target) = @_;
> > +
> > +    foreach my $id (keys %{$cfg->{ids}}) {
> > +   my $data = $cfg->{ids}->{$id};
> > +
> > +   if ($data->{target} eq $target) {
> > +       return $id;
> > +   }
> > +    }
> > +
> > +    return undef;
> > +}
> 
> doesn't this return the first job which has this target node? and not
> the only job which has this guest ID and target node?

We may also have different replication job types in future, and not all
of them have a 'target' property...

_______________________________________________
pve-devel mailing list
pve-devel@pve.proxmox.com
https://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel

Reply via email to