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
Add parameters to daemons’ stop() function #6075
Comments
Hey, if this issue is not assigned to anyone, can I work on this? |
I failed to reproduce the issue. I followed the instructions here and I ran the |
$ cat foo.py
#!/usr/bin/env python3
import signal
import time
def stop():
print('stop')
if __name__ == '__main__':
signal.signal(signal.SIGTERM, stop)
try:
while True:
time.sleep(60)
except KeyboardInterrupt:
stop()
$ python3 foo.py
^Cstop
$ python3 foo.py &
[1] 168059
$ kill 168059
Traceback (most recent call last):
File "/var/home/dchristidis/foo.py", line 13, in <module>
time.sleep(60)
TypeError: stop() takes 0 positional arguments but 2 were given |
Signed-off-by: Soumik Dutta <shalearkane@gmail.com>
Signed-off-by: Soumik Dutta <shalearkane@gmail.com>
The stop() functions used by daemons to gracefully stop had missing parameters `signum` and `frame`. These parameters are passed when the daemon receives SIGTERM signal. Since we have no use for the parameter as of now, we have set them to `None` by default. Also type-hints are added to the parameters and to the return type. Fixes rucio#6075 Signed-off-by: Soumik Dutta <shalearkane@gmail.com>
The stop() functions used by daemons to gracefully stop had missing parameters `signum` and `frame`. These parameters are passed when the daemon receives SIGTERM signal. Since we have no use for the parameter as of now, we have set them to `None` by default. Also type-hints are added to the parameters and to the return type. Fixes rucio#6075 Signed-off-by: Soumik Dutta <shalearkane@gmail.com>
The stop() functions used by daemons to gracefully stop had missing parameters `signum` and `frame`. These parameters are passed when the daemon receives SIGTERM signal. Since we have no use for the parameter as of now, we have set them to `None` by default. Also type-hints are added to the parameters and to the return type. Fixes rucio#6075 Signed-off-by: Soumik Dutta <shalearkane@gmail.com>
The stop() functions used by daemons to gracefully stop had missing parameters `signum` and `frame`. These parameters are passed when the daemon receives SIGTERM signal. Since we have no use for the parameter as of now, we have set them to `None` by default. Also type-hints are added to the parameters and to the return type. Fixes rucio#6075 Signed-off-by: Soumik Dutta <shalearkane@gmail.com>
The stop() functions used by daemons to gracefully stop had missing parameters `signum` and `frame`. These parameters are passed when the daemon receives SIGTERM signal. Since we have no use for the parameter as of now, we have set them to `None` by default. Also type-hints are added to the parameters and to the return type. Fixes rucio#6075 Signed-off-by: Soumik Dutta <shalearkane@gmail.com>
The stop() functions used by daemons to gracefully stop had missing parameters `signum` and `frame`. These parameters are passed when the daemon receives SIGTERM signal. Since we have no use for the parameter as of now, we have set them to `None` by default. Also type-hints are added to the parameters and to the return type. Fixes rucio#6075 Signed-off-by: Soumik Dutta <shalearkane@gmail.com>
The stop() functions used by daemons to gracefully stop had missing parameters `signum` and `frame`. These parameters are passed when the daemon receives SIGTERM signal. Since we have no use for the parameter as of now, we have set them to `None` by default. Also type-hints are added to the parameters and to the return type. Fixes rucio#6075 Signed-off-by: Soumik Dutta <shalearkane@gmail.com>
The stop() functions used by daemons to gracefully stop had missing parameters `signum` and `frame`. These parameters are passed when the daemon receives SIGTERM signal. Since we have no use for the parameter as of now, we have set them to `None` by default. Also type-hints are added to the parameters and to the return type. Signed-off-by: Soumik Dutta <shalearkane@gmail.com>
The stop() functions used by daemons to gracefully stop had missing parameters `signum` and `frame`. These parameters are passed when the daemon receives SIGTERM signal. Since we have no use for the parameter as of now, we have set them to `None` by default. Also type-hints are added to the parameters and to the return type. Signed-off-by: Soumik Dutta <shalearkane@gmail.com>
Description
Per the documentation, the signal handler is expected to have two parameters. Their absence may cause a somewhat-benign unhandled exception.
Steps to reproduce
The above-provided traceback was noticed on the ATLAS instance. It is unknown whether it is always reproducible when shutting down daemons.
Rucio Version
No response
Additional Information
No response
The text was updated successfully, but these errors were encountered: