aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBryn M. Reeves <bmr@redhat.com>2014-04-16 21:10:27 +0100
committerBryn M. Reeves <bmr@redhat.com>2014-04-16 21:12:11 +0100
commit062110c312207a1f782337697c0f3902048937fb (patch)
tree5ea88f52a96149d1bb28648ac407a2993e4ebf3c
parent241d240a25faf1b73c0378201d32ccb88b61655c (diff)
downloadsos-062110c312207a1f782337697c0f3902048937fb.tar.gz
Handle fatal file system errors in SoSReport.collect()
Out-of-space and read-only file system errors from plugins should be treated as fatal and cause the run to end. Partial fix for Issue #266. Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
-rw-r--r--sos/sosreport.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/sos/sosreport.py b/sos/sosreport.py
index 52bfe8b0..6b5220d2 100644
--- a/sos/sosreport.py
+++ b/sos/sosreport.py
@@ -978,6 +978,13 @@ class SoSReport(object):
plug.collect()
except KeyboardInterrupt:
raise
+ except OSError as e:
+ if e.errno in fatal_fs_errors:
+ self.ui_log.error("")
+ self.ui_log.error(" %s while collecting plugin data"
+ % e.strerror)
+ self.ui_log.error(" %s" % e.filename)
+ self._exit(1)
except:
if self.raise_plugins:
raise