From 5f0acef92ca0a2800ac8437002ac523edaa4d80a Mon Sep 17 00:00:00 2001 From: Abhishek Lekshmanan <abhishek.lekshmanan@cern.ch> Date: Thu, 11 Jul 2024 12:42:13 +0200 Subject: [PATCH] tools: evict_stale: use the second field for ip addresses With messenger v1/v2 the new messages look like this v1:<ip>:0/4174879257 So the first field is the version number which breaks further processing Signed-off-by: Abhishek Lekshmanan <abhishek.lekshmanan@cern.ch> --- tools/cephfs/evict-stale.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/cephfs/evict-stale.sh b/tools/cephfs/evict-stale.sh index a89d7de..030cd03 100755 --- a/tools/cephfs/evict-stale.sh +++ b/tools/cephfs/evict-stale.sh @@ -7,7 +7,7 @@ ceph daemon mds.`hostname -s` config set debug_ms 0/1 echo Checking for Stale fh errors... If positive, re-run with --evict option. -STALE=$(grep Stale /var/log/ceph/ceph-mds.*.log | awk '{print $7}' | cut -d: -f1 | sort | uniq | xargs -r -n1 host | awk '{print $5}' | sort) +STALE=$(grep Stale /var/log/ceph/ceph-mds.*.log | awk '{print $7}' | cut -d: -f2 | sort | uniq | xargs -r -n1 host | awk '{print $5}' | sort) for s in ${STALE} do -- GitLab