From 84c4562f7bff9ca1018fd1975657144e62d6b93d Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Tue, 2 Nov 2021 10:26:49 -0400 Subject: [PATCH] ceph-crash: ping cluster with key on startup This is mostly pointless, *except* that after a key rotation it ensures that the new key is used immediately (and the pending_key is committed by the mon). Signed-off-by: Sage Weil --- src/ceph-crash.in | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/ceph-crash.in b/src/ceph-crash.in index ae0e4f51646..08284fc9ebc 100755 --- a/src/ceph-crash.in +++ b/src/ceph-crash.in @@ -101,6 +101,10 @@ 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) -- 2.39.5