]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr/cephadm: do not configure Dashboard Ganesha settings 36948/head
authorKiefer Chang <kiefer.chang@suse.com>
Wed, 2 Sep 2020 12:48:02 +0000 (20:48 +0800)
committerKiefer Chang <kiefer.chang@suse.com>
Mon, 19 Oct 2020 11:11:17 +0000 (19:11 +0800)
The Dashboard can get cluster information from the Orchestrator.
For settings that are set by previous revisions, the Dashboard will
check them and ask user to remove them.

Signed-off-by: Kiefer Chang <kiefer.chang@suse.com>
src/pybind/mgr/cephadm/module.py
src/pybind/mgr/cephadm/services/nfs.py

index e85768b555cee0f32cdc457790ed5902fe0dcde8..fe10fbb74cbb5b790ebc095143528cdb8d11e3d3 100644 (file)
@@ -1773,7 +1773,7 @@ To check that the host is reachable:
                 sd.status = 1
                 sd.status_desc = 'starting'
                 self.cache.add_daemon(daemon_spec.host, sd)
-                if daemon_spec.daemon_type in ['grafana', 'iscsi', 'prometheus', 'alertmanager', 'nfs']:
+                if daemon_spec.daemon_type in ['grafana', 'iscsi', 'prometheus', 'alertmanager']:
                     self.requires_post_actions.add(daemon_spec.daemon_type)
             self.cache.invalidate_host_daemons(daemon_spec.host)
             self.cache.update_daemon_config_deps(
index addb1334d1de22eb71502a8c53f7d84c4b5df0b7..41c6a93a589a29d4469d23cc906153b44b77128e 100644 (file)
@@ -1,5 +1,5 @@
 import logging
-from typing import TYPE_CHECKING, Dict, Optional, Tuple, Any, List, Set, cast
+from typing import TYPE_CHECKING, Dict, Tuple, Any, List
 
 from ceph.deployment.service_spec import NFSServiceSpec
 import rados
@@ -88,32 +88,6 @@ class NFSService(CephService):
 
         return get_cephadm_config(), deps
 
-    def config_dashboard(self, daemon_descrs: List[DaemonDescription]) -> None:
-
-        def get_set_cmd_dicts(out: str) -> List[dict]:
-            locations: Set[str] = set()
-            for dd in daemon_descrs:
-                spec = cast(NFSServiceSpec,
-                            self.mgr.spec_store.specs.get(dd.service_name(), None))
-                if not spec or not spec.service_id:
-                    logger.warning('No ServiceSpec or service_id found for %s', dd)
-                    continue
-                location = '{}:{}'.format(spec.service_id, spec.pool)
-                if spec.namespace:
-                    location = '{}/{}'.format(location, spec.namespace)
-                locations.add(location)
-            new_value = ','.join(locations)
-            if new_value and new_value != out:
-                return [{'prefix': 'dashboard set-ganesha-clusters-rados-pool-namespace',
-                         'value': new_value}]
-            return []
-
-        self._check_and_set_dashboard(
-            service_name='Ganesha',
-            get_cmd='dashboard get-ganesha-clusters-rados-pool-namespace',
-            get_set_cmd_dicts=get_set_cmd_dicts
-        )
-
     def create_keyring(self, daemon_spec: CephadmDaemonSpec) -> str:
         assert daemon_spec.spec
         daemon_id = daemon_spec.daemon_id