From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [212.224.123.68]) by lore.proxmox.com (Postfix) with ESMTPS id 623BB1FF183 for ; Wed, 2 Jul 2025 16:51:47 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 233021E633; Wed, 2 Jul 2025 16:51:31 +0200 (CEST) From: Gabriel Goller To: pve-devel@lists.proxmox.com Date: Wed, 2 Jul 2025 16:50:19 +0200 Message-Id: <20250702145101.894299-35-g.goller@proxmox.com> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20250702145101.894299-1-g.goller@proxmox.com> References: <20250702145101.894299-1-g.goller@proxmox.com> MIME-Version: 1.0 X-SPAM-LEVEL: Spam detection results: 0 AWL -0.019 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 SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record Subject: [pve-devel] [PATCH pve-cluster v4 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" From: Stefan Hanreich 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 000000000000..5ca091db6c26 --- /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 3b1de57e8688..26afcbce06d1 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 0895e53eef0b..0f962a2c6418 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