From: Laura Flores Date: Fri, 17 Feb 2023 17:27:19 +0000 (-0600) Subject: Merge pull request #48805 from tserong/wip-57997-quincy X-Git-Tag: v17.2.6~131 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=b75db63770f0c1b3762d644ebfea99def17bf92d;p=ceph.git Merge pull request #48805 from tserong/wip-57997-quincy quincy: ceph-crash: drop privleges to run as "ceph" user, rather than root (CVE-2022-3650) --- b75db63770f0c1b3762d644ebfea99def17bf92d diff --cc src/ceph-crash.in index 08284fc9ebc7,74e50e2b253f..0e02837fadd4 --- a/src/ceph-crash.in +++ b/src/ceph-crash.in @@@ -101,13 -128,12 +128,16 @@@ def main() log.error("directory %s does not exist; please create" % postdir) time.sleep(30) + log.info("pinging cluster to exercise our key") + pr = subprocess.Popen(args=['timeout', '30', 'ceph', '-s']) + pr.wait() + log.info("monitoring path %s, delay %ds" % (args.path, args.delay * 60.0)) while True: - scrape_path(args.path) + try: + scrape_path(args.path) + except Exception as e: + log.error(f"Error scraping {args.path}: {e}") if args.delay == 0: sys.exit(0) time.sleep(args.delay * 60)