-
Notifications
You must be signed in to change notification settings - Fork 334
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Shinken scheduled_downtime_depth issue -1 #1997
Comments
I had the same issue, and I think there's a race condition during the retention data dump where the object state is saved before it's fully processed, then I did a pull request (#1990) that excludes We didn't detect such a discrepancy since. Could you have a test with this patch ? |
This issue should have been fixed by #1990. Could you have a test with latest sources from master and let me know if this error is still happening ? |
on CentOS Linux release 7.9.2009 (Core) _creating /usr/lib/python2.7/site-packages/Shinken-2.4.3-py2.7.egg Extracting Shinken-2.4.3-py2.7.egg to /usr/lib/python2.7/site-packages Adding Shinken 2.4.3 to easy-install.pth file Installed /usr/lib/python2.7/site-packages/Shinken-2.4.3-py2.7.egg Traceback (most recent call last): File "setup.py", line 444, in
File "/usr/lib64/python2.7/distutils/core.py", line 152, in setup
File "/usr/lib64/python2.7/distutils/dist.py", line 953, in run_commands
File "/usr/lib64/python2.7/distutils/dist.py", line 972, in run_command
File "/usr/lib/python2.7/site-packages/setuptools/command/install.py", line 73, in run
File "/usr/lib/python2.7/site-packages/setuptools/command/easy_install.py", line 655, in install_item
File "/usr/lib/python2.7/site-packages/setuptools/command/easy_install.py", line 701, in process_distribution
TypeError: init() takes exactly 2 arguments (4 given)_
File "/usr/lib/python2.7/site-packages/setuptools/command/easy_install.py", line 380, in run
File "/usr/lib/python2.7/site-packages/setuptools/command/easy_install.py", line 604, in easy_install
_File "/usr/lib/python2.7/site-packages/setuptools/command/easy_install.py", line 655, in install_item
File "/usr/lib/python2.7/site-packages/setuptools/command/easy_install.py", line 701, in process_distribution
TypeError: init() takes exactly 2 arguments (4 given)__ but shinken is still running well |
I'll have a closer look at this message. |
we currently have a problem with downtimes for some hosts and services.
If we enter a downtime this will not be realized.
I have found that scheduled_downtime_depth has a value of -1 for these.
If you enter the downtime twice, the downtime is realized.
Apart from the fact that it is unclear to me how that happened, I think that should be caught in the program.
For example, a proposal by incrementing only if scheduled_downtime_depth is greater than 0.
Below is the patch that works for us.
--- /root/shinkentest1/downtime.py 2020-02-15 22:24:44.000000000 +0100
+++ downtime.py 2020-02-15 22:53:04.871194126 +0100
@@ -142,7 +142,8 @@
if self.is_in_effect is True:
# This was a fixed or a flexible+triggered downtime
self.is_in_effect = False
@@ -164,7 +165,8 @@
def cancel(self):
res = []
self.is_in_effect = False
If a negative value for scheduled downtime depth makes sense, I would be grateful for an explanation.
Regards,
Torsten
The text was updated successfully, but these errors were encountered: