@staticmethod
def get_version(ctx: CephadmContext, container_id: str) -> Optional[str]:
- out, err, ret = call_throws(ctx, [
- ctx.container_engine.path, 'inspect',
- '--format', '{{index .Config.Labels "io.ceph.version"}}',
- ctx.image])
+ out, err, ret = call(ctx,
+ [ctx.container_engine.path, 'inspect',
+ '--format', '{{index .Config.Labels "io.ceph.version"}}',
+ ctx.image])
version = None
if ret == 0:
version = out.strip()
lines = HAproxy.get_sysctl_settings()
elif daemon_type == 'keepalived':
lines = Keepalived.get_sysctl_settings()
- elif daemon_type == 'nvmeof':
+ elif daemon_type == CephNvmeof.daemon_type:
lines = CephNvmeof.get_sysctl_settings()
lines = filter_sysctl_settings(ctx, lines)
if action == 'rotate-key':
if d.daemon_type not in ['mgr', 'osd', 'mds',
- 'rgw', 'crash', 'nfs', 'rbd-mirror', 'iscsi', 'nvmeof']:
+ 'rgw', 'crash', 'nfs', 'rbd-mirror', 'iscsi']:
raise OrchestratorError(
f'key rotation not supported for {d.daemon_type}'
)
deps = [self.iscsi_service.get_trusted_ips(iscsi_spec)]
else:
deps = [self.get_mgr_ip()]
- elif daemon_type == 'nvmeof':
- deps = [] # TODO(redo)
elif daemon_type == 'prometheus':
# for prometheus we add the active mgr as an explicit dependency,
# this way we force a redeploy after a mgr failover
import errno
-import json
import logging
from typing import List, cast, Optional
daemon_spec.keyring = keyring
daemon_spec.extra_files = {'ceph-nvmeof.conf': gw_conf}
daemon_spec.final_config, daemon_spec.deps = self.generate_config(daemon_spec)
- daemon_spec.deps = [] # TODO: which gw parameters will require a reconfig?
+ daemon_spec.deps = []
return daemon_spec
def config_dashboard(self, daemon_descrs: List[DaemonDescription]) -> None:
Called after the daemon is removed.
"""
logger.debug(f'Post remove daemon {self.TYPE}.{daemon.daemon_id}')
-
# TODO: remove config for dashboard nvmeof gateways if any
- # needed to know if we have ssl stuff for nvmeof in ceph config
- nvmeof_config_dict = {}
- ret, nvmeof_config, err = self.mgr.mon_command({
- 'prefix': 'config-key dump',
- 'key': 'nvmeof',
- })
- if nvmeof_config:
- nvmeof_config_dict = json.loads(nvmeof_config)
-
- # remove nvmeof cert and key from ceph config
- for nvmeof_key, value in nvmeof_config_dict.items():
- if f'nvmeof/client.{daemon.name()}/' in nvmeof_key:
- ret, out, err = self.mgr.mon_command({
- 'prefix': 'config-key rm',
- 'key': nvmeof_key,
- })
- logger.info(f'{nvmeof_key} removed from ceph config')
+ # and any certificates being used for mTLS
def purge(self, service_name: str) -> None:
"""Removes configuration