From: Patrick Donnelly Date: Mon, 1 Dec 2025 15:29:52 +0000 (-0500) Subject: teuthology/task: use grep switch instead of egrep X-Git-Tag: 1.2.3^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F2113%2Fhead;p=teuthology.git teuthology/task: use grep switch instead of egrep Resolves: 2025-11-30T03:49:48.951 DEBUG:teuthology.task.internal.syslog:Checking ubuntu@smithi155.front.sepia.ceph.com 2025-11-30T03:49:48.952 DEBUG:teuthology.orchestra.run.smithi155:> egrep --binary-files=text '\bBUG\b|\bINFO\b|\bDEADLOCK\b' /home/ubuntu/cephtest/archive/syslog/kern.log | grep -v 'task .* blocked for more than .* seconds' | grep -v 'lockdep is turned off' | grep -v 'trying to register non-static key' | grep -v 'DEBUG: fsize' | grep -v CRON | grep -v 'BUG: bad unlock balance detected' | grep -v 'inconsistent lock state' | grep -v '*** DEADLOCK ***' | grep -v 'INFO: possible irq lock inversion dependency detected' | grep -v 'INFO: NMI handler (perf_event_nmi_handler) took too long to run' | grep -v 'INFO: recovery required on readonly' | grep -v 'ceph-create-keys: INFO' | grep -v INFO:ceph-create-keys | grep -v 'Loaded datasource DataSourceOpenStack' | grep -v 'container-storage-setup: INFO: Volume group backing root filesystem could not be determined' | egrep -v '\bsalt-master\b|\bsalt-minion\b|\bsalt-api\b' | grep -v ceph-crash | egrep -v '\btcmu-runner\b.*\bINFO\b' | head -n 1 2025-11-30T03:49:48.983 INFO:teuthology.orchestra.run.smithi155.stderr:egrep: warning: egrep is obsolescent; using grep -E 2025-11-30T03:49:48.983 INFO:teuthology.orchestra.run.smithi155.stderr:egrep: warning: egrep is obsolescent; using grep -E 2025-11-30T03:49:48.983 INFO:teuthology.orchestra.run.smithi155.stderr:egrep: warning: egrep is obsolescent; using grep -E Fixes: https://tracker.ceph.com/issues/74259 Signed-off-by: Patrick Donnelly --- diff --git a/teuthology/task/internal/syslog.py b/teuthology/task/internal/syslog.py index 1e1cc3b5c..b103c8b7c 100644 --- a/teuthology/task/internal/syslog.py +++ b/teuthology/task/internal/syslog.py @@ -106,7 +106,7 @@ def syslog(ctx, config): log.debug('Checking %s', rem.name) stdout = rem.sh( [ - 'egrep', '--binary-files=text', + 'grep', '-E', '--binary-files=text', '\\bBUG\\b|\\bINFO\\b|\\bDEADLOCK\\b', run.Raw(f'{archive_dir}/syslog/kern.log'), run.Raw('|'), @@ -143,11 +143,11 @@ def syslog(ctx, config): run.Raw('|'), 'grep', '-v', 'container-storage-setup: INFO: Volume group backing root filesystem could not be determined', # noqa run.Raw('|'), - 'egrep', '-v', '\\bsalt-master\\b|\\bsalt-minion\\b|\\bsalt-api\\b', + 'grep', '-E', '-v', '\\bsalt-master\\b|\\bsalt-minion\\b|\\bsalt-api\\b', run.Raw('|'), 'grep', '-v', 'ceph-crash', run.Raw('|'), - 'egrep', '-v', '\\btcmu-runner\\b.*\\bINFO\\b', + 'grep', '-E', '-v', '\\btcmu-runner\\b.*\\bINFO\\b', run.Raw('|'), 'head', '-n', '1', ], diff --git a/teuthology/task/kernel.py b/teuthology/task/kernel.py index 22cd1a69c..2cdfe9ea0 100644 --- a/teuthology/task/kernel.py +++ b/teuthology/task/kernel.py @@ -560,7 +560,7 @@ def install_and_reboot(ctx, need_install, config): # complex this will totally break. kernel_entries = role_remote.sh([ - 'egrep', + 'grep', '-E', '(submenu|menuentry.*' + kernel_title + ').*{', '/boot/grub/grub.cfg' ]).split('\n')