import yaml
from ceph.deployment import inventory
-from ceph.deployment.service_spec import ServiceSpec, NFSServiceSpec, RGWSpec, \
- IscsiServiceSpec, IngressSpec, SNMPGatewaySpec, MDSSpec, TunedProfileSpec
+from ceph.deployment.service_spec import (
+ ArgumentList,
+ ArgumentSpec,
+ GeneralArgList,
+ IngressSpec,
+ IscsiServiceSpec,
+ MDSSpec,
+ NFSServiceSpec,
+ RGWSpec,
+ SNMPGatewaySpec,
+ ServiceSpec,
+ TunedProfileSpec,
+ NvmeofServiceSpec
+)
from ceph.deployment.drive_group import DriveGroupSpec
from ceph.deployment.hostspec import HostSpec, SpecValidationError
from ceph.utils import datetime_to_str, str_to_datetime
"""
raise NotImplementedError()
- def drain_host(self, hostname: str, force: bool = False) -> OrchResult[str]:
+ def drain_host(self, hostname: str, force: bool = False, keep_conf_keyring: bool = False, zap_osd_devices: bool = False) -> OrchResult[str]:
"""
drain all daemons from a host
'crash': self.apply_crash,
'grafana': self.apply_grafana,
'iscsi': self.apply_iscsi,
+ 'nvmeof': self.apply_nvmeof,
'mds': self.apply_mds,
'mgr': self.apply_mgr,
'mon': self.apply_mon,
"""Update iscsi cluster"""
raise NotImplementedError()
+ def apply_nvmeof(self, spec: NvmeofServiceSpec) -> OrchResult[str]:
+ """Update nvmeof cluster"""
+ raise NotImplementedError()
+
def apply_prometheus(self, spec: ServiceSpec) -> OrchResult[str]:
"""Update prometheus cluster"""
raise NotImplementedError()
"""get prometheus access information"""
raise NotImplementedError()
+ def set_alertmanager_access_info(self, user: str, password: str) -> OrchResult[str]:
+ """set alertmanager access information"""
+ raise NotImplementedError()
+
+ def set_prometheus_access_info(self, user: str, password: str) -> OrchResult[str]:
+ """set prometheus access information"""
+ raise NotImplementedError()
+
def get_alertmanager_access_info(self) -> OrchResult[Dict[str, str]]:
"""get alertmanager access information"""
raise NotImplementedError()
'haproxy': 'ingress',
'keepalived': 'ingress',
'iscsi': 'iscsi',
+ 'nvmeof': 'nvmeof',
'rbd-mirror': 'rbd-mirror',
'cephfs-mirror': 'cephfs-mirror',
'nfs': 'nfs',
'osd': ['osd'],
'ingress': ['haproxy', 'keepalived'],
'iscsi': ['iscsi'],
+ 'nvmeof': ['nvmeof'],
'rbd-mirror': ['rbd-mirror'],
'cephfs-mirror': ['cephfs-mirror'],
'nfs': ['nfs'],
self.message = "" # Freeform description
self.is_paused: bool = False # Is the upgrade paused?
+ def to_json(self) -> dict:
+ return {
+ 'in_progress': self.in_progress,
+ 'target_image': self.target_image,
+ 'which': self.which,
+ 'services_complete': self.services_complete,
+ 'progress': self.progress,
+ 'message': self.message,
+ 'is_paused': self.is_paused,
+ }
+
def handle_type_error(method: FuncT) -> FuncT:
@wraps(method)
deployed_by: Optional[List[str]] = None,
rank: Optional[int] = None,
rank_generation: Optional[int] = None,
- extra_container_args: Optional[List[str]] = None,
- extra_entrypoint_args: Optional[List[str]] = None,
+ extra_container_args: Optional[GeneralArgList] = None,
+ extra_entrypoint_args: Optional[GeneralArgList] = None,
) -> None:
#: Host is at the same granularity as InventoryHost
self.is_active = is_active
- self.extra_container_args = extra_container_args
- self.extra_entrypoint_args = extra_entrypoint_args
+ self.extra_container_args: Optional[ArgumentList] = None
+ self.extra_entrypoint_args: Optional[ArgumentList] = None
+ if extra_container_args:
+ self.extra_container_args = ArgumentSpec.from_general_args(
+ extra_container_args)
+ if extra_entrypoint_args:
+ self.extra_entrypoint_args = ArgumentSpec.from_general_args(
+ extra_entrypoint_args)
@property
def status(self) -> Optional[DaemonDescriptionStatus]: