Repository navigation
mgr/dashboard : Subsystem Overview incorrectly displays "Restrict to specific hosts" when no active initiators are configured - #70769
Conversation
There was a problem hiding this comment.
🟡 Not ready to approve
The untyped initiator API response causes a TypeScript type-check failure at the new normalization call.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
This review doesn't count toward merge requirements. Sign up for the private preview to control whether Copilot approvals count.
Pull request overview
Fixes NVMe-oF subsystem host-access status display by considering both subsystem configuration and active initiators.
Changes:
- Adds shared initiator normalization and host-access helpers.
- Updates overview labels/icons and initiator-list logic.
- Adds regression tests for wildcard removal and presence.
File summaries
| File | Description |
|---|---|
shared/models/nvmeof.ts |
Adds shared host-access utilities. |
nvmeof-subsystem-overview.component.ts |
Derives and displays effective host access. |
nvmeof-subsystem-overview.component.html |
Adds localized status text and icon. |
nvmeof-subsystem-overview.component.spec.ts |
Tests wildcard host scenarios. |
nvmeof-initiators-list.component.ts |
Reuses shared normalization and access logic. |
Review details
- Files reviewed: 5/5 changed files
- Comments generated: 1
- Review effort level: Balanced
We're testing this review assessment. Please use 👍 or 👎 to tell us if it's correct.
67ab5db to
fd02371
Compare
There was a problem hiding this comment.
🟡 Not ready to approve
The untyped initiator response causes a TypeScript type-checking error.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
This review doesn't count toward merge requirements. Sign up for the private preview to control whether Copilot approvals count.
Review details
Suppressed comments (2)
src/pybind/mgr/dashboard/frontend/src/app/ceph/block/nvmeof-subsystem-overview/nvmeof-subsystem-overview.component.ts:90
getInitiators()is inferred asObservable<Object>because itsHttpClient.getcall has no response generic (shared/api/nvmeof.service.ts:299-300). Passing that value directly tonormalizeInitiators()fails TypeScript type checking. Please type the service response asNvmeofInitiatorsResponse(preferred) or explicitly narrow/cast it here.
const initiatorList = normalizeInitiators(initiators);
src/pybind/mgr/dashboard/frontend/src/app/shared/models/nvmeof.ts:131
- This final sentence contradicts the documented empty-list case and the implementation below: removing
*from a list where it is the only entry leaves an empty list, which still returnstrue. Clarify that restriction applies when specific hosts remain after removal.
* list or the synthetic "*" (Any) initiator. Removing that initiator means
* access is restricted even if `allow_any_host` still reports true.
- Files reviewed: 5/5 changed files
- Comments generated: 0 new
- Review effort level: Balanced
We're testing this review assessment. Please use 👍 or 👎 to tell us if it's correct.
afreen23
left a comment
There was a problem hiding this comment.
Solid refactor. Extracting normalizeInitiators and isSubsystemAllowAllHosts into the shared model is the right call — deduplicates logic across initiators-list and subsystem-overview.
The core fix (checking initiator list for * entry rather than trusting allow_any_host alone) is correct. Tests cover both the lag scenario and the synthetic * case.
Two things to address:
1. disable: () => false removes the guard on Add Initiator entirely
The old code disabled the "Add" button when hasAllHostsAllowed() was true. This PR changes it to disable: () => false, meaning the button is always enabled even when allow-all-hosts is active. Was this intentional? If a user has "Allow all hosts" configured, adding individual initiators is contradictory. If this is intentional, add a comment explaining why.
2. getStatusIcon for host-access detail uses detail.value which is now a boolean
In the template:
<cd-icon [type]="getStatusIcon(detail)" class="cds-mr-3"></cd-icon>getStatusIcon returns detail.value ? 'success' : 'error'. For "Allow all hosts" (value=true) you get a green check, for "Restrict" (value=false) you get a red X. Is "Restrict to specific hosts" really an error state? Restricting access is a security-positive action — showing a red error icon for it is misleading. Consider using 'info' or 'warning' for restrict, or just drop the icon for this field since it's not a health indicator.
fd02371 to
dc8625c
Compare
dc8625c to
5060723
Compare
5060723 to
6f4538e
Compare
afreen23
left a comment
There was a problem hiding this comment.
Re-review after COMMENTED review.
Issue #2 (status icon for host-access): ADDRESSED. The getStatusIcon method is removed, replaced with getHostAccessLabel returning plain text. The template no longer renders a success/error icon for host-access, and the HTML comment explains the reasoning. Good fix.
Issue #1 (disable guard on Add Initiator): NOT ADDRESSED. disable: () => false is still present with no reply or explanation. The old code disabled the Add button when hasAllHostsAllowed() returned true, which prevented users from adding individual initiators when allow-all-hosts is active (a contradictory operation). If removing this guard is intentional, please explain why and add a comment. If it was accidental, restore the disable logic.
New issues below.
6f4538e to
2f0751b
Compare
2f0751b to
8e7d3bb
Compare
8e7d3bb to
bc1ab97
Compare
afreen23
left a comment
There was a problem hiding this comment.
LGTM. All previous feedback addressed -- type safety on getInitiators, doc comment, blank line cleanup. Shared model additions (normalizeInitiators, isSubsystemAllowAllHosts, NvmeofInitiatorsResponse) are clean and the third consumer (nvmeof-edit-authentication) is compatible.
…specific hosts" when no active initiators are configured Fixes :https://tracker.ceph.com/issues/78953 Signed-off-by: pujaoshahu <[email protected]>
bc1ab97 to
fcf50fa
Compare
|
jenkins test dashboard |
|
jenkins test dashboard cephadm |
|
jenkins test dashboard |
|
jenkins test dashboard cephadm |
|
jenkins test dashboard |
|
jenkins test dashboard cephadm |
|
jenkins test dashboard |
|
jenkins test dashboard cephadm |
2 similar comments
|
jenkins test dashboard cephadm |
|
jenkins test dashboard cephadm |
|
This is an automated message by src/script/redmine-upkeep.py. I have resolved the following tracker ticket due to the merge of this PR: No backports are pending for the ticket. If this is incorrect, please update the tracker |
…ntacle backport Add SAVE_CHANGES label constant to ActionLabelsI18n (backported from PR ceph#68845) required by PR ceph#70937 cherry-pick. Cherry-pick PR ceph#70769 adds normalizeInitiators and isSubsystemAllowAllHosts to nvmeof model required by PR ceph#71291. Signed-off-by: Afreen Misbah <[email protected]>
Screencast.From.2026-08-03.14-16-57.mp4
Screencast.From.2026-08-03.14-17-46.mp4
Fixes :https://tracker.ceph.com/issues/78953
Signed-off-by: pujaoshahu [email protected]
Summary :
The Subsystem Overview page incorrectly displays the Host Access status as "Restrict to specific hosts" even when there are no active initiators configured for the subsystem. This results in an inaccurate representation of the subsystem's access configuration. The fix updates the logic to display the correct host access status based on the presence of active initiators.
Contribution Guidelines
To sign and title your commits, please refer to Submitting Patches to Ceph.
If you are submitting a fix for a stable branch (e.g. "quincy"), please refer to Submitting Patches to Ceph - Backports for the proper workflow.
When filling out the below checklist, you may click boxes directly in the GitHub web UI. When entering or editing the entire PR message in the GitHub web UI editor, you may also select a checklist item by adding an
xbetween the brackets:[x]. Spaces and capitalization matter when checking off items this way.Checklist
Show available Jenkins commands
jenkins test classic perfJenkins Job | Jenkins Job Definitionjenkins test crimson perfJenkins Job | Jenkins Job Definitionjenkins test signedJenkins Job | Jenkins Job Definitionjenkins test make checkJenkins Job | Jenkins Job Definitionjenkins test make check arm64Jenkins Job | Jenkins Job Definitionjenkins test submodulesJenkins Job | Jenkins Job Definitionjenkins test dashboardJenkins Job | Jenkins Job Definitionjenkins test dashboard cephadmJenkins Job | Jenkins Job Definitionjenkins test apiJenkins Job | Jenkins Job Definitionjenkins test docsReadTheDocs | Github Workflow Definitionjenkins test ceph-volume allJenkins Jobs | Jenkins Jobs Definitionjenkins test windowsJenkins Job | Jenkins Job Definitionjenkins test rook e2eJenkins Job | Jenkins Job DefinitionYou must only issue one Jenkins command per-comment. Jenkins does not understand
comments with more than one command.