Project

General

Profile

Actions

Backport #37870

closed

mgr/dashboard: (Mimic) UnboundLocalError: local variable 'mirror_mode' referenced before assignment

Added by Sebastian Wagner over 5 years ago. Updated about 3 years ago.

Status:
Resolved
Priority:
Normal
Target version:
Release:
mimic
Pull request ID:
Crash signature (v1):
Crash signature (v2):

Description

Extracting from https://github.com/rook/rook/issues/2404

[07/Jan/2019:06:27:21] HTTP Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/cherrypy/_cprequest.py", line 656, in respond
    response.body = self.handler()
  File "/usr/lib/python2.7/site-packages/cherrypy/lib/encoding.py", line 188, in __call__
    self.body = self.oldhandler(*args, **kwargs)
  File "/usr/lib/python2.7/site-packages/cherrypy/lib/jsontools.py", line 61, in json_handler
    value = cherrypy.serving.request._json_inner_handler(*args, **kwargs)
  File "/usr/lib/python2.7/site-packages/cherrypy/_cpdispatch.py", line 34, in __call__
    return self.callable(*self.args, **self.kwargs)
  File "/usr/lib64/ceph/mgr/dashboard/controllers/summary.py", line 68, in __call__
    'rbd_mirroring': self._rbd_mirroring(),
  File "/usr/lib64/ceph/mgr/dashboard/controllers/summary.py", line 37, in _rbd_mirroring
    _, data = get_daemons_and_pools()
  File "/usr/lib64/ceph/mgr/dashboard/tools.py", line 212, in wrapper
    return rvc.run(fn, args, kwargs)
  File "/usr/lib64/ceph/mgr/dashboard/tools.py", line 194, in run
    raise self.exception
UnboundLocalError: local variable 'mirror_mode' referenced before assignment

and

Traceback (most recent call last):
  File "/usr/lib64/ceph/mgr/dashboard/controllers/rbd_mirroring.py", line 94, in get_pools
    mirror_mode = rbdctx.mirror_mode_get(ioctx)
  File "rbd.pyx", line 1195, in rbd.RBD.mirror_mode_get (/home/jenkins-build/build/workspace/ceph-build/ARCH/x86_64/AVAILABLE_ARCH/x86_64/AVAILABLE_DIST/centos7/DIST/centos7/MACHINE_SIZE/huge/release/13.2.2/rpm/el7/BUILD/ceph-13.2.2/build/src/pybind/rbd/pyrex/rbd.c:8543)
PermissionError: [errno 1] error getting mirror mode

Fix is most likely be a simple cherry-pick of this single line: https://github.com/ceph/ceph/commit/dc616c7d724a2580927ff8fb1fbc070d83dd67ef#diff-24e410817ffc0acf57da283811f4aa03R98

Actions #1

Updated by Lenz Grimmer over 5 years ago

  • Subject changed from Mimc dashboard: UnboundLocalError: local variable 'mirror_mode' referenced before assignment to mgr/dashboard: (Mimic) UnboundLocalError: local variable 'mirror_mode' referenced before assignment
  • Target version set to v13.2.5
Actions #2

Updated by Sebastian Wagner over 5 years ago

  • Pull request ID set to 26009
Actions #3

Updated by Sebastian Wagner over 5 years ago

  • Backport set to mimic
Actions #4

Updated by Lenz Grimmer over 5 years ago

  • Status changed from New to Fix Under Review
  • Assignee set to Sebastian Wagner
Actions #6

Updated by Nathan Cutler about 5 years ago

  • Status changed from Fix Under Review to Pending Backport
Actions #7

Updated by Nathan Cutler about 5 years ago

  • Copied to Backport #38210: mimic: mgr/dashboard: (Mimic) UnboundLocalError: local variable 'mirror_mode' referenced before assignment added
Actions #8

Updated by Nathan Cutler about 5 years ago

  • Tracker changed from Bug to Backport
  • Status changed from Pending Backport to Resolved
  • Release set to mimic

This was a mimic-only fix. The original PR mentioned above targets the mimic branch and will be included in 13.2.5.

Actions #9

Updated by Nathan Cutler about 5 years ago

  • Copied to deleted (Backport #38210: mimic: mgr/dashboard: (Mimic) UnboundLocalError: local variable 'mirror_mode' referenced before assignment)
Actions #10

Updated by Ernesto Puerta about 3 years ago

  • Project changed from mgr to Dashboard
Actions

Also available in: Atom PDF