]> git.apps.os.sepia.ceph.com Git - teuthology.git/commitdiff
When installing ceph-release log all install failures. 397/head
authorAndrew Schoen <aschoen@redhat.com>
Thu, 18 Dec 2014 22:05:46 +0000 (16:05 -0600)
committerAndrew Schoen <aschoen@redhat.com>
Thu, 18 Dec 2014 22:42:43 +0000 (16:42 -0600)
This code used to make an exception for 'already installed' failures
during a ceph-relase install and not log them. Unfortunately, this also
caused all other types of errors to not log at all. With this change
remote.run will log any errors that happen during the command.

Signed-off-by: Andrew Schoen <aschoen@redhat.com>
teuthology/task/install.py

index f07dbc347b20ebb5ec0d63b644c6253a63b04fa2..e0511246d95656a7e46e76860909864bebe31928 100644 (file)
@@ -437,17 +437,10 @@ def _update_rpm_package_list_and_install(ctx, remote, rpm, config):
     rpm_name = "{rpm_nm}.rpm".format(rpm_nm=ceph_release)
     base_url = "{start_of_url}/noarch/{rpm_name}".format(
         start_of_url=start_of_url, rpm_name=rpm_name)
-    err_mess = StringIO()
-    try:
-        # When this was one command with a pipe, it would sometimes
-        # fail with the message 'rpm: no packages given for install'
-        remote.run(args=['wget', base_url, ],)
-        remote.run(args=['sudo', 'rpm', '-i', rpm_name, ], stderr=err_mess, )
-    except Exception:
-        cmp_msg = 'package {pkg} is already installed'.format(
-            pkg=ceph_release)
-        if cmp_msg != err_mess.getvalue().strip():
-            raise
+    # When this was one command with a pipe, it would sometimes
+    # fail with the message 'rpm: no packages given for install'
+    remote.run(args=['wget', base_url, ],)
+    remote.run(args=['sudo', 'rpm', '-i', rpm_name, ],)
 
     remote.run(args=['rm', '-f', rpm_name])