]> git-server-git.apps.pok.os.sepia.ceph.com Git - teuthology.git/commitdiff
teuthology/task: use grep switch instead of egrep 2113/head
authorPatrick Donnelly <pdonnell@redhat.com>
Mon, 1 Dec 2025 15:29:52 +0000 (10:29 -0500)
committerPatrick Donnelly <pdonnell@redhat.com>
Thu, 18 Dec 2025 17:24:48 +0000 (12:24 -0500)
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>
teuthology/task/internal/syslog.py
teuthology/task/kernel.py

index 1e1cc3b5c3638bc85a3ed25bf3a02482bd48de62..b103c8b7c99d1b2c880ef353d856f423d9dccb80 100644 (file)
@@ -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',
                 ],
index 22cd1a69c20d81428c67f7ae6270ad37e780d53e..2cdfe9ea0f2c0eafd7f5ac1c6bb353002f04b4e3 100644 (file)
@@ -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')