[pve-devel] [PATCH pve-cluster v4 1/1] cfs: add fabrics.cfg to observed files
Gabriel Goller
g.goller at proxmox.com
Wed Jul 2 16:50:19 CEST 2025
From: Stefan Hanreich <s.hanreich at proxmox.com>
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 <s.hanreich at proxmox.com>
---
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
More information about the pve-devel
mailing list