From: Kiefer Chang Date: Wed, 2 Sep 2020 12:48:02 +0000 (+0800) Subject: mgr/cephadm: do not configure Dashboard Ganesha settings X-Git-Tag: v15.2.8~5^2~1^2~2^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F37885%2Fhead;p=ceph.git 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 --- diff --git a/src/pybind/mgr/cephadm/module.py b/src/pybind/mgr/cephadm/module.py index b2b613e696a4..f54384313811 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 bbe6a3d65148..41c6a93a589a 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