Skip to content

Commit cd503fa

Browse files
committed
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 <pdonnell@redhat.com>
1 parent 258eb62 commit cd503fa

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

teuthology/task/internal/syslog.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ def syslog(ctx, config):
106106
log.debug('Checking %s', rem.name)
107107
stdout = rem.sh(
108108
[
109-
'egrep', '--binary-files=text',
109+
'grep', '-E', '--binary-files=text',
110110
'\\bBUG\\b|\\bINFO\\b|\\bDEADLOCK\\b',
111111
run.Raw(f'{archive_dir}/syslog/kern.log'),
112112
run.Raw('|'),
@@ -143,11 +143,11 @@ def syslog(ctx, config):
143143
run.Raw('|'),
144144
'grep', '-v', 'container-storage-setup: INFO: Volume group backing root filesystem could not be determined', # noqa
145145
run.Raw('|'),
146-
'egrep', '-v', '\\bsalt-master\\b|\\bsalt-minion\\b|\\bsalt-api\\b',
146+
'grep', '-E', '-v', '\\bsalt-master\\b|\\bsalt-minion\\b|\\bsalt-api\\b',
147147
run.Raw('|'),
148148
'grep', '-v', 'ceph-crash',
149149
run.Raw('|'),
150-
'egrep', '-v', '\\btcmu-runner\\b.*\\bINFO\\b',
150+
'grep', '-E', '-v', '\\btcmu-runner\\b.*\\bINFO\\b',
151151
run.Raw('|'),
152152
'head', '-n', '1',
153153
],

teuthology/task/kernel.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -560,7 +560,7 @@ def install_and_reboot(ctx, need_install, config):
560560
# complex this will totally break.
561561

562562
kernel_entries = role_remote.sh([
563-
'egrep',
563+
'grep', '-E',
564564
'(submenu|menuentry.*' + kernel_title + ').*{',
565565
'/boot/grub/grub.cfg'
566566
]).split('\n')

0 commit comments

Comments
 (0)