Repository navigation
squid: qa: fix misleading "in cluster log" failures during cluster log scan - #68448
Conversation
Summary: Fix misleading failure reasons reported as `"… in cluster log"` when no such log entry actually exists. The cephadm task currently treats `grep` errors from the cluster log scan as if they were actual log matches. This can produce bogus failure summaries when `ceph.log` is missing, especially after early failures such as image pull or bootstrap problems. Problem: first_in_ceph_log() currently: - returns stdout if a match is found - otherwise returns stderr The caller then treats any non-None value as a real cluster log hit and formats it as: "<value>" in cluster log That means an error like: grep: /var/log/ceph/<fsid>/ceph.log: No such file or directory can be misreported as if it came from the cluster log. This change makes cluster log scanning robust and accurate by: - checking whether /var/log/ceph/<fsid>/ceph.log exists before scanning - using check_status=False for the grep pipeline - treating only stdout as a real log match - treating stderr as a scan error instead of log content - avoiding overwrite of a more accurate pre-existing failure_reason - reporting scan failures separately as cluster log scan failed Fixes: https://tracker.ceph.com/issues/76051 (original ticket) Fixes: https://tracker.ceph.com/issues/76077 (squid backport ticket) Signed-off-by: Redouane Kachach <[email protected]> (cherry picked from commit 7b2a914)
|
jenkins test api |
|
This PR has been added to wip-yuri2-testing-20260602.202206-squid. |
|
This PR has been added to wip-yuri2-testing-20260622.144905-squid. |
|
This PR has been removed from wip-yuri2-testing-20260622.144905-squid. |
|
This PR has been added to wip-yuri5-testing-20260623.145428-squid. |
There was a problem hiding this comment.
Ceph Release Engineering Audit Report
Commit Parity Visualizer
| BACKPORT PR #68448 | SOURCE PR |
SOURCE STATUS |
|---|---|---|
| 62e63fa qa: fix misleading "in cluster log" failures during cluster log scan | PR #68392 | 7b2a914 qa: fix misleading "in cluster log" failures during cluster log scan |
Automated Backport Parity Review - Cherry-Pick Conflicts / Deviations
A conflict or deviation was detected during the simulation of this backport. The code in this PR does not match a clean cherry-pick of the upstream commits.
This does not necessarily indicate an issue but a maintainer should review.
**Click to expand conflict summaries.**
Deviation in Backport 62e63fa (cherry-pick of 7b2a914)
Affected File(s)
qa/tasks/cephadm.py
Range Diff
Click to expand
--- Original (7b2a9141)
+++ Backport (62e63faa)
@@ -36,5 +36,7 @@
- avoiding overwrite of a more accurate pre-existing failure_reason
- reporting scan failures separately as cluster log scan failed
-Fixes: https://tracker.ceph.com/issues/76051
+Fixes: https://tracker.ceph.com/issues/76051 (original ticket)
+Fixes: https://tracker.ceph.com/issues/76077 (squid backport ticket)
Signed-off-by: Redouane Kachach <[email protected]>
+(cherry picked from commit 7b2a9141053fd639138ab5bc1db09c32e354cf12)
================================================================================
RANGE DIFF
================================================================================
1: 7b2a9141053 ! 1: 62e63faa3df qa: fix misleading "in cluster log" failures during cluster log scan
@@ Commit message
- avoiding overwrite of a more accurate pre-existing failure_reason
- reporting scan failures separately as cluster log scan failed
- Fixes: https://tracker.ceph.com/issues/76051
+ Fixes: https://tracker.ceph.com/issues/76051 (original ticket)
+ Fixes: https://tracker.ceph.com/issues/76077 (squid backport ticket)
Signed-off-by: Redouane Kachach <[email protected]>
+ (cherry picked from commit 7b2a9141053fd639138ab5bc1db09c32e354cf12)
## qa/tasks/cephadm.py ##
@@ qa/tasks/cephadm.py: def ceph_log(ctx, config):
@@ qa/tasks/cephadm.py: def ceph_log(ctx, config):
- Find the first occurrence of the pattern specified in the Ceph log,
- Returns None if none found.
+ Find the first occurrence of the pattern specified in the Ceph log.
++
++ Returns:
++ - matching line as a string if found
++ - None if the file does not exist or no match is found
- :param pattern: Pattern scanned for.
- :param excludes: Patterns to ignore.
- :return: First line of text (or None if not found)
-+ Returns:
-+ - matching line as a string if found
-+ - None if the file does not exist or no match is found
-+
+ Raises:
+ - CommandFailedError if the scan command itself fails unexpectedly
"""
@@ qa/tasks/cephadm.py: def ceph_log(ctx, config):
+
args = [
'sudo',
- 'grep', '-E', pattern,
+- 'egrep', pattern,
- '/var/log/ceph/{fsid}/ceph.log'.format(
- fsid=fsid),
++ 'grep', '-E', pattern,
+ log_path,
]
if only_match:
- args.extend([run.Raw('|'), 'grep', '-E', '|'.join(only_match)])
+ args.extend([run.Raw('|'), 'egrep', '|'.join(only_match)])
@@ qa/tasks/cephadm.py: def ceph_log(ctx, config):
args.extend([
run.Raw('|'), 'head', '-n', '1',How to proceed:
- Authors (Genuine Conflicts): If this is a genuine conflict requiring manual resolution, ensure your resolution is correct. You must explain the conflict resolution in the commit message (e.g., leave the standard Git
Conflicts:block intact) and include an explanation for changes. - Authors (Need Help?): Reach out to the Component Lead for technical guidance on complex code conflicts.
- Component Leads (Review): Please review the Range Diff(s) above to verify the author's manual conflict resolution is correct for this release branch. If the deviation is intentional, documented, and approved then the component lead or @ceph/ceph-release-manager can bypass this check by commenting
/audit override.
Be familiar with the rules and guidelines for writing backports.
🛟 Need Help?
If you need technical help resolving these issues, please consult with the Component Lead. If you need administrative overrides, please see the #ceph-upstream-releases channel on Slack and request a review from the @ceph/ceph-release-manager.
📋 Component Lead / Release Manager
To override the audit failure, apply releng-audit-override label or comment /audit override.
When you are ready for a new audit, please remove the releng-audit-fail label or comment /audit retest.
|
✅ Audit Override Applied by @batrick. |
Backport of #68392
Fixes: https://tracker.ceph.com/issues/76051 (original ticket)
Fixes: https://tracker.ceph.com/issues/76077 (squid backport ticket)
(cherry picked from commit 7b2a914)
Contribution Guidelines
To sign and title your commits, please refer to Submitting Patches to Ceph.
If you are submitting a fix for a stable branch (e.g. "quincy"), please refer to Submitting Patches to Ceph - Backports for the proper workflow.
When filling out the below checklist, you may click boxes directly in the GitHub web UI. When entering or editing the entire PR message in the GitHub web UI editor, you may also select a checklist item by adding an
xbetween the brackets:[x]. Spaces and capitalization matter when checking off items this way.Checklist
Show available Jenkins commands
jenkins test classic perfJenkins Job | Jenkins Job Definitionjenkins test crimson perfJenkins Job | Jenkins Job Definitionjenkins test signedJenkins Job | Jenkins Job Definitionjenkins test make checkJenkins Job | Jenkins Job Definitionjenkins test make check arm64Jenkins Job | Jenkins Job Definitionjenkins test submodulesJenkins Job | Jenkins Job Definitionjenkins test dashboardJenkins Job | Jenkins Job Definitionjenkins test dashboard cephadmJenkins Job | Jenkins Job Definitionjenkins test apiJenkins Job | Jenkins Job Definitionjenkins test docsReadTheDocs | Github Workflow Definitionjenkins test ceph-volume allJenkins Jobs | Jenkins Jobs Definitionjenkins test windowsJenkins Job | Jenkins Job Definitionjenkins test rook e2eJenkins Job | Jenkins Job DefinitionYou must only issue one Jenkins command per-comment. Jenkins does not understand
comments with more than one command.