Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 883725 Details for
Bug 1085042
sosreport will fail with "no space left" error, but it appears to generate a valid sosreport anyway
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
Check tar exit status and fail if non-zero
sos-bz1085042-check-tar-exit-status.patch (text/plain), 2.35 KB, created by
Bryn M. Reeves
on 2014-04-07 18:48:35 UTC
(
hide
)
Description:
Check tar exit status and fail if non-zero
Filename:
MIME Type:
Creator:
Bryn M. Reeves
Created:
2014-04-07 18:48:35 UTC
Size:
2.35 KB
patch
obsolete
>diff -up sos/policyredhat.py.orig sos/policyredhat.py >--- sos/policyredhat.py.orig 2014-04-07 19:38:48.462715362 +0100 >+++ sos/policyredhat.py 2014-04-07 19:39:10.098711958 +0100 >@@ -266,22 +266,29 @@ class SosPolicy: > > print _("Creating compressed archive...") > >+ status = 0 >+ cmd = "" > if os.path.isfile("/usr/bin/xz"): > self.report_file_ext = "tar.xz" > self.renameResults("sosreport-%s-%s.%s" % (self.reportName, time.strftime("%Y%m%d%H%M%S"), self.report_file_ext)) > cmd = "/bin/tar -cf- %s | /usr/bin/xz -1 > %s" % (os.path.basename(self.cInfo['dstroot']),self.report_file) >- p = Popen(cmd, shell=True, bufsize=-1) >- sts = os.waitpid(p.pid, 0)[1] > else: > self.report_file_ext = "tar.bz2" > self.renameResults("sosreport-%s-%s.%s" % (self.reportName, time.strftime("%Y%m%d%H%M%S"), self.report_file_ext)) >- tarcmd = "/bin/tar -jcf %s %s" % (self.report_file, os.path.basename(self.cInfo['dstroot'])) >- p = Popen(tarcmd, shell=True, stdout=PIPE, stderr=PIPE, bufsize=-1) >- output = p.communicate()[0] >+ cmd = "/bin/tar -jcf %s %s" % (self.report_file, os.path.basename(self.cInfo['dstroot'])) >+ >+ p = Popen(cmd, shell=True, stdout=PIPE, stderr=PIPE, bufsize=-1) >+ result = p.communicate() >+ >+ if p.returncode: >+ try: >+ os.unlink(self.report_file) >+ except: >+ pass > > os.umask(oldmask) > os.chdir(curwd) >- return >+ return p.returncode > > def cleanDstroot(self): > if not os.path.isdir(os.path.join(self.cInfo['dstroot'],"sos_commands")): >diff -up sos/sosreport.py.orig sos/sosreport.py >--- sos/sosreport.py.orig 2014-04-07 19:38:55.873713192 +0100 >+++ sos/sosreport.py 2014-04-07 19:39:03.932713578 +0100 >@@ -858,7 +858,12 @@ No changes will be made to system config > return GlobalVars.dstroot > > # package up the results for the support organization >- GlobalVars.policy.packageResults() >+ if GlobalVars.policy.packageResults(): >+ print >+ print _("Failed to create compressed archive.") >+ print >+ print _(" sosreport build tree is located at : %s" % (GlobalVars.dstroot,)) >+ return GlobalVars.dstroot > > # delete gathered files > GlobalVars.policy.cleanDstroot()
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 1085042
:
883724
| 883725 |
883755
|
883756
|
883757