from .inventory import Inventory, SpecStore, HostCache, EventStore, ClientKeyringStore, ClientKeyringSpec
from .upgrade import CephadmUpgrade
from .template import TemplateMgr
-from .utils import CEPH_TYPES, GATEWAY_TYPES, forall_hosts, cephadmNoImage
+from .utils import CEPH_IMAGE_TYPES, forall_hosts, cephadmNoImage
from .configchecks import CephadmConfigChecks
try:
def _get_container_image(self, daemon_name: str) -> Optional[str]:
daemon_type = daemon_name.split('.', 1)[0] # type: ignore
image: Optional[str] = None
- if daemon_type in CEPH_TYPES or \
- daemon_type in GATEWAY_TYPES:
+ if daemon_type in CEPH_IMAGE_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 and daemon_type not in GATEWAY_TYPES:
+ if daemon_type not in CEPH_IMAGE_TYPES:
raise OrchestratorError(
f'Cannot redeploy {daemon_type}.{daemon_id} with a new image: Supported '
- f'types are: {", ".join(CEPH_TYPES + GATEWAY_TYPES)}')
+ f'types are: {", ".join(CEPH_IMAGE_TYPES)}')
self.check_mon_command({
'prefix': 'config set',
for name, dd in dm.items():
if image_info.image_id == dd.container_image_id:
r['up_to_date'].append(dd.name())
- elif dd.daemon_type in (CEPH_TYPES + GATEWAY_TYPES):
+ elif dd.daemon_type in CEPH_IMAGE_TYPES:
r['needs_update'][dd.name()] = {
'current_name': dd.container_image_name,
'current_id': dd.container_image_id,
CEPH_TYPES = ['mgr', 'mon', 'crash', 'osd', 'mds', 'rgw', 'rbd-mirror', 'cephfs-mirror']
GATEWAY_TYPES = ['iscsi', 'nfs']
MONITORING_STACK_TYPES = ['node-exporter', 'prometheus', 'alertmanager', 'grafana']
+
CEPH_UPGRADE_ORDER = CEPH_TYPES + GATEWAY_TYPES + MONITORING_STACK_TYPES
+# these daemon types use the ceph container image
+CEPH_IMAGE_TYPES = CEPH_TYPES + ['iscsi', 'nfs']
# Used for _run_cephadm used for check-host etc that don't require an --image parameter
cephadmNoImage = CephadmNoImage.token