HOST_CACHE_PREFIX = "host."
SPEC_STORE_PREFIX = "spec."
+# 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']
+CEPH_TYPES = set(CEPH_UPGRADE_ORDER)
+
+
# for py2 compat
try:
from tempfile import TemporaryDirectory # py3
self.cleanup()
-# high-level TODO:
-# - bring over some of the protections from ceph-deploy that guard against
-# multiple bootstrapping / initialization
-
-CEPH_TYPES = ['mon', 'mgr', 'osd', 'mds', 'rbd-mirror', 'rgw', 'crash']
-
def name_to_config_section(name):
"""
Map from daemon names to ceph entity names (as seen in config)
daemons = self.cache.get_daemons()
done = 0
- for daemon_type in CEPH_TYPES:
+ for daemon_type in CEPH_UPGRADE_ORDER:
self.log.info('Upgrade: Checking %s daemons...' % daemon_type)
need_upgrade_self = False
for d in daemons:
'value': target_name,
'who': 'global',
})
- for daemon_type in CEPH_TYPES:
+ for daemon_type in CEPH_UPGRADE_ORDER:
ret, image, err = self.mon_command({
'prefix': 'config rm',
'name': 'container_image',