Project

General

Profile

Bug #47798

pybind/mgr/volumes: TypeError: bad operand type for unary -: 'str' for errno ETIMEDOUT

Added by Shyamsundar Ranganathan 4 months ago. Updated 4 months ago.

Status:
Duplicate
Priority:
Normal
Category:
Administration/Usability
Target version:
% Done:

0%

Source:
Community (dev)
Tags:
Backport:
octopus,nautilus
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Component(FS):
cephfs.pyx, mgr/volumes
Labels (FS):
Pull request ID:
Crash signature:

Description

A stack trace when facing ETIMEDOUT errno during subvolume operations is presented below,

2020-10-05T18:36:21.739384142Z   File "/usr/share/ceph/mgr/volumes/fs/operations/volume.py", line 158, in get_fs_handle
2020-10-05T18:36:21.739384142Z     conn.connect()
2020-10-05T18:36:21.739384142Z   File "/usr/share/ceph/mgr/volumes/fs/operations/volume.py", line 85, in connect
2020-10-05T18:36:21.739384142Z     self.fs.mount(filesystem_name=self.fs_name.encode('utf-8'))
2020-10-05T18:36:21.739384142Z   File "cephfs.pyx", line 694, in cephfs.LibCephFS.mount
2020-10-05T18:36:21.739384142Z cephfs.Error: error calling ceph_mount: Connection timed out [Errno 110]
2020-10-05T18:36:21.739384142Z 
2020-10-05T18:36:21.739384142Z During handling of the above exception, another exception occurred:
2020-10-05T18:36:21.739384142Z 
2020-10-05T18:36:21.739384142Z Traceback (most recent call last):
2020-10-05T18:36:21.739384142Z   File "/usr/share/ceph/mgr/mgr_module.py", line 974, in _handle_command
2020-10-05T18:36:21.739384142Z     return self.handle_command(inbuf, cmd)
2020-10-05T18:36:21.739384142Z   File "/usr/share/ceph/mgr/volumes/module.py", line 270, in handle_command
2020-10-05T18:36:21.739384142Z     return handler(inbuf, cmd)
2020-10-05T18:36:21.739384142Z   File "/usr/share/ceph/mgr/volumes/module.py", line 338, in _cmd_fs_subvolume_getpath
2020-10-05T18:36:21.739384142Z     group_name=cmd.get('group_name', None))
2020-10-05T18:36:21.739384142Z   File "/usr/share/ceph/mgr/volumes/fs/volume.py", line 213, in subvolume_getpath
2020-10-05T18:36:21.739384142Z     with open_volume(self, volname) as fs_handle:
2020-10-05T18:36:21.739384142Z   File "/lib64/python3.6/contextlib.py", line 81, in __enter__
2020-10-05T18:36:21.739384142Z     return next(self.gen)
2020-10-05T18:36:21.739384142Z   File "/usr/share/ceph/mgr/volumes/fs/operations/volume.py", line 283, in open_volume
2020-10-05T18:36:21.739384142Z     fs_handle = vc.connection_pool.get_fs_handle(volname)
2020-10-05T18:36:21.739384142Z   File "/usr/share/ceph/mgr/volumes/fs/operations/volume.py", line 164, in get_fs_handle
2020-10-05T18:36:21.739384142Z     raise VolumeException(-e.args[0], e.args[1])
2020-10-05T18:36:21.739384142Z TypeError: bad operand type for unary -: 'str'

The traceback, rather than a graceful error seems to stem from not handling ETIMEDOUT errno (110), and requires a fix along the lines of https://github.com/ceph/ceph/pull/36180

The issue was seen on a Nautilus build as such, unsure if octopus or master/Pacific have the same issue.


Related issues

Related to CephFS - Bug #43762: pybind/mgr/volumes: create fails with TypeError Closed
Duplicates CephFS - Bug #46360: mgr/volumes: fs subvolume clones stuck in progress when libcephfs hits certain errors Resolved

History

#1 Updated by Patrick Donnelly 4 months ago

  • Description updated (diff)
  • Target version set to v16.0.0
  • Backport set to octopus,nautilus

#2 Updated by Patrick Donnelly 4 months ago

  • Status changed from New to Triaged
  • Assignee set to Kotresh Hiremath Ravishankar

#3 Updated by Patrick Donnelly 4 months ago

  • Related to Bug #43762: pybind/mgr/volumes: create fails with TypeError added

#4 Updated by Kotresh Hiremath Ravishankar 4 months ago

The PR https://github.com/ceph/ceph/pull/35934 has already fixed this issue. The issue is tracked by tracked by https://tracker.ceph.com/issues/46360. It's already back ported to nautilus and pending back port to octopus.

The fix is done in a generic manner so that any missing errnos also doesn't traceback. Please check the following.

https://github.com/ceph/ceph/pull/35934/commits/8992489cab6c0d09244c0640c6ec1a0e0f486b5a#diff-6b5d3d15c9af71de126ede1bed024879f233e84663ccd4ff0b862b0869734d26R372

#5 Updated by Kotresh Hiremath Ravishankar 4 months ago

  • Status changed from Triaged to Duplicate

Closing this as duplicate of https://tracker.ceph.com/issues/46360

#6 Updated by Patrick Donnelly 4 months ago

  • Duplicates Bug #46360: mgr/volumes: fs subvolume clones stuck in progress when libcephfs hits certain errors added

Also available in: Atom PDF