]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
tools/ceph-detect-init: support RHEL as a platform 23303/head
authorNathan Cutler <ncutler@suse.com>
Sun, 29 Jul 2018 18:43:23 +0000 (20:43 +0200)
committerNathan Cutler <ncutler@suse.com>
Tue, 31 Jul 2018 08:40:36 +0000 (10:40 +0200)
12d94cae2a06fd2ae39379e233588be99bff91de introduced a regression in that it
started returning '' as the codename for most supported distros, and also
(apparently) changed the distro string returned on Red Hat Enterprise Linux (to
"rhel"). As a result, ceph-detect-init began throwing an UnsupportedPlatform
exception on RHEL.

Can not be cherry-picked because ceph-disk and ceph-detect-init are no longer
present in master.

Fixes: 12d94cae2a06fd2ae39379e233588be99bff91de
Fixes: http://tracker.ceph.com/issues/18163
Signed-off-by: Nathan Cutler <ncutler@suse.com>
src/ceph-detect-init/ceph_detect_init/__init__.py

index 9a0fcba1d5d24d7acbac36cb92b7623c4b022d2f..68f6dd9212c6011b37913bc7ac7157a0915eb918 100644 (file)
@@ -88,7 +88,7 @@ def _get_distro(distro, use_rhceph=False):
 
 def _normalized_distro_name(distro):
     distro = distro.lower()
-    if distro.startswith(('redhat', 'red hat')):
+    if distro.startswith(('redhat', 'red hat', 'rhel')):
         return 'redhat'
     elif distro.startswith(('scientific', 'scientific linux')):
         return 'scientific'