Project

General

Profile

Actions

Bug #75776

closed
LS LS

Replace deprecated egrep/fgrep with grep -E/grep -F in ceph/ceph

Bug #75776: Replace deprecated egrep/fgrep with grep -E/grep -F in ceph/ceph

Added by Lumir Sliva 8 months ago. Updated 29 days ago.

Status:
Backporting
Priority:
Normal
Assignee:
Category:
-
Target version:
-
Due date:
% Done:

0%

Source:
Backport:
squid, tentacle
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Pull request ID:
Crash signature (v1):
Crash signature (v2):
Tags (freeform):
Fixed In:
v21.0.0-1833-gf18652255a
Released In:
v21.2.0~344
Upkeep Timestamp:
2026-11-04T01:11:29+00:00

Description

Modern systems emit deprecation warnings for egrep and fgrep:

egrep: warning: egrep is obsolescent; using grep -E

The ceph/ceph repository has ~22 egrep and ~19 fgrep occurrences across shell scripts, Python files, and YAML configs in qa/, src/, and related directories.

These should be replaced with their POSIX equivalents:
- egrep > grep -E
fgrep -> grep -F

Related: #74259 (same issue in teuthology repo)


Related issues 3 (0 open — 3 closed)

Copied to Ceph - Backport #80630: tentacle: Replace deprecated egrep/fgrep with grep -E/grep -F in ceph/cephResolvedLumir Sliva

Actions
Copied to Ceph - Backport #80631: umbrella: Replace deprecated egrep/fgrep with grep -E/grep -F in ceph/cephRejectedLumir Sliva

Actions
Copied to Ceph - Backport #80658: squid: Replace deprecated egrep/fgrep with grep -E/grep -F in ceph/cephResolvedLumir Sliva

Actions

LS Updated by Lumir Sliva 8 months ago Actions #1

I am working on this issue.

LF Updated by Laura Flores 8 months ago ยท Edited Actions #2

/a/lflores-2026-04-15_21:56:00-rados-wip-pdonnell-testing-20260414.130420-distro-default-trial/154367/

