]> git.apps.os.sepia.ceph.com Git - teuthology.git/commitdiff
Rhel support added
authorWarren Usui <warren.usui@inktank.com>
Fri, 17 May 2013 17:39:15 +0000 (10:39 -0700)
committerWarren Usui <warren.usui@inktank.com>
Wed, 29 May 2013 00:06:45 +0000 (17:06 -0700)
Fixes: #4946
Signed-off-by: Warren Usui <warren.usui@inktank.com>
teuthology/task/install.py
teuthology/task/internal.py

index c5fa569f1d47d467b8efa349135b060f7e1465d2..0add8a9bef4cfeafcae4a878b99e1eb5fb399ad9 100644 (file)
@@ -28,7 +28,7 @@ def _get_system_type(remote):
     log.debug("System to be installed: %s" % system_value)
     if system_value in ['Ubuntu','Debian',]:
         return "deb"
-    if system_value in ['CentOS',]:
+    if system_value in ['CentOS', 'RedHatEnterpriseServer']:
         return "rpm"
     return system_value
 
@@ -201,8 +201,16 @@ def _update_rpm_package_list_and_install(ctx, remote, rpm, config):
             remote.run(args=['sudo', 'yum', 'install', pkg2add, '-y',],
                     stderr=pk_err_mess)
         except:
-            if not pk_err_mess.getvalue().strip() == "Error: Nothing to do":
-                raise
+            err_str = pk_err_mess.getvalue().strip()
+            if err_str.find("Error: ") >= 0:
+                ok_msg_loc = err_str.find("Error: Nothing to do")
+                if ok_msg_loc < 0:
+                    raise
+                # Check for other error strings (I'm being paranoid).
+                if err_str[0:ok_msg_loc].find("Error: ") > 0:
+                    raise
+                if err_str[ok_msg_loc+1:].find("Error: ") > 0:
+                    raise
 
 def purge_data(ctx):
     """
index 53249685e1ac825b6465e9668f3b2b9180777892..74964e986a98e6b33101e6e3272d7223a519ff14 100644 (file)
@@ -509,6 +509,12 @@ def vm_setup(ctx, config):
 
 def _handle_vm_init(remote):
     log.info('Running ceph_qa_chef on ', remote)
+    # /usr/bin/make and /usr/bin/gcc are not automatically installed on rhel . They should be added
+    # to the chef task, but these next two lines probably do not hurt things.
+    if not os.path.isfile('/usr/bin/make'):
+        remote.run(args=['sudo', 'yum', 'install', 'make', '-y'])
+    if not os.path.isfile('/usr/bin/gcc'):
+        remote.run(args=['sudo', 'yum', 'install', 'gcc', '-y'])
     remote.run(args=['wget','-q','-O-',
             'https://raw.github.com/ceph/ceph-qa-chef/master/solo/solo-from-scratch',
             run.Raw('|'),