Project

General

Profile

Bug #52928

mgr: when importing from NFS module in Dashboard module, Dashboard module is IMPERSONATING the NFS module

Added by Alfonso Martínez about 2 months ago. Updated about 2 months ago.

Status:
New
Priority:
High
Assignee:
-
Category:
ceph-mgr
Target version:
% Done:

0%

Source:
Tags:
Backport:
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Pull request ID:
Crash signature (v1):
Crash signature (v2):

Description

The side effect of importing from NFS module is that Dashboard module is
IMPERSONATING the NFS module: NFS module is loaded but in fact is the Dashboard module.

We should re-visit the way we name (and import) modules in order to avoid side effects.

See:
https://github.com/ceph/ceph/pull/42526#pullrequestreview-739189988
https://gist.github.com/varshar16/61ac26426bbe5f5f562ebb14bcd0f548

 File "/home/varsha/ceph/src/pybind/mgr/mgr_module.py", line 1567, in _handle_command
    return CLICommand.COMMANDS[cmd['prefix']].call(self, cmd, inbuf)
  File "/home/varsha/ceph/src/pybind/mgr/mgr_module.py", line 416, in call
    return self.func(mgr, **kwargs)
  File "/home/varsha/ceph/src/pybind/mgr/nfs/module.py", line 100, in _cmd_nfs_cluster_create
    return self.nfs.create_nfs_cluster(cluster_id=cluster_id, placement=placement,
AttributeError: 'Module' object has no attribute 'nfs'

History

Also available in: Atom PDF