[pve-devel] [PATCH v1 master ceph 2/2] provide another fix that silences invalid escape sequence warning

Max R. Carrara m.carrara at proxmox.com
Thu Jul 17 17:36:25 CEST 2025


See the added patch for additional details.

Signed-off-by: Max R. Carrara <m.carrara at proxmox.com>
---
 ...-zabbix-fix-invalid-escape-sequences.patch | 29 +++++++++++++++++++
 patches/series                                |  1 +
 2 files changed, 30 insertions(+)
 create mode 100644 patches/0061-mgr-zabbix-fix-invalid-escape-sequences.patch

diff --git a/patches/0061-mgr-zabbix-fix-invalid-escape-sequences.patch b/patches/0061-mgr-zabbix-fix-invalid-escape-sequences.patch
new file mode 100644
index 0000000000..9c405d28e1
--- /dev/null
+++ b/patches/0061-mgr-zabbix-fix-invalid-escape-sequences.patch
@@ -0,0 +1,29 @@
+From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
+From: "Max R. Carrara" <m.carrara at proxmox.com>
+Date: Thu, 17 Jul 2025 17:20:08 +0200
+Subject: [PATCH 61/61] mgr/zabbix: fix invalid escape sequences
+
+Even though the `zabbix` module is deprecated and will be removed
+soon [1], fix the warning regarding invalid escape sequences here
+also, as it might look scary for some users.
+
+[1]: https://github.com/ceph/ceph/pull/57299
+
+Signed-off-by: Max R. Carrara <m.carrara at proxmox.com>
+---
+ src/pybind/mgr/zabbix/module.py | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/pybind/mgr/zabbix/module.py b/src/pybind/mgr/zabbix/module.py
+index 638b688562f..2e348ab0391 100644
+--- a/src/pybind/mgr/zabbix/module.py
++++ b/src/pybind/mgr/zabbix/module.py
+@@ -131,7 +131,7 @@ class Module(MgrModule):
+         self._zabbix_hosts = list()
+         servers = cast(str, self.config['zabbix_host']).split(",")
+         for server in servers:
+-            uri = re.match("(?:(?:\[?)([a-z0-9-\.]+|[a-f0-9:\.]+)(?:\]?))(?:((?::))([0-9]{1,5}))?$", server)
++            uri = re.match(r"(?:(?:\[?)([a-z0-9-\.]+|[a-f0-9:\.]+)(?:\]?))(?:((?::))([0-9]{1,5}))?$", server)
+             if uri:
+                 zabbix_host, sep, opt_zabbix_port = uri.groups()
+                 if sep == ':':
diff --git a/patches/series b/patches/series
index d6c765677d..a2e222551c 100644
--- a/patches/series
+++ b/patches/series
@@ -54,3 +54,4 @@
 0058-pybind-mgr-restful-provide-workaround-for-PyO3-Impor.patch
 0059-mgr-fix-module-import-by-making-NOTIFY_TYPES-in-py-m.patch
 0060-mgr-osd_perf_query-fix-ivalid-escape-sequence.patch
+0061-mgr-zabbix-fix-invalid-escape-sequences.patch
-- 
2.39.5





More information about the pve-devel mailing list