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 20D701FF165 for ; Thu, 22 May 2025 18:19:29 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id BEAF0A3C2; Thu, 22 May 2025 18:17:57 +0200 (CEST) From: Stefan Hanreich To: pve-devel@lists.proxmox.com Date: Thu, 22 May 2025 18:16:48 +0200 Message-Id: <20250522161731.537011-33-s.hanreich@proxmox.com> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20250522161731.537011-1-s.hanreich@proxmox.com> References: <20250522161731.537011-1-s.hanreich@proxmox.com> MIME-Version: 1.0 X-SPAM-LEVEL: Spam detection results: 0 AWL -0.227 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 KAM_LAZY_DOMAIN_SECURITY 1 Sending domain does not have any anti-forgery methods RDNS_NONE 0.793 Delivered to internal network by a host with no rDNS SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_NONE 0.001 SPF: sender does not publish an SPF Record Subject: [pve-devel] [PATCH pve-cluster v3 1/1] cfs: add fabrics.cfg to observed files 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" In a previous commit we already added the openfabric / ospf configuration files, but the configuration format changed since then, so we replace them with the single configuration file used by the fabrics now. Also add a postinst script that removes the leftover folder from that change. Signed-off-by: Stefan Hanreich --- debian/pve-cluster.postinst | 24 ++++++++++++++++++++++++ src/PVE/Cluster.pm | 3 +-- src/pmxcfs/status.c | 3 +-- 3 files changed, 26 insertions(+), 4 deletions(-) create mode 100644 debian/pve-cluster.postinst diff --git a/debian/pve-cluster.postinst b/debian/pve-cluster.postinst new file mode 100644 index 0000000..5ca091d --- /dev/null +++ b/debian/pve-cluster.postinst @@ -0,0 +1,24 @@ +#!/bin/sh + +set -e + +remove_fabrics_directory() { + LEGACY_FABRICS_DIRECTORY="/etc/pve/sdn/fabrics/" + + if test -d "$LEGACY_FABRICS_DIRECTORY"; then + echo "Removing legacy sdn fabrics directory ..." + rm -d $LEGACY_FABRICS_DIRECTORY || echo "Failed to remove legacy sdn folder ${LEGACY_FABRICS_DIRECTORY}!" + fi +} + +case "$1" in + configure) + # TODO: remove with PVE 10+ + if dpkg --compare-versions "$2" 'lt' '9.0.0'; then + remove_fabrics_directory + fi + ;; +esac + +exit 0 + diff --git a/src/PVE/Cluster.pm b/src/PVE/Cluster.pm index 0c78e65..d400620 100644 --- a/src/PVE/Cluster.pm +++ b/src/PVE/Cluster.pm @@ -81,8 +81,7 @@ my $observed = { 'sdn/pve-ipam-state.json' => 1, 'sdn/mac-cache.json' => 1, 'sdn/dns.cfg' => 1, - 'sdn/fabrics/openfabric.cfg' => 1, - 'sdn/fabrics/ospf.cfg' => 1, + 'sdn/fabrics.cfg' => 1, 'sdn/.running-config' => 1, 'virtual-guest/cpu-models.conf' => 1, 'virtual-guest/profiles.cfg' => 1, diff --git a/src/pmxcfs/status.c b/src/pmxcfs/status.c index cda3921..2a2f673 100644 --- a/src/pmxcfs/status.c +++ b/src/pmxcfs/status.c @@ -110,8 +110,7 @@ static memdb_change_t memdb_change_array[] = { { .path = "sdn/mac-cache.json" }, { .path = "sdn/pve-ipam-state.json" }, { .path = "sdn/dns.cfg" }, - { .path = "sdn/fabrics/openfabric.cfg" }, - { .path = "sdn/fabrics/ospf.cfg" }, + { .path = "sdn/fabrics.cfg" }, { .path = "sdn/.running-config" }, { .path = "virtual-guest/cpu-models.conf" }, { .path = "virtual-guest/profiles.cfg" }, -- 2.39.5 _______________________________________________ pve-devel mailing list pve-devel@lists.proxmox.com https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel