]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/pybind/mgr/rook/rook_cluster.py
import ceph 16.2.7
[ceph.git] / ceph / src / pybind / mgr / rook / rook_cluster.py
index 4fd660430364179cdd6fc3c4fbb704e87cd744e8..323ac68888f4c9b6d324e6bfd70d4c2e7a5b8be2 100644 (file)
@@ -23,6 +23,7 @@ from urllib3.exceptions import ProtocolError
 from ceph.deployment.drive_group import DriveGroupSpec
 from ceph.deployment.service_spec import ServiceSpec, NFSServiceSpec, RGWSpec
 from ceph.utils import datetime_now
+from mgr_module import NFS_POOL_NAME
 from mgr_util import merge_dicts
 
 from typing import Optional, TypeVar, List, Callable, Any, cast, Generic, \
@@ -41,10 +42,8 @@ from .rook_client.ceph import cephobjectstore as cos
 from .rook_client.ceph import cephcluster as ccl
 from .rook_client._helper import CrdClass
 
-
 import orchestrator
 
-
 try:
     from rook.module import RookEnv
 except ImportError:
@@ -491,7 +490,7 @@ class RookCluster(object):
                         ),
                     spec=cnfs.Spec(
                         rados=cnfs.Rados(
-                            pool=spec.pool
+                            pool=NFS_POOL_NAME,
                             ),
                         server=cnfs.Server(
                             active=count
@@ -499,8 +498,7 @@ class RookCluster(object):
                         )
                     )
 
-            if spec.namespace:
-                rook_nfsgw.spec.rados.namespace = spec.namespace
+            rook_nfsgw.spec.rados.namespace = cast(str, spec.service_id)
 
             return rook_nfsgw