Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exception when deleting the discovery sub-system #299

Closed
gbregman opened this issue Oct 31, 2023 · 1 comment · Fixed by #302
Closed

Exception when deleting the discovery sub-system #299

gbregman opened this issue Oct 31, 2023 · 1 comment · Fixed by #302
Assignees

Comments

@gbregman
Copy link
Contributor

When enable_spdk_discovery_controller is set to True we see the discovery NQN "nqn.2014-08.org.nvmexpress.discovery" when running a get_subsystems CLI command. If we try to delete this sub-system we get an exception:

ceph-nvmeof-nvmeof-1  | INFO:control.grpc:delete_subsystem nqn.2014-08.org.nvmexpress.discovery: True
ceph-nvmeof-nvmeof-1  | DEBUG:control.state:omap_key removed: subsystem_nqn.2014-08.org.nvmexpress.discovery
ceph-nvmeof-nvmeof-1  | ERROR:control.grpc:Error persisting delete_subsystem nqn.2014-08.org.nvmexpress.discovery: 'subsystem_nqn.2014-08.org.nvmexpress.discovery'
ceph-nvmeof-nvmeof-1  | ERROR:grpc._server:Exception calling application: 'subsystem_nqn.2014-08.org.nvmexpress.discovery'
ceph-nvmeof-nvmeof-1  | Traceback (most recent call last):
ceph-nvmeof-nvmeof-1  |   File "/src/__pypackages__/3.9/lib/grpc/_server.py", line 494, in _call_behavior
ceph-nvmeof-nvmeof-1  |     response_or_iterator = behavior(argument, context)
ceph-nvmeof-nvmeof-1  |   File "/src/control/grpc.py", line 324, in delete_subsystem
ceph-nvmeof-nvmeof-1  |     return self.delete_subsystem_safe(request, context)
ceph-nvmeof-nvmeof-1  |   File "/src/control/grpc.py", line 314, in delete_subsystem_safe
ceph-nvmeof-nvmeof-1  |     self.gateway_state.remove_subsystem(request.subsystem_nqn)
ceph-nvmeof-nvmeof-1  |   File "/src/control/state.py", line 400, in remove_subsystem
ceph-nvmeof-nvmeof-1  |     self.local.remove_subsystem(subsystem_nqn)
ceph-nvmeof-nvmeof-1  |   File "/src/control/state.py", line 75, in remove_subsystem
ceph-nvmeof-nvmeof-1  |     self._remove_key(key)
ceph-nvmeof-nvmeof-1  |   File "/src/control/state.py", line 135, in _remove_key
ceph-nvmeof-nvmeof-1  |     self.state.pop(key)
ceph-nvmeof-nvmeof-1  | KeyError: 'subsystem_nqn.2014-08.org.nvmexpress.discovery'

We need to decide how do we want to handle such a deletion. Should we allow it? Should we check for this value and fail the CLI? And if we allow it, should we allow creating a sub-system with this NQN?

@github-project-automation github-project-automation bot moved this to 🆕 New in NVMe-oF Oct 31, 2023
@gbregman gbregman self-assigned this Oct 31, 2023
@gbregman
Copy link
Contributor Author

When we use the discovery python script we delete subsystem "nqn.2014-08.org.nvmexpress.discovery" from SPDK. Now we can use a create_subsystem CLI command to create a subsystem with that NQN. This subsystem still has a type of NVMe and not discovery but its NQN is one of a discovery subsystem. This key is added to OMAP. Could it clash with other gateways? Wouldn't it be simpler to not allow is in the CLI? The NQN should be a unique value which identifies a subsystem. In this case it is not.

gbregman added a commit to gbregman/ceph-nvmeof that referenced this issue Oct 31, 2023
@github-project-automation github-project-automation bot moved this from 🆕 New to ✅ Done in NVMe-oF Oct 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

1 participant