Module: check_mk
Branch: master
Commit: 464e03f18554714a83274bf78c25004e419cfbba
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=464e03f1855471…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Fri Jul 13 13:45:35 2018 +0200
6346 FIX Fixed failed host rename when host is configured as parent on folder level
During host rename an error "TypeError: not all arguments converted during string
formatting" could
occur. This happened when the host was configured in at least one folder as parent.
In such a situation the host was renamed partially. The best way to recover from this
situation
is to activate all pending changes and use the renaming feature again to change the host
back
to it's original name. Then update to at least 1.5.0b9 and try renaming the host
again.
Change-Id: If4581639053ba5eecf2b7f3b876756649bbf8437
---
.werks/6346 | 16 ++++++++++++++++
cmk/gui/watolib.py | 4 ++--
2 files changed, 18 insertions(+), 2 deletions(-)
diff --git a/.werks/6346 b/.werks/6346
new file mode 100644
index 0000000..50b7741
--- /dev/null
+++ b/.werks/6346
@@ -0,0 +1,16 @@
+Title: Fixed failed host rename when host is configured as parent on folder level
+Level: 1
+Component: wato
+Class: fix
+Compatible: compat
+Edition: cre
+State: unknown
+Version: 1.6.0i1
+Date: 1531482119
+
+During host rename an error "TypeError: not all arguments converted during string
formatting" could
+occur. This happened when the host was configured in at least one folder as parent.
+
+In such a situation the host was renamed partially. The best way to recover from this
situation
+is to activate all pending changes and use the renaming feature again to change the host
back
+to it's original name. Then update to at least 1.5.0b9 and try renaming the host
again.
diff --git a/cmk/gui/watolib.py b/cmk/gui/watolib.py
index 65ffe51..f4aed4d 100644
--- a/cmk/gui/watolib.py
+++ b/cmk/gui/watolib.py
@@ -2398,8 +2398,8 @@ class CREFolder(BaseFolder):
if not changed:
return False
- add_change("rename-parent", _("Renamed parent (set in folder) from
%s to %s") %
- (self.path(), oldname, newname),
+ add_change("rename-parent", _("Renamed parent from %s to %s in
folder \"%s\"") %
+ (oldname, newname, self.alias_path()),
obj=self, sites=self.all_site_ids())
self.save_hosts()
self.save()