patch to ceph-osd

Giuseppe Attardi giuseppe.attardi at garr.it
Fri Feb 2 15:23:42 UTC 2018


According to this page:

	https://patchwork.kernel.org/patch/9826353/

there is a bug in ceph that affects the use of FibreChannel disks.

The following patch to file hooks/ceph_hooks.py, fixes it in the charm ceph-osd:

*** hooks/ceph_hooks.py	2018-02-02 16:15:40.304388602 +0100
--- hooks/ceph_hooks.py~	2018-02-02 16:18:47.304401004 +0100
***************
*** 369,378 ****

 @hooks.hook('storage.real')
 def prepare_disks_and_activate():
-     # patch for missing dm devices
-     # see: https://patchwork.kernel.org/patch/9826353/
-     patch_persistent_storage_rules()
- 
     osd_journal = get_journal_devices()
     check_overlap(osd_journal, set(get_devices()))
     log("got journal devs: {}".format(osd_journal), level=DEBUG)
--- 369,374 ----
***************
*** 558,579 ****
     log('Updating status.')


- # patch for missing dm devices
- from subprocess import check_call
- 
- 
- CEPH_PERSITENT_STORTAGE_RULES = '/lib/udev/rules.d/60-persistent-storage.rules'
- 
- 
- 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('Patched %s' % CEPH_PERSITENT_STORTAGE_RULES)
-     else:
-         log('Missing %s' % CEPH_PERSITENT_STORTAGE_RULES)
- 
- 
 if __name__ == '__main__':
     try:
         hooks.execute(sys.argv)
--- 554,559 ——

Regards

— Beppe





More information about the Juju mailing list