Bug #75776
closedReplace deprecated egrep/fgrep with grep -E/grep -F in ceph/ceph
0%
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)
LS Updated by Lumir Sliva 8 months ago
I am working on this issue.
LF Updated by Laura Flores 8 months ago ยท Edited
/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
/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
- Assignee set to Lumir Sliva
ID Updated by Ilya Dryomov 6 months ago
- Status changed from New to Resolved
- Pull request ID set to 68095
UB Updated by Upkeep Bot 6 months ago
- 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
- Backport set to tentacle, umbrella
Adding tentacle, umbrella to backports
NM Updated by Nitzan Mordechai 3 months ago
/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
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
- Status changed from Resolved to Pending Backport
KS Updated by Kamoltat (Junior) Sirivadhna 3 months ago
/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
- 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
- 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
- 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
- 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
- Backport changed from tentacle, umbrella to squid, tentacle, umbrella
LS Updated by Lumir Sliva 3 months ago
- Backport changed from squid, tentacle, umbrella to squid, tentacle
LS Updated by Lumir Sliva 3 months ago
Backports are up:
- squid: https://github.com/ceph/ceph/pull/71918 (#80658)
- tentacle: https://github.com/ceph/ceph/pull/71917 (#80630)
- umbrella: nothing to do, rejected #80631 and dropped umbrella from the Backport field. umbrella was branched after the fix merged, so 8b9dbb50d08 is already an ancestor of ceph/umbrella and the cherry-pick comes out empty. No egrep or fgrep left in qa/ or src/ there either.
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
/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
- 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
- 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