From 852b30cf9a34fe8fdd9bb7bf74d8425d55f6dc0d Mon Sep 17 00:00:00 2001 From: "John L. Hammond" Date: Tue, 14 Jun 2022 08:46:45 -0500 Subject: [PATCH] EX-5380 lipe: wait longer before restarting the access log reader In lamigo_alr_data_collection_thread() if the access log reader exits with status zero then it means that no OSTs are mounted on the host. In this case we should wait longer before restarting the access log reader. Lustre-change: https://review.whamcloud.com/47627 Lustre-commit: 27c05f8cb39a8bf8d9e9386841fc7ecd700cf0fb Test-Parameters: trivial testlist=hot-pools Signed-off-by: John L. Hammond Change-Id: I282c6b8e251c432664bc3b4eb202351a5bd7fe5b Reviewed-by: Alexandre Ioffe Reviewed-by: Andreas Dilger Reviewed-by: Alex Zhuravlev Reviewed-on: https://review.whamcloud.com/48380 Tested-by: jenkins Tested-by: Maloo Reviewed-by: Colin Faber --- lipe/src/lamigo_alr.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/lipe/src/lamigo_alr.c b/lipe/src/lamigo_alr.c index 608ee0c..a20fcd1 100644 --- a/lipe/src/lamigo_alr.c +++ b/lipe/src/lamigo_alr.c @@ -307,12 +307,18 @@ out: static void *lamigo_alr_data_collection_thread(void *arg) { struct alr_agent *ala = arg; + int rc; while (1) { - lamigo_alr_agent_run(ala); - /* wait for a while */ - /* XXX: should be configurable? */ - sleep(5); + rc = lamigo_alr_agent_run(ala); + if (rc == 0) { + /* No access logs were found on the host, + * likely because no OSTs were mounted. */ + sleep(60); + } else { + /* XXX: should be configurable? */ + sleep(5); + } } /* Add a return to make GCC happy. See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97793. */ -- 1.8.3.1