Actions
Bug #52928
openmgr: when importing from NFS module in Dashboard module, Dashboard module is IMPERSONATING the NFS module
% 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'
Updated by Sebastian Wagner over 2 years ago
This is due to the use of a global variable. The orch modules use https://github.com/ceph/ceph/blob/d009895a6b2147a8f6f5bb32add778acdc42d598/src/pybind/mgr/orchestrator/_interface.py#L92-L170 to avoid this
Actions