From 6ea36054fc7b5d0cc117840958998fd754f2e22b Mon Sep 17 00:00:00 2001 From: Kiefer Chang Date: Wed, 2 Sep 2020 20:48:02 +0800 Subject: [PATCH] mgr/cephadm: do not configure Dashboard Ganesha settings 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 (cherry picked from commit 99e421065748c03da1fc468b2a09bf22f7bc31b0) Conflicts: src/pybind/mgr/cephadm/services/nfs.py --- src/pybind/mgr/cephadm/module.py | 2 +- src/pybind/mgr/cephadm/services/nfs.py | 28 +------------------------- 2 files changed, 2 insertions(+), 28 deletions(-) diff --git a/src/pybind/mgr/cephadm/module.py b/src/pybind/mgr/cephadm/module.py index b2b613e696a4c..f543843138113 100644 --- a/src/pybind/mgr/cephadm/module.py +++ b/src/pybind/mgr/cephadm/module.py @@ -2108,7 +2108,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( diff --git a/src/pybind/mgr/cephadm/services/nfs.py b/src/pybind/mgr/cephadm/services/nfs.py index bbe6a3d651484..41c6a93a589a2 100644 --- a/src/pybind/mgr/cephadm/services/nfs.py +++ b/src/pybind/mgr/cephadm/services/nfs.py @@ -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]): - - 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 -- 2.39.5