Skip to content

Commit dc25b89

Browse files
committed
18130 Fix deletion of hosts with hostname "."
When upgrading to 2.3.0, the update process will warn you about invalid hostnames present in your configuration. These hostnames must be removed before you can upgrade to 2.3.0. In the case of hostnames "." and "..", the deletion process would crash. With this werk, we fix the deletion of these hostnames to allow the update process to complete successfully. SUP-23656 Change-Id: I30fb8ed221675eb79abfa80147fb2529f517a9ec
1 parent f0a0253 commit dc25b89

2 files changed

Lines changed: 20 additions & 0 deletions

File tree

.werks/18130

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
Title: Fix deletion of hosts with hostname "."
2+
Class: fix
3+
Compatible: compat
4+
Component: wato
5+
Date: 1753777396
6+
Edition: cre
7+
Level: 1
8+
Version: 2.2.0p45
9+
10+
When upgrading to 2.3.0, the update process will warn you about invalid
11+
hostnames present in your configuration. These hostnames must be removed
12+
before you can upgrade to 2.3.0.
13+
14+
In the case of hostnames "." and "..", the deletion process would crash.
15+
16+
With this werk, we fix the deletion of these hostnames to allow the
17+
update process to complete successfully.

cmk/base/automations/check_mk.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1070,6 +1070,9 @@ def _delete_host_files(self, hostname: HostName) -> None:
10701070
10711071
These files are cleaned up by the disk space mechanism.
10721072
"""
1073+
if hostname in (".", ".."):
1074+
return
1075+
10731076
for path in self._single_file_paths(hostname):
10741077
self._delete_if_exists(path)
10751078

0 commit comments

Comments
 (0)