From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [IPv6:2a01:7e0:0:424::9]) by lore.proxmox.com (Postfix) with ESMTPS id 6D04B1FF17A for ; Fri, 18 Jul 2025 10:12:52 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 2AA2315B54; Fri, 18 Jul 2025 10:13:53 +0200 (CEST) From: Maximiliano Sandoval To: pve-devel@lists.proxmox.com Date: Fri, 18 Jul 2025 10:13:48 +0200 Message-Id: <20250718081349.125228-2-m.sandoval@proxmox.com> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20250718081349.125228-1-m.sandoval@proxmox.com> References: <20250718081349.125228-1-m.sandoval@proxmox.com> MIME-Version: 1.0 X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1752826426836 X-SPAM-LEVEL: Spam detection results: 0 AWL -0.052 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DMARC_MISSING 0.1 Missing DMARC policy KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment POISEN_SPAM_PILL 0.1 Meta: its spam POISEN_SPAM_PILL_1 0.1 random spam to be learned in bayes POISEN_SPAM_PILL_3 0.1 random spam to be learned in bayes SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record URIBL_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to URIBL was blocked. See http://wiki.apache.org/spamassassin/DnsBlocklists#dnsbl-block for more information. [datacenterconfig.pm] Subject: [pve-devel] [PATCH cluster 1/1] datacenter config: Actually write the replication config X-BeenThere: pve-devel@lists.proxmox.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Proxmox VE development discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Proxmox VE development discussion Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: pve-devel-bounces@lists.proxmox.com Sender: "pve-devel" We get the following error without this patch: ``` $ pvesh set /cluster/options 400 validation error in '/etc/pve/datacenter.cfg' replication: type check ('string') failed - got HASH ``` Signed-off-by: Maximiliano Sandoval --- src/PVE/DataCenterConfig.pm | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/PVE/DataCenterConfig.pm b/src/PVE/DataCenterConfig.pm index 3d15643..c6d56c1 100644 --- a/src/PVE/DataCenterConfig.pm +++ b/src/PVE/DataCenterConfig.pm @@ -615,6 +615,10 @@ sub write_datacenter_config { $cfg->{migration} = PVE::JSONSchema::print_property_string($migration, $migration_format); } + if (ref(my $replication = $cfg->{replication})) { + $cfg->{replication} = PVE::JSONSchema::print_property_string($replication, $replication_format); + } + if (defined(my $next_id = $cfg->{'next-id'})) { $next_id = parse_property_string($next_id_format, $next_id) if !ref($next_id); -- 2.39.5 _______________________________________________ pve-devel mailing list pve-devel@lists.proxmox.com https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel