From: "Fabian Grünbichler" <f.gruenbichler@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [pve-devel] [PATCH manager 3/3] replication: check for source == target on job creation
Date: Tue, 11 Aug 2020 14:31:11 +0200 [thread overview]
Message-ID: <20200811123111.167428-1-f.gruenbichler@proxmox.com> (raw)
In-Reply-To: <20200811123026.162364-1-f.gruenbichler@proxmox.com>
and die.
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
---
PVE/API2/ReplicationConfig.pm | 3 +++
1 file changed, 3 insertions(+)
diff --git a/PVE/API2/ReplicationConfig.pm b/PVE/API2/ReplicationConfig.pm
index 4a25a92b..aea3bff3 100644
--- a/PVE/API2/ReplicationConfig.pm
+++ b/PVE/API2/ReplicationConfig.pm
@@ -131,6 +131,9 @@ __PACKAGE__->register_method ({
$param->{source} //= $source;
+ die "Source and target must not be identical\n"
+ if $param->{target} eq $source;
+
my $guest_class = $PVE::API2::Replication::lookup_guest_class->($guest_info->{type});
my $guest_conf = $guest_class->load_config($guest, $source);
my $rep_volumes = $guest_class->get_replicatable_volumes(PVE::Storage::config(), $guest, $guest_conf, 0, 0);
--
2.20.1
next prev parent reply other threads:[~2020-08-11 12:31 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-08-11 12:30 [pve-devel] [PATCH manager 1/3] replication: refactor source checks " Fabian Grünbichler
2020-08-11 12:30 ` [pve-devel] [PATCH manager 2/3] replication: target is a required parameter Fabian Grünbichler
2020-08-11 12:31 ` Fabian Grünbichler [this message]
2020-08-20 13:27 ` [pve-devel] applied-series: [PATCH manager 1/3] replication: refactor source checks on job creation Thomas Lamprecht
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200811123111.167428-1-f.gruenbichler@proxmox.com \
--to=f.gruenbichler@proxmox.com \
--cc=pve-devel@lists.proxmox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.