mirror of
https://github.com/ceph/ceph
synced 2025-02-08 03:18:12 +00:00
ceph-crash: exit code 0 on SIGINT, SIGTERM
This makes the systemd unit not go into a failure state when you kill the cephadm unit's podman container. Signed-off-by: Sage Weil <sage@redhat.com>
This commit is contained in:
parent
8bc975fb8f
commit
4b93fb8d31
@ -5,6 +5,7 @@
|
||||
import argparse
|
||||
import logging
|
||||
import os
|
||||
import signal
|
||||
import socket
|
||||
import subprocess
|
||||
import sys
|
||||
@ -75,8 +76,15 @@ def scrape_path(path):
|
||||
(metapath, p, os.path.join('posted/', p))
|
||||
)
|
||||
|
||||
def handler(signum, frame):
|
||||
print('*** Interrupted with signal %d ***' % signum)
|
||||
sys.exit(0)
|
||||
|
||||
def main():
|
||||
# exit code 0 on SIGINT, SIGTERM
|
||||
signal.signal(signal.SIGINT, handler)
|
||||
signal.signal(signal.SIGTERM, handler)
|
||||
|
||||
args = parse_args()
|
||||
postdir = os.path.join(args.path, 'posted')
|
||||
if args.name:
|
||||
|
Loading…
Reference in New Issue
Block a user