<div dir="ltr"><div dir="ltr">Hi Bryn,<div><br></div><div>Thanks for responding. I've already implemented exactly same fix as you proposed for my env and now it's working fine.</div><div><br></div><div>I hope sosreport team will take care to deliver that fix before next release.</div><div><br></div><div>Regards,</div><div>Denis,</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">чт, 23 янв. 2020 г. в 17:49, Bryn M. Reeves <<a href="mailto:bmr@redhat.com">bmr@redhat.com</a>>:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On Wed, Dec 11, 2019 at 01:15:37PM +0400, Denis Egorenko wrote:<br>
> No changes will be made to system configuration.<br>
> <br>
> <br>
>  Setting up archive ...<br>
> <br>
>  No space left on device while setting up archive<br>
> <br>
> :~# echo $?<br>
> 0<br>
<br>
Looks like this has regressed (we've had a few problems with exit<br>
status propagation down the years). The fix for the exit status<br>
itself is fairly simple:<br>
<br>
diff --git a/sos/sosreport.py b/sos/sosreport.py<br>
index c13142c7..0a4c304f 100644<br>
--- a/sos/sosreport.py<br>
+++ b/sos/sosreport.py<br>
@@ -1371,9 +1371,9 @@ class SoSReport(object):<br>
             self.ui_log.error("\nExiting on user cancel")<br>
             self._cleanup()<br>
             self._exit(130)<br>
-        except (SystemExit):<br>
+        except (SystemExit) as e:<br>
             self._cleanup()<br>
-            self._exit(0)<br>
+            sys.exit(e.code)<br>
<br>
         self._exit(1)<br>
<br>
The problem happens because whatever status was set by the error<br>
that first called self._exit() is overwritten by the call that<br>
follows the _cleanup() handler with 0. The fix simply re-uses<br>
the original exit status passed via SystemExit.code.<br>
<br>
This may be enough for your use case since you just care about<br>
the overall status but looking at current master there's a bit<br>
more work needed in this area. Right now, for each plugin that<br>
is running at the time of failure you'll see a bunch of log<br>
spew like this:<br>
<br>
[plugin:dnf] collecting tail of '/var/log/dnf.librepo.log' due to size limit<br>
Traceback (most recent call last):<br>
  File "/usr/lib64/python2.7/logging/__init__.py", line 892, in emit<br>
    self.flush()<br>
  File "/usr/lib64/python2.7/logging/__init__.py", line 852, in flush<br>
    self.stream.flush()<br>
IOError: [Errno 28] No space left on device<br>
Logged from file __init__.py, line 432<br>
<br>
It's cosmetic but obviously not ideal: addressing this will be<br>
a bit more complicated but should be something we can get to<br>
before the next release.<br>
<br>
Regards,<br>
Bryn.<br>
<br>
</blockquote></div></div>