]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
Always raise exception if yum install fails. This avoids later confusion when
authorWarren Usui <warren.usui@inktank.com>
Tue, 30 Jul 2013 02:20:43 +0000 (19:20 -0700)
committerWarren Usui <warren.usui@inktank.com>
Tue, 30 Jul 2013 17:40:47 +0000 (10:40 -0700)
packages are missing (the old code skipped 'Nothing to do' messages, but these
cases are still errors).

Fixes #5803
Signed-off-by: Warren Usui <warren.usui@inktank.com>
Reviewed by: Sandon Van Ness

teuthology/task/install.py

index 418df1ff0c26198fef996430b95c096f6f2b52c7..fe5416330a0bbff55352997cd7574ab1cfc96d44 100644 (file)
@@ -213,16 +213,7 @@ def _update_rpm_package_list_and_install(ctx, remote, rpm, config):
             remote.run(args=['sudo', 'yum', 'install', pkg2add, '-y',],
                     stderr=pk_err_mess)
         except:
-            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
+            raise
 
 def purge_data(ctx):
     """