You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
$ katprep_maintenance -C katprep.auth
File "/usr/local/bin/katprep_maintenance", line 11, in <module>
load_entry_point('katprep==0.5.0', 'console_scripts', 'katprep_maintenance')()
File "build/bdist.linux-x86_64/egg/katprep/maintenance.py", line 884, in cli
File "build/bdist.linux-x86_64/egg/katprep/maintenance.py", line 863, in main
File "build/bdist.linux-x86_64/egg/katprep/maintenance.py", line 251, in prepare
File "build/bdist.linux-x86_64/egg/katprep/maintenance.py", line 196, in manage_host_preparation
File "build/bdist.linux-x86_64/egg/katprep/clients/Icinga2APIClient.py", line 278, in schedule_downtime
File "build/bdist.linux-x86_64/egg/katprep/clients/Icinga2APIClient.py", line 248, in __manage_downtime
File "build/bdist.linux-x86_64/egg/katprep/clients/Icinga2APIClient.py", line 160, in __api_post
File "build/bdist.linux-x86_64/egg/katprep/clients/Icinga2APIClient.py", line 118, in __api_request
File "/home/vagrant/.local/lib/python2.7/site-packages/requests/sessions.py", line 559, in post
return self.request('POST', url, data=data, json=json, **kwargs)
File "/home/vagrant/.local/lib/python2.7/site-packages/requests/sessions.py", line 512, in request
resp = self.send(prep, **send_kwargs)
File "/home/vagrant/.local/lib/python2.7/site-packages/requests/sessions.py", line 622, in send
r = adapter.send(request, **kwargs)
File "/home/vagrant/.local/lib/python2.7/site-packages/requests/adapters.py", line 495, in send
raise ConnectionError(err, request=request)
requests.exceptions.ConnectionError: ('Connection aborted.', BadStatusLine("''",))
The text was updated successfully, but these errors were encountered:
Received the hint, that the API is not designed for serving multiple requests in one session. So the workaround would be to close the API session after every request and re-establish it afterwards.
Describe the bug
Scheduling downtimes on Icinga2 works, but katprep crashes with an
BadStatusLine
error.To Reproduce
Steps to reproduce the behavior:
katprep_maintenance *.json prepare
Expected behavior
Downtime should be scheduled without crashing katprep.
Screenshots
If applicable, add screenshots to help explain your problem.
Environment (please complete the following information):
Additional context
Could also be an upstream issue: Icinga/icinga2#6635
Stacktrace:
The text was updated successfully, but these errors were encountered: