Repository navigation
tentacle: mgr/dashboard: Add "connection get_io_statistics" to NVMeoF CLI - #67844
Conversation
f4faeb6 to
2ff6a94
Compare
2ff6a94 to
2f6df06
Compare
|
This PR should be combined with #68045 so the dashboard wouldn't break |
Hezko
left a comment
There was a problem hiding this comment.
just a tiny thing regarding the traddr param
2f6df06 to
e449ca7
Compare
|
This pull request can no longer be automatically merged: a rebase is needed and changes have to be manually resolved |
|
This PR has been added to wip-yuri5-testing-2026-05-14-1654-tentacle. |
|
This PR has been added to wip-yuri4-testing-20260630.192104-tentacle. |
|
jenkins test dashboard cephadm |
|
jenkins test dashboard cephadm |
|
jenkins test dashboard cephadm |
There was a problem hiding this comment.
Ceph Release Engineering Audit Report
Commit Parity Visualizer
| BACKPORT PR #67844 | SOURCE PR |
SOURCE STATUS |
|---|---|---|
| 7d1db65 mgr/dashboard: Add "connection get_io_statistics" to NVMeoF CLI | PR #67810 | d42c9cf mgr/dashboard: Add "connection get_io_statistics" to NVMeoF CLI |
Automated Backport Parity Review - Cherry-Pick Conflicts / Deviations
A conflict or deviation was detected during the simulation of this backport. The code in this PR does not match a clean cherry-pick of the upstream commits.
This does not necessarily indicate an issue but a maintainer should review.
**Click to expand conflict summaries.**
Deviation in Backport 7d1db65 (cherry-pick of d42c9cf)
Affected File(s)
src/pybind/mgr/dashboard/model/nvmeof.py
Range Diff
Click to expand
--- Original (d42c9cf1)
+++ Backport (7d1db655)
@@ -3,3 +3,5 @@
Fixes: https://tracker.ceph.com/issues/74964
Signed-off-by: Gil Bregman <[email protected]>
+(cherry picked from commit d42c9cf1e52c3ce06b6b538f436ee81a9fd973ee)
+Signed-off-by: Gil Bregman <[email protected]>
================================================================================
RANGE DIFF
================================================================================
1: d42c9cf1e52 ! 1: 7d1db655f8d mgr/dashboard: Add "connection get_io_statistics" to NVMeoF CLI
@@ Commit message
Fixes: https://tracker.ceph.com/issues/74964
Signed-off-by: Gil Bregman <[email protected]>
+ (cherry picked from commit d42c9cf1e52c3ce06b6b538f436ee81a9fd973ee)
+ Signed-off-by: Gil Bregman <[email protected]>
## src/pybind/mgr/dashboard/controllers/nvmeof.py ##
@@ src/pybind/mgr/dashboard/controllers/nvmeof.py: else:
)
return gw_listener_info
-+ @UpdatePermission
++ @ReadPermission
+ @Endpoint('PUT', '/io_stats')
+ @NvmeofCLICommand(
+ "nvmeof gateway set_io_stats_mode", model.RequestStatus,
-+ alias="nvmeof gw set_io_stats_mode",
-+ success_message_template="Set gateway IO statistics mode to {enabled}: Successful")
++ alias="nvmeof gw set_io_stats_mode")
+ @EndpointDoc(
+ "Enable or disable IO statistics collection",
+ parameters={
+ "enabled": Param(bool, "Enable IO statistics collection"),
+ "gw_group": Param(str, "NVMeoF gateway group", True, None),
-+ "server_address": Param(str, "NVMeoF gateway address", True, None),
+ },
+ )
+ @convert_to_model(model.RequestStatus)
+ @handle_nvmeof_error
-+ def set_io_stats_mode(self, enabled: bool, gw_group: Optional[str] = None,
-+ server_address: Optional[str] = None):
++ def set_io_stats_mode(self, enabled: bool, gw_group: Optional[str] = None):
+ io_stats = NVMeoFClient(gw_group=gw_group,
-+ server_address=server_address).stub.set_gateway_io_stats_mode(
++ ).stub.set_gateway_io_stats_mode(
+ NVMeoFClient.pb2.set_gateway_io_stats_mode_req(enabled=enabled)
+ )
+ return io_stats
@@ src/pybind/mgr/dashboard/controllers/nvmeof.py: else:
+ def create(self, nqn: str,
max_namespaces: Optional[int] = None, no_group_append: Optional[bool] = False,
serial_number: Optional[str] = None, dhchap_key: Optional[str] = None,
- gw_group: Optional[str] = None, server_address: Optional[str] = None):
-@@ src/pybind/mgr/dashboard/controllers/nvmeof.py: else:
- ).stub.create_subsystem(
+ gw_group: Optional[str] = None, traddr: Optional[str] = None):
+ return NVMeoFClient(gw_group=gw_group, traddr=traddr).stub.create_subsystem(
NVMeoFClient.pb2.create_subsystem_req(
subsystem_nqn=nqn, serial_number=serial_number,
- max_namespaces=max_namespaces, enable_ha=enable_ha,
@@ src/pybind/mgr/dashboard/controllers/nvmeof.py: else:
+ @NvmeofCLICommand(
+ "nvmeof connection get_io_statistics",
+ model.ConnectionIOStatistics,
-+ success_message_template="Please use JSON format to see the statistics"
+ )
+ @EndpointDoc(
+ "Get the IO statistics for a connection",
@@ src/pybind/mgr/dashboard/controllers/nvmeof.py: else:
+ "nqn": Param(str, "NVMeoF subsystem NQN"),
+ "host_nqn": Param(str, "NVMeoF host NQN"),
+ "gw_group": Param(str, "NVMeoF gateway group", True, None),
-+ "server_address": Param(str, "NVMeoF gateway address", True, None),
+ },
+ )
+ @convert_to_model(model.ConnectionIOStatistics)
@@ src/pybind/mgr/dashboard/controllers/nvmeof.py: else:
+ nqn: str,
+ host_nqn: str,
+ gw_group: Optional[str] = None,
-+ server_address: Optional[str] = None
++ traddr: Optional[str] = None
+ ):
+ return NVMeoFClient(
-+ gw_group=gw_group,
-+ server_address=server_address
++ gw_group=gw_group, traddr=traddr
+ ).stub.get_connection_io_statistics(
+ NVMeoFClient.pb2.get_connection_io_statistics_req(subsystem_nqn=nqn,
+ host_nqn=host_nqn,
@@ src/pybind/mgr/dashboard/controllers/nvmeof.py: else:
+ @NvmeofCLICommand(
+ "nvmeof connection reset_io_statistics",
+ model.ConnectionIOStatistics,
-+ success_message_template=(
-+ "Resetting host's {host_nqn} in {nqn} IO statistics: Successful"
-+ )
+ )
+ @EndpointDoc(
+ "Reset the IO statistics for a connection",
+ parameters={
+ "nqn": Param(str, "NVMeoF subsystem NQN"),
+ "host_nqn": Param(str, "NVMeoF host NQN"),
-+ "gw_group": Param(str, "NVMeoF gateway group", True, None),
-+ "server_address": Param(str, "NVMeoF gateway address", True, None),
++ "gw_group": Param(str, "NVMeoF gateway group", True, None)
+ },
+ )
+ @convert_to_model(model.ConnectionIOStatistics)
@@ src/pybind/mgr/dashboard/controllers/nvmeof.py: else:
+ nqn: str,
+ host_nqn: str,
+ gw_group: Optional[str] = None,
-+ server_address: Optional[str] = None
++ traddr: Optional[str] = None
+ ):
+ return NVMeoFClient(
-+ gw_group=gw_group,
-+ server_address=server_address
++ gw_group=gw_group, traddr=traddr
+ ).stub.get_connection_io_statistics(
+ NVMeoFClient.pb2.get_connection_io_statistics_req(subsystem_nqn=nqn,
+ host_nqn=host_nqn,
@@ src/pybind/mgr/dashboard/controllers/nvmeof.py: else:
@Endpoint('GET', '/status')
## src/pybind/mgr/dashboard/model/nvmeof.py ##
-@@ src/pybind/mgr/dashboard/model/nvmeof.py: class GatewayInfo(NamedTuple):
- max_namespaces: Annotated[int, CliFlags.DROP]
- max_namespaces_per_subsystem: Annotated[int, CliFlags.DROP]
- max_subsystems: Annotated[int, CliFlags.DROP]
-+ gateway_initialization_over: Annotated[bool, CliFlags.DROP]
-+ io_stats_enabled: Annotated[bool, CliFlags.DROP]
- spdk_version: Optional[str] = ""
-
-
@@ src/pybind/mgr/dashboard/model/nvmeof.py: class ConnectionList(NamedTuple):
connections: Annotated[List[Connection], CliFlags.EXCLUSIVE_LIST]
@@ src/pybind/mgr/dashboard/openapi.yaml: paths:
+ gw_group:
+ description: NVMeoF gateway group
+ type: string
-+ server_address:
-+ description: NVMeoF gateway address
-+ type: string
+ required:
+ - enabled
+ type: object
+ responses:
+ '200':
+ content:
-+ application/json:
-+ schema:
-+ type: object
+ application/vnd.ceph.api.v1.0+json:
-+ schema:
-+ type: object
++ type: object
+ description: Resource updated.
+ '202':
+ content:
-+ application/json:
-+ schema:
-+ type: object
+ application/vnd.ceph.api.v1.0+json:
-+ schema:
-+ type: object
++ type: object
+ description: Operation is still executing. Please check the task queue.
+ '400':
+ description: Operation exception. Please check the response body for details.How to proceed:
- Authors (Genuine Conflicts): If this is a genuine conflict requiring manual resolution, ensure your resolution is correct. You must explain the conflict resolution in the commit message (e.g., leave the standard Git
Conflicts:block intact) and include an explanation for changes. - Authors (Need Help?): Reach out to the Component Lead for technical guidance on complex code conflicts.
- Component Leads (Review): Please review the Range Diff(s) above to verify the author's manual conflict resolution is correct for this release branch. If the deviation is intentional, documented, and approved then the component lead or @ceph/ceph-release-manager can bypass this check by commenting
/audit override.
Be familiar with the rules and guidelines for writing backports.
🛟 Need Help?
If you need technical help resolving these issues, please consult with the Component Lead. If you need administrative overrides, please see the #ceph-upstream-releases channel on Slack and request a review from the @ceph/ceph-release-manager.
📋 Component Lead / Release Manager
To override the audit failure, apply releng-audit-override label or comment /audit override.
When you are ready for a new audit, please remove the releng-audit-fail label or comment /audit retest.
|
✅ Audit Override Applied by @batrick. |
backport tracker: https://tracker.ceph.com/issues/75559
backport of #67810
parent tracker: https://tracker.ceph.com/issues/74964
this backport was staged using ceph-backport.sh version 16.0.0.6848
find the latest version at https://github.com/ceph/ceph/blob/main/src/script/ceph-backport.sh