Project

General

Profile

Bug #40781

ceph-crash crashes: 'memoryview: a bytes-like object is required'

Added by Harry Coin about 1 month ago. Updated 6 days ago.

Status:
Pending Backport
Priority:
Normal
Assignee:
Category:
common
Target version:
Start date:
07/15/2019
Due date:
% Done:

0%

Estimated time:
0.25 h
Source:
Tags:
ceph-crash
Backport:
nautilus
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Pull request ID:

Description

To avoid the bug below in ceph-crash, change line 35 in /usr/bin/ceph-crash from:
- f = open(os.path.join(path, 'meta'), 'r')
to
+ f = open(os.path.join(path, 'meta'), 'rb')
in ceph -v
ceph version 14.2.1 (d555a9489eb35f84f2e1ef49b77e19da9d113972) nautilus (stable)

Jul 15 08:08:14 nocsupport4 systemd1: Started Ceph crash dump collector.
Jul 15 08:08:14 nocsupport4 ceph-crash1260: INFO:__main__:monitoring path /var/lib/ceph/crash, delay 600s
Jul 15 08:08:15 nocsupport4 ceph-crash1260: Traceback (most recent call last):
Jul 15 08:08:15 nocsupport4 ceph-crash1260: File "/usr/bin/ceph-crash", line 83, in <module>
Jul 15 08:08:15 nocsupport4 ceph-crash1260: main()
Jul 15 08:08:15 nocsupport4 ceph-crash1260: File "/usr/bin/ceph-crash", line 76, in main
Jul 15 08:08:15 nocsupport4 ceph-crash1260: scrape_path(args.path)
Jul 15 08:08:15 nocsupport4 ceph-crash1260: File "/usr/bin/ceph-crash", line 57, in scrape_path
Jul 15 08:08:15 nocsupport4 ceph-crash1260: rc = post_crash(crashpath)
Jul 15 08:08:15 nocsupport4 ceph-crash1260: File "/usr/bin/ceph-crash", line 36, in post_crash
Jul 15 08:08:15 nocsupport4 ceph-crash1260: stdout, stderr = pr.communicate(input=f.read())
Jul 15 08:08:15 nocsupport4 ceph-crash1260: File "/usr/lib/python3.7/subprocess.py", line 939, in communicate
Jul 15 08:08:15 nocsupport4 ceph-crash1260: stdout, stderr = self._communicate(input, endtime, timeout)
Jul 15 08:08:15 nocsupport4 ceph-crash1260: File "/usr/lib/python3.7/subprocess.py", line 1666, in _communicate
Jul 15 08:08:15 nocsupport4 ceph-crash1260: input_view = memoryview(self._input)
Jul 15 08:08:15 nocsupport4 ceph-crash1260: TypeError: memoryview: a bytes-like object is required, not 'str'
Jul 15 08:08:15 nocsupport4 systemd1: ceph-crash.service: Main process exited, code=exited, status=1/FAILURE
Jul 15 08:08:15 nocsupport4 systemd1: ceph-crash.service: Failed with result 'exit-code'.


Related issues

Copied to Ceph - Backport #40946: nautilus: ceph-crash crashes: 'memoryview: a bytes-like object is required' In Progress

History

#1 Updated by Dan Mick about 1 month ago

  • Status changed from New to Verified

python3 I assume. Looks right to me.

#2 Updated by Dan Mick about 1 month ago

  • Assignee set to Dan Mick

#4 Updated by Dan Mick about 1 month ago

  • Status changed from Verified to Need Review

#5 Updated by Kefu Chai about 1 month ago

  • Backport set to nautilus

#6 Updated by Kefu Chai 29 days ago

  • Status changed from Need Review to Pending Backport

#7 Updated by Nathan Cutler 28 days ago

  • Copied to Backport #40946: nautilus: ceph-crash crashes: 'memoryview: a bytes-like object is required' added

#8 Updated by Nathan Cutler 6 days ago

  • Pull request ID set to 29053

Also available in: Atom PDF