from .services.exporter import CephadmExporter, CephadmExporterConfig
from .schedule import HostAssignment
from .inventory import Inventory, SpecStore, HostCache, EventStore
-from .upgrade import CEPH_UPGRADE_ORDER, CephadmUpgrade
+from .upgrade import CephadmUpgrade
from .template import TemplateMgr
-from .utils import forall_hosts, cephadmNoImage
+from .utils import CEPH_TYPES, GATEWAY_TYPES, forall_hosts, cephadmNoImage
from .configchecks import CephadmConfigChecks
try:
ConnectTimeout=30
"""
-CEPH_TYPES = set(CEPH_UPGRADE_ORDER)
-
# Default container images -----------------------------------------------------
DEFAULT_IMAGE = 'docker.io/ceph/ceph'
DEFAULT_PROMETHEUS_IMAGE = 'docker.io/prom/prometheus:v2.18.1'
daemon_type = daemon_name.split('.', 1)[0] # type: ignore
image: Optional[str] = None
if daemon_type in CEPH_TYPES or \
- daemon_type == 'nfs' or \
- daemon_type == 'iscsi':
+ daemon_type in GATEWAY_TYPES:
# get container image
image = str(self.get_foreign_ceph_option(
utils.name_to_config_section(daemon_name),
if action != 'redeploy':
raise OrchestratorError(
f'Cannot execute {action} with new image. `action` needs to be `redeploy`')
- if daemon_type not in CEPH_TYPES:
+ if daemon_type not in CEPH_TYPES and daemon_type not in GATEWAY_TYPES:
raise OrchestratorError(
f'Cannot redeploy {daemon_type}.{daemon_id} with a new image: Supported '
- f'types are: {", ".join(CEPH_TYPES)}')
+ f'types are: {", ".join(CEPH_TYPES + GATEWAY_TYPES)}')
self.check_mon_command({
'prefix': 'config set',
from cephadm.services.cephadmservice import CephadmDaemonDeploySpec
from cephadm.schedule import HostAssignment
from cephadm.utils import forall_hosts, cephadmNoImage, is_repo_digest, \
- CephadmNoImage, CEPH_UPGRADE_ORDER, ContainerInspectInfo
+ CephadmNoImage, CEPH_TYPES, ContainerInspectInfo
from mgr_module import MonCommandFailed
from . import utils
logger = logging.getLogger(__name__)
-CEPH_TYPES = set(CEPH_UPGRADE_ORDER)
-
class CephadmServe:
"""
to_upgrade.append(d)
continue
- # NOTE: known_ok_to_stop is an output argument for
- # _wait_for_ok_to_stop
- if not self._wait_for_ok_to_stop(d, known_ok_to_stop):
- return
+ if d.daemon_type in ['mon', 'osd', 'mds']:
+ # NOTE: known_ok_to_stop is an output argument for
+ # _wait_for_ok_to_stop
+ if not self._wait_for_ok_to_stop(d, known_ok_to_stop):
+ return
to_upgrade.append(d)
# ceph daemon types that use the ceph container image.
-# NOTE: listed in upgrade order!
-CEPH_UPGRADE_ORDER = ['mgr', 'mon', 'crash', 'osd', 'mds', 'rgw', 'rbd-mirror', 'cephfs-mirror']
+# NOTE: order important here as these are used for upgrade order
+CEPH_TYPES = ['mgr', 'mon', 'crash', 'osd', 'mds', 'rgw', 'rbd-mirror', 'cephfs-mirror']
+GATEWAY_TYPES = ['iscsi', 'nfs']
+CEPH_UPGRADE_ORDER = CEPH_TYPES + GATEWAY_TYPES
# Used for _run_cephadm used for check-host etc that don't require an --image parameter