From: Dnyaneshwari Talwekar Date: Wed, 22 Apr 2026 09:50:18 +0000 (+0530) Subject: mgr/dashboard: Difference in "path" value observed when rgw user level export created... X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=0efa59c305ca4c0f4488c27c0f946c7afbf3d5f6;p=ceph.git mgr/dashboard: Difference in "path" value observed when rgw user level export created via dashboard vs cli Fixes: https://tracker.ceph.com/issues/75425 Signed-off-by: Dnyaneshwari Talwekar --- diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/nfs/models/nfs.fsal.ts b/src/pybind/mgr/dashboard/frontend/src/app/ceph/nfs/models/nfs.fsal.ts index cbdc44f3ca8c..c8755e00dec5 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/nfs/models/nfs.fsal.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/nfs/models/nfs.fsal.ts @@ -1,3 +1,5 @@ +export const RGW_USER_EXPORT_PATH = '/'; + export enum SUPPORTED_FSAL { CEPH = 'CEPH', RGW = 'RGW' diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/nfs/nfs-form/nfs-form.component.ts b/src/pybind/mgr/dashboard/frontend/src/app/ceph/nfs/nfs-form/nfs-form.component.ts index 57458174dac6..dee02d762c59 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/nfs/nfs-form/nfs-form.component.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/nfs/nfs-form/nfs-form.component.ts @@ -12,7 +12,7 @@ import _ from 'lodash'; import { forkJoin, Observable, of } from 'rxjs'; import { catchError, debounceTime, distinctUntilChanged, map, mergeMap } from 'rxjs/operators'; -import { SUPPORTED_FSAL } from '~/app/ceph/nfs/models/nfs.fsal'; +import { RGW_USER_EXPORT_PATH, SUPPORTED_FSAL } from '~/app/ceph/nfs/models/nfs.fsal'; import { Directory, NfsService } from '~/app/shared/api/nfs.service'; import { RgwBucketService } from '~/app/shared/api/rgw-bucket.service'; import { RgwSiteService } from '~/app/shared/api/rgw-site.service'; @@ -657,7 +657,7 @@ export class NfsFormComponent extends CdForm implements OnInit { if (requestModel.rgw_export_type === 'bucket') { delete requestModel.fsal.user_id; } else { - requestModel.path = ''; + requestModel.path = RGW_USER_EXPORT_PATH; } } else { delete requestModel.fsal.user_id; diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/nfs/nfs-list/nfs-list.component.ts b/src/pybind/mgr/dashboard/frontend/src/app/ceph/nfs/nfs-list/nfs-list.component.ts index 42934a3d6259..2bf3825bdd7b 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/nfs/nfs-list/nfs-list.component.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/nfs/nfs-list/nfs-list.component.ts @@ -23,7 +23,7 @@ import { AuthStorageService } from '~/app/shared/services/auth-storage.service'; import { TaskListService } from '~/app/shared/services/task-list.service'; import { TaskWrapperService } from '~/app/shared/services/task-wrapper.service'; import { getFsalFromRoute, getPathfromFsal } from '../utils'; -import { SUPPORTED_FSAL } from '../models/nfs.fsal'; +import { RGW_USER_EXPORT_PATH, SUPPORTED_FSAL } from '../models/nfs.fsal'; import { ModalCdsService } from '~/app/shared/services/modal-cds.service'; import { DeletionImpact } from '~/app/shared/enum/delete-confirmation-modal-impact.enum'; @@ -113,7 +113,9 @@ export class NfsListComponent extends ListWithDetails implements OnInit, OnDestr `/${prefix}/nfs/edit/${getNfsUri()}`, { rgw_export_type: - this.fsal === SUPPORTED_FSAL.RGW && !_.isEmpty(this.selection?.first()?.path) + this.fsal === SUPPORTED_FSAL.RGW && + !_.isEmpty(this.selection?.first()?.path) && + this.selection?.first()?.path !== RGW_USER_EXPORT_PATH ? RgwExportType.BUCKET : RgwExportType.USER }