all lists on lists.proxmox.com
 help / color / mirror / Atom feed
From: Maximiliano Sandoval <m.sandoval@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [pve-devel] [PATCH guest-common 1/2] replication: follow datacenter replication options
Date: Thu, 12 Jun 2025 15:29:50 +0200	[thread overview]
Message-ID: <20250612132951.449798-3-m.sandoval@proxmox.com> (raw)
In-Reply-To: <20250612132951.449798-1-m.sandoval@proxmox.com>

If set, otherwise we fall back to migration settings which was the
previous behavior.

Signed-off-by: Maximiliano Sandoval <m.sandoval@proxmox.com>
---
 src/PVE/Replication.pm | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/src/PVE/Replication.pm b/src/PVE/Replication.pm
index 20c3485..1c2eac5 100644
--- a/src/PVE/Replication.pm
+++ b/src/PVE/Replication.pm
@@ -255,7 +255,10 @@ sub replicate {
 
     my $migration_network;
     my $migration_type = 'secure';
-    if (my $mc = $dc_conf->{migration}) {
+    if (my $rc = $dc_conf->{replication}) {
+	$migration_network = $rc->{network};
+	$migration_type = $rc->{type} if defined($rc->{type});
+    } elsif (my $mc = $dc_conf->{migration}) {
 	$migration_network = $mc->{network};
 	$migration_type = $mc->{type} if defined($mc->{type});
     }
-- 
2.39.5



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


  parent reply	other threads:[~2025-06-12 13:30 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-06-12 13:29 [pve-devel] [PATCH cluster/guest-common 0/3] add datacenter replication option Maximiliano Sandoval
2025-06-12 13:29 ` [pve-devel] [PATCH cluster 1/1] datacenter config: add replication settings Maximiliano Sandoval
2025-07-16 14:02   ` [pve-devel] applied: " Thomas Lamprecht
2025-06-12 13:29 ` Maximiliano Sandoval [this message]
2025-07-17 19:47   ` [pve-devel] applied: [PATCH guest-common 1/2] replication: follow datacenter replication options Thomas Lamprecht
2025-06-12 13:29 ` [pve-devel] [PATCH guest-common 2/2] replication: Add used network to log output Maximiliano Sandoval
2025-07-17 19:47   ` [pve-devel] applied: " 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=20250612132951.449798-3-m.sandoval@proxmox.com \
    --to=m.sandoval@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.
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal