From cf8e69de30cebc6b8b52a45de0d266362fe063d3 Mon Sep 17 00:00:00 2001
From: attardi <giuseppe.attardi@garr.it>
Date: Fri, 2 Feb 2018 16:26:43 +0100
Subject: [PATCH] Cleanup.

---
 hooks/ceph_hooks.py | 15 ++++-----------
 1 file changed, 4 insertions(+), 11 deletions(-)

diff --git a/hooks/ceph_hooks.py b/hooks/ceph_hooks.py
index 049ef76..7295a9e 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)
 
-- 
GitLab