-
Notifications
You must be signed in to change notification settings - Fork 53
Open
Open
Copy link
Labels
Description
I created listener not via the cli.
according to the proto file, some fields are "optional" , means there are default value.
e.g. for "adrfam" field, the point is if adrfam was not provided, it took the default (ipv4)
then the MessageToJson
function convert the request to json, but it ignore the default fields .
in this section on the code:
if context:
# Update gateway state
try:
json_req = json_format.MessageToJson(
request, preserving_proto_field_name=True,
including_default_value_fields=True)
self.logger.info(f"create_listener json_req: {json_req}")
self.gateway_state.add_listener(request.nqn,
request.host_name,
"TCP", request.traddr,
request.trsvcid, json_req)
after listener seemingly created:
Aug 04 17:01:03 cephnvme-vm9 bash[1109071]: [04-Aug-2025 14:01:03] INFO grpc.py:4926 (7): Received request to create cephnvme-vm9 TCP ipv4 listener for nqn.2016-06.io.ceph:subsystem.test-integration at 10.242.64.32:4420, secure: False, verify host name: False, context: <grpc._server._Context object at 0x7fbf68d6e040>, client address: IPv4 10.242.64.33:54267
Aug 04 17:01:03 cephnvme-vm9 bash[1109071]: [04-Aug-2025 14:01:03] INFO grpc.py:5105 (7): create_listener json_req: {
Aug 04 17:01:03 cephnvme-vm9 bash[1109071]: "nqn": "nqn.2016-06.io.ceph:subsystem.test-integration",
Aug 04 17:01:03 cephnvme-vm9 bash[1109071]: "host_name": "cephnvme-vm9",
Aug 04 17:01:03 cephnvme-vm9 bash[1109071]: "traddr": "10.242.64.32",
Aug 04 17:01:03 cephnvme-vm9 bash[1109071]: "trsvcid": 4420
Aug 04 17:01:03 cephnvme-vm9 bash[1109071]: }
Aug 04 17:01:03 cephnvme-vm9 bash[1109071]: [04-Aug-2025 14:01:03] INFO state.py:929 (7): omap_key generated: listener_nqn.2016-06.io.ceph:subsystem.test-integration_cephnvme-vm9_TCP_10.242.64.32_4420, OMAP version: 24
I ran listener list:
# docker run -it --rm quay.io/ceph/nvmeof-cli:1.5.7 --server-address 10.242.64.32 --server-port 5500 listener list --subsystem nqn.2016-06.io.ceph:subsystem.test-integration
No listeners for nqn.2016-06.io.ceph:subsystem.test-integration
and from the log:
Aug 04 17:02:17 cephnvme-vm9 bash[1109071]: [04-Aug-2025 14:02:17] INFO grpc.py:5317 (7): Received request to list listeners for nqn.2016-06.io.ceph:subsystem.test-integration, context: <grpc._server._Context object at 0x7fbf67218910>, client address: IPv4 172.17.0.2:42560
Aug 04 17:02:17 cephnvme-vm9 bash[1109071]: [04-Aug-2025 14:02:17] INFO state.py:481 (7): Succeeded to lock OMAP file (exclusive) after 1 retries
Aug 04 17:02:17 cephnvme-vm9 bash[1109071]: [04-Aug-2025 14:02:17] ERROR grpc.py:5366 (7): Got exception while parsing {
Aug 04 17:02:17 cephnvme-vm9 bash[1109071]: "nqn": "nqn.2016-06.io.ceph:subsystem.test-integration",
Aug 04 17:02:17 cephnvme-vm9 bash[1109071]: "host_name": "cephnvme-vm9",
Aug 04 17:02:17 cephnvme-vm9 bash[1109071]: "traddr": "10.242.64.32",
Aug 04 17:02:17 cephnvme-vm9 bash[1109071]: "trsvcid": 4420
Aug 04 17:02:17 cephnvme-vm9 bash[1109071]: }
Aug 04 17:02:17 cephnvme-vm9 bash[1109071]: Traceback (most recent call last):
Aug 04 17:02:17 cephnvme-vm9 bash[1109071]: File "/src/control/grpc.py", line 5346, in list_listeners_safe
Aug 04 17:02:17 cephnvme-vm9 bash[1109071]: lookfor = (listener["adrfam"].lower(), listener["traddr"],
Aug 04 17:02:17 cephnvme-vm9 bash[1109071]: KeyError: 'adrfam'
maybe need to check in all places there are optional filed and using MessageToJson
Metadata
Metadata
Assignees
Labels
Type
Projects
Status
🆕 New