from execnet.gateway_bootstrap import HostNotFound
from ceph.deployment.service_spec import ServiceSpec, PlacementSpec, RGWSpec, \
- NFSServiceSpec, IscsiServiceSpec, HostPlacementSpec, CustomContainerSpec
+ NFSServiceSpec, IscsiServiceSpec, HostPlacementSpec, CustomContainerSpec, MDSSpec
from ceph.deployment.drive_selection.selector import DriveSelection
from ceph.deployment.inventory import Devices, Device
from ceph.utils import datetime_to_str, datetime_now
with with_host(cephadm_module, 'test'):
c = cephadm_module.list_daemons(refresh=True)
assert wait(cephadm_module, c) == []
- with with_service(cephadm_module, ServiceSpec('mds', 'name', unmanaged=True)) as _, \
- with_daemon(cephadm_module, ServiceSpec('mds', 'name'), 'test') as _:
+ with with_service(cephadm_module, MDSSpec('mds', 'name', unmanaged=True)) as _, \
+ with_daemon(cephadm_module, MDSSpec('mds', 'name'), 'test') as _:
c = cephadm_module.list_daemons()
with with_host(cephadm_module, 'host2'):
with with_service(cephadm_module, ServiceSpec('mgr', placement=PlacementSpec(count=2)),
CephadmOrchestrator.apply_mgr, '', status_running=True):
- with with_service(cephadm_module, ServiceSpec('mds', 'test-id', placement=PlacementSpec(count=2)),
+ with with_service(cephadm_module, MDSSpec('mds', 'test-id', placement=PlacementSpec(count=2)),
CephadmOrchestrator.apply_mds, '', status_running=True):
# with no service-type. Should provide info fot both services
@mock.patch("cephadm.serve.CephadmServe._deploy_cephadm_binary", _deploy_cephadm_binary('test'))
@mock.patch("cephadm.serve.CephadmServe._run_cephadm", _run_cephadm('{}'))
def test_mds_config_purge(self, cephadm_module: CephadmOrchestrator):
- spec = ServiceSpec('mds', service_id='fsname')
+ spec = MDSSpec('mds', service_id='fsname', config={'test': 'foo'})
with with_host(cephadm_module, 'test'):
with with_service(cephadm_module, spec, host='test'):
ret, out, err = cephadm_module.check_mon_command({
@mock.patch("cephadm.serve.CephadmServe._run_cephadm", _run_cephadm('{}'))
@mock.patch("cephadm.services.cephadmservice.CephadmService.ok_to_stop")
def test_daemon_ok_to_stop(self, ok_to_stop, cephadm_module: CephadmOrchestrator):
- spec = ServiceSpec(
+ spec = MDSSpec(
'mds',
service_id='fsname',
- placement=PlacementSpec(hosts=['host1', 'host2'])
+ placement=PlacementSpec(hosts=['host1', 'host2']),
+ config={'test': 'foo'}
)
with with_host(cephadm_module, 'host1'), with_host(cephadm_module, 'host2'):
c = cephadm_module.apply_mds(spec)