]> git.apps.os.sepia.ceph.com Git - teuthology.git/commitdiff
need to debug why check_status is being ignored, for now catch
authorVasu Kulkarni <vasu@redhat.com>
Sun, 10 Jun 2018 22:50:55 +0000 (15:50 -0700)
committerVasu Kulkarni <vasu@redhat.com>
Mon, 17 Dec 2018 23:10:49 +0000 (15:10 -0800)
the command failed error, log and ignore so that tests can pass.

Signed-off-by: Vasu Kulkarni <vasu@redhat.com>
teuthology/task/internal/redhat.py

index 878d26b591c6e8193eac54c3c21cfda425fa1d8c..eac97349129ce725ad8173a7f045c7346a351e2f 100644 (file)
@@ -9,6 +9,7 @@ from teuthology.config import config as teuthconfig
 from teuthology.parallel import parallel
 from teuthology.orchestra import run
 from teuthology.task.install.redhat import set_deb_repo
+from teuthology.exceptions import CommandFailedError
 
 log = logging.getLogger(__name__)
 
@@ -53,8 +54,12 @@ def _subscribe_stage_cdn(remote, teuthconfig):
 
 
 def _unsubscribe_stage_cdn(remote):
-    remote.run(args=['sudo', 'subscription-manager', 'unregister'],
-               check_status=False)
+    try:
+        remote.run(args=['sudo', 'subscription-manager', 'unregister'],
+                   check_status=False)
+    except CommandFailedError:
+        # FIX ME
+        log.info("unregistring subscription-manager failed, ignoring")
 
 
 @contextlib.contextmanager