2026-04-15T22:30:52.941 INFO:tasks.ceph:Waiting until ceph cluster ceph is healthy...
2026-04-15T22:30:52.941 INFO:tasks.ceph.ceph_manager.ceph:wait_until_healthy
2026-04-15T22:30:52.941 DEBUG:teuthology.orchestra.run.trial048:> sudo adjust-ulimits ceph-coverage /home/ubuntu/cephtest/archive/coverage timeout 120 ceph --cluster ceph health --format=json
2026-04-15T22:30:53.183 INFO:teuthology.orchestra.run.trial048.stdout:
2026-04-15T22:30:53.184 INFO:teuthology.orchestra.run.trial048.stdout:{"status":"HEALTH_OK","checks":{},"mutes":[]}
2026-04-15T22:30:53.195 INFO:tasks.ceph.ceph_manager.ceph:wait_until_healthy done
2026-04-15T22:30:53.195 INFO:teuthology.run_tasks:Running task exec...
2026-04-15T22:30:53.207 INFO:teuthology.task.exec:Executing custom commands...
2026-04-15T22:30:53.207 INFO:teuthology.task.exec:Running commands on role osd.0 host [email protected]
2026-04-15T22:30:53.207 DEBUG:teuthology.orchestra.run.trial048:> sudo TESTDIR=/home/ubuntu/cephtest bash -c 'egrep '"'"'(defer backfill|defer recovery)'"'"' /var/log/ceph/ceph-osd.*.log'
2026-04-15T22:30:53.234 INFO:teuthology.orchestra.run.trial048.stderr:egrep: warning: egrep is obsolescent; using grep -E
2026-04-15T22:31:08.514 DEBUG:teuthology.orchestra.run:got remote process result: 1
2026-04-15T22:31:08.514 ERROR:teuthology.run_tasks:Saw exception from tasks.
Traceback (most recent call last):
  File "/home/teuthworker/src/git.ceph.com_teuthology_426ec63bc4a39bba882efb593125294667afc593/teuthology/run_tasks.py", line 105, in run_tasks
    manager = run_one_task(taskname, ctx=ctx, config=config)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/teuthworker/src/git.ceph.com_teuthology_426ec63bc4a39bba882efb593125294667afc593/teuthology/run_tasks.py", line 83, in run_one_task
    return task(**kwargs)
           ^^^^^^^^^^^^^^
  File "/home/teuthworker/src/git.ceph.com_teuthology_426ec63bc4a39bba882efb593125294667afc593/teuthology/task/exec.py", line 66, in task
    remote.run(
  File "/home/teuthworker/src/git.ceph.com_teuthology_426ec63bc4a39bba882efb593125294667afc593/teuthology/orchestra/remote.py", line 596, in run
    r = self._runner(client=self.ssh, name=self.shortname, **kwargs)
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/teuthworker/src/git.ceph.com_teuthology_426ec63bc4a39bba882efb593125294667afc593/teuthology/orchestra/run.py", line 461, in run
    r.wait()
  File "/home/teuthworker/src/git.ceph.com_teuthology_426ec63bc4a39bba882efb593125294667afc593/teuthology/orchestra/run.py", line 161, in wait
    self._raise_for_status()
  File "/home/teuthworker/src/git.ceph.com_teuthology_426ec63bc4a39bba882efb593125294667afc593/teuthology/orchestra/run.py", line 181, in _raise_for_status
    raise CommandFailedError(
teuthology.exceptions.CommandFailedError: Command failed on trial048 with status 1: 'sudo TESTDIR=/home/ubuntu/cephtest bash -c \'egrep \'"\'"\'(defer backfill|defer recovery)\'"\'"\' /var/log/ceph/ceph-osd.*.log\''

LF Updated by Laura Flores 8 months ago Actions #3

/a/lflores-2026-04-15_21:56:00-rados-wip-pdonnell-testing-20260414.130420-distro-default-trial/154367

LS Updated by Lumir Sliva 8 months ago Actions #4

  • Assignee set to Lumir Sliva

ID Updated by Ilya Dryomov 6 months ago Actions #5

  • Status changed from New to Resolved
  • Pull request ID set to 68095

UB Updated by Upkeep Bot 6 months ago Actions #6

  • Merge Commit set to f18652255a43cf8c2f02e1559668681f12876605
  • Fixed In set to v21.0.0-1833-gf18652255a
  • Upkeep Timestamp set to 2026-05-29T13:53:57+00:00

NM Updated by Nitzan Mordechai 3 months ago Actions #7

  • Backport set to tentacle, umbrella

Adding tentacle, umbrella to backports

NM Updated by Nitzan Mordechai 3 months ago Actions #8

/a/skanta-2026-08-24_10:34:23-rados-wip-vallari2-testing-20260819.130432-tentacle-distro-default-trial/509325

SS Updated by Sridhar Seshasayee 3 months ago Actions #9

Observed in Squid as well:
/a/skanta-2026-08-22_23:32:17-rados-wip-bharath9-testing-20260822.101440-squid-distro-default-trial/506241

KS Updated by Kamoltat (Junior) Sirivadhna 3 months ago Actions #10

  • Status changed from Resolved to Pending Backport

KS Updated by Kamoltat (Junior) Sirivadhna 3 months ago Actions #11

/a/ksirivad-2026-09-17_00:40:59-rados-wip-ksirivad-tentacle-revert-only-msgr-distro-default-trial/561782/

UB Updated by Upkeep Bot 3 months ago Actions #12

  • Copied to Backport #80630: tentacle: Replace deprecated egrep/fgrep with grep -E/grep -F in ceph/ceph added

UB Updated by Upkeep Bot 3 months ago Actions #13

  • Copied to Backport #80631: umbrella: Replace deprecated egrep/fgrep with grep -E/grep -F in ceph/ceph added

UB Updated by Upkeep Bot 3 months ago Actions #14

  • Status changed from Pending Backport to Backporting
  • Upkeep Timestamp changed from 2026-05-29T13:53:57+00:00 to 2026-09-18T00:44:41+00:00

LS Updated by Lumir Sliva 3 months ago Actions #15

  • Copied to Backport #80658: squid: Replace deprecated egrep/fgrep with grep -E/grep -F in ceph/ceph added

LS Updated by Lumir Sliva 3 months ago Actions #16

  • Backport changed from tentacle, umbrella to squid, tentacle, umbrella

LS Updated by Lumir Sliva 3 months ago Actions #17

  • Backport changed from squid, tentacle, umbrella to squid, tentacle

LS Updated by Lumir Sliva 3 months ago Actions #18

Backports are up:

Squid wasn't in the Backport field, so I added it and filed #80658 by hand since the upkeep bot had already run for the other two.

Both picks needed the same small adaptation: the release branches don't carry the test_trash_purge_schedule_staggering test that main added later to qa/workunits/rbd/cli_generic.sh, so the substitution covers the 13 call sites that exist there instead of 14.

The squid PR has a second commit, a pick of 6dfb84e8246 ("qa/tasks: update egrep to 'grep -E'", https://github.com/ceph/ceph/pull/66155). That one went to tentacle as https://github.com/ceph/ceph/pull/67518 but never to squid, and without it squid still shells out to egrep in first_in_ceph_log, which runs on every job teardown, so the backport on its own wouldn't have made the warning go away there.

What I left alone:

  • src/vstart.sh on both branches, fixed on main by 745cece11e5 and never backported. Dev tooling only, doesn't run in teuthology.
  • qa/suites/upgrade/quincy-x/stress-split/1-start.yaml on squid, no counterpart on main since the quincy-x suite is gone there, so it can't go in as a backport.
  • two doc examples.

Squid support ends 2026-10-31, so #71918 has about six weeks of runway.

JP Updated by Jaya Prakash 2 months ago Actions #19

/a/skanta-2026-09-25_04:43:26-rados-wip-bharath28-testing-20260924.103245-tentacle-distro-default-trial/581832

UB Updated by Upkeep Bot about 1 month ago Actions #20

  • Released In set to v21.2.0~343
  • Upkeep Timestamp changed from 2026-09-18T00:44:41+00:00 to 2026-10-24T01:25:18+00:00

UB Updated by Upkeep Bot 29 days ago Actions #21

  • Released In changed from v21.2.0~343 to v21.2.0~344
  • Upkeep Timestamp changed from 2026-10-24T01:25:18+00:00 to 2026-11-04T01:11:29+00:00
Actions

Also available in: PDF Atom