'public_network is set but does not look like a CIDR network: \'%s\'' % network)
extra_config += 'public network = %s\n' % network
- daemon_spec.extra_config = {'config': extra_config}
+ daemon_spec.ceph_conf = extra_config
daemon_spec.keyring = keyring
- return self.mgr._create_daemon(daemon_spec)
+ return daemon_spec
def _check_safe_to_destroy(self, mon_id: str) -> None:
ret, out, err = self.mgr.check_mon_command({
igw_conf = self.mgr.template.render('services/iscsi/iscsi-gateway.cfg.j2', context)
daemon_spec.keyring = keyring
- daemon_spec.extra_config = {'iscsi-gateway.cfg': igw_conf}
+ daemon_spec.extra_files = {'iscsi-gateway.cfg': igw_conf}
- return self.mgr._create_daemon(daemon_spec)
+ return daemon_spec
def config_dashboard(self, daemon_descrs: List[DaemonDescription]):
def get_set_cmd_dicts(out: str) -> List[dict]:
return None
for date_field in ['drain_started_at', 'drain_stopped_at', 'drain_done_at', 'process_started_at']:
if inp.get(date_field):
- inp.update({date_field: datetime.strptime(inp.get(date_field, ''), DATEFMT)})
+ inp.update({date_field: str_to_datetime(inp.get(date_field, ''))})
inp.update({'remove_util': ctx})
+ if 'nodename' in inp:
+ hostname = inp.pop('nodename')
+ inp['hostname'] = hostname
return cls(**inp)
def __hash__(self):
import json
from datetime import datetime
+import pytest
+
from ceph.deployment.service_spec import PlacementSpec, ServiceSpec, HostPlacementSpec
from cephadm import CephadmOrchestrator
- from cephadm.inventory import SPEC_STORE_PREFIX, DATEFMT
+ from cephadm.inventory import SPEC_STORE_PREFIX
+ from cephadm.utils import DATEFMT
from cephadm.tests.fixtures import _run_cephadm, cephadm_module, wait, with_host
+from orchestrator import OrchestratorError
from tests import mock