diff --git a/hooks/ceph_hooks.py b/hooks/ceph_hooks.py index 049ef7669ab456a997c3c28f59d2f43666e3d4b2..7295a9e1881b25d0631261c98141e4b249498223 100755 --- a/hooks/ceph_hooks.py +++ b/hooks/ceph_hooks.py @@ -369,8 +369,8 @@ def config_changed(): @hooks.hook('storage.real') def prepare_disks_and_activate(): - # workaround for missing symlinks - # install_by_partuuid_rules() + # patch for missing dm devices + # see: https://patchwork.kernel.org/patch/9826353/ patch_persistent_storage_rules() osd_journal = get_journal_devices() @@ -558,14 +558,7 @@ def update_status(): log('Updating status.') -# Workaround for missing symlinks -# CEPH_BY_PARTUUID_RULES = '/etc/udev/rules.d/60-ceph-by-partuuid.rules' - -# def install_by_partuuid_rules(): -# shutil.copy('files/' + os.path.basename(CEPH_BY_PARTUUID_RULES), -# CEPH_BY_PARTUUID_RULES) - - +# patch for missing dm devices from subprocess import check_call @@ -576,7 +569,7 @@ def patch_persistent_storage_rules(): if os.path.isfile(CEPH_PERSITENT_STORTAGE_RULES): check_call(['sed', '-i', 's/KERNEL!="loop/KERNEL!="dm*|loop/', CEPH_PERSITENT_STORTAGE_RULES]) - log('Updated %s' % CEPH_PERSITENT_STORTAGE_RULES) + log('Patched %s' % CEPH_PERSITENT_STORTAGE_RULES) else: log('Missing %s' % CEPH_PERSITENT_STORTAGE_RULES)