[pve-devel] [pve-guest-common 1/2] get_jobid
Fabian Grünbichler
f.gruenbichler at proxmox.com
Fri Jun 9 11:17:08 CEST 2017
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?
> +
> package PVE::ReplicationConfig::Cluster;
>
> use base qw(PVE::ReplicationConfig);
> --
> 2.11.0
>
>
> _______________________________________________
> pve-devel mailing list
> pve-devel at pve.proxmox.com
> https://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
More information about the pve-devel
mailing list