service crash after update fro 1.2.8 to 1.2.9
m3rlinux opened this issue · 4 comments
m3rlinux commented
m3rlinux commented
I solved temporarely creating manually a relative full path:
mkdir var/robotmk/<agent_hostname>
m3rlinux commented
Finally I had fixed by adding the 1051 line to the file local/lib/python3/cmk/base/plugins/agent_based/robotmk.py:
1048 def save_htmllog(dir, logname, raw_html):
1049 filename = "%s/%s" % (dir, logname)
1050 try:
1051 os.makedirs(os.path.dirname(filename), exist_ok=True)
1052 with open(filename, 'w') as f:
1053 f.write(raw_html)
1054 except Exception:
1055 raise MKGeneralException("Robotmk failed to save the log file %s" % filename)
simonmeggle commented
Hi, thanks for reporting this.
My fault was to rely on the directory creation during the discovery.
(Quick fix would be a tabula rasa discovery).
I will fix that tomorrow.
simonmeggle commented
Done in #201 , sorry for the delay.