Sandro Bonazzola has posted comments on this change.
Change subject: sos - refactored engine sos plugin
......................................................................
Patch Set 3: (4 inline comments)
....................................................
File src/__main__.py
Line 822: 'compressor': compressor,
Line 823: 'directory': self.conf["local_tmp_dir"],
Line 824: }
Line 825: caller = Caller(config)
Line 826: caller.call('/bin/tar -cf %(report)s -C %(directory)s .')
Done
Line 827: shutil.rmtree(self.conf["local_tmp_dir"])
Line 828: caller.call('%(compressor)s -1 %(report)s')
Line 829: md5_out = caller.call('/bin/md5sum %(compressed_report)s')
Line 830: checksum = md5_out.split()[0]
Line 824: }
Line 825: caller = Caller(config)
Line 826: caller.call('/bin/tar -cf %(report)s -C %(directory)s .')
Line 827: shutil.rmtree(self.conf["local_tmp_dir"])
Line 828: caller.call('%(compressor)s -1 %(report)s')
I've used the same compression level used by sosreport and the same
implementation used by sos-2.2-30.fc18.noarch. We can leave the python
implementation as enhancement for another patch when we'll align to sos master
git.
Line 829: md5_out = caller.call('/bin/md5sum %(compressed_report)s')
Line 830: checksum = md5_out.split()[0]
Line 831: with open("%s.md5" % self.conf["path"], 'w') as checksum_file:
Line 832: checksum_file.write(md5_out)
Line 826: caller.call('/bin/tar -cf %(report)s -C %(directory)s .')
Line 827: shutil.rmtree(self.conf["local_tmp_dir"])
Line 828: caller.call('%(compressor)s -1 %(report)s')
Line 829: md5_out = caller.call('/bin/md5sum %(compressed_report)s')
Line 830: checksum = md5_out.split()[0]
I've to write the .md5 file anyway. We can leave the python implementation as
enhancement for another patch when we'll align to sos master git.
Line 831: with open("%s.md5" % self.conf["path"], 'w') as checksum_file:
Line 832: checksum_file.write(md5_out)
Line 833:
Line 834: msg = ''
Line 836: archiveSize = '%.1fM' % (
Line 837: float(os.path.getsize(self.conf["path"])) / (1 << 20)
Line 838: )
Line 839:
Line 840: msg = _(
yes:
t = gettext.translation('logcollector', fallback=True)
_ = t.ugettext
Line 841: 'Log files have been collected and placed in
{path}.\n'
Line 842: 'The MD5 for this file is {checksum} and its size is
{size}'
Line 843: ).format(
Line 844: path=self.conf["path"],
--
To view, visit http://gerrit.ovirt.org/13939
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: Ib226ec23b98450a03ebd2a64043a911645a62235
Gerrit-PatchSet: 3
Gerrit-Project: ovirt-log-collector
Gerrit-Branch: master
Gerrit-Owner: Sandro Bonazzola <[email protected]>
Gerrit-Reviewer: Alex Lourie <[email protected]>
Gerrit-Reviewer: Alon Bar-Lev <[email protected]>
Gerrit-Reviewer: Keith Robertson <[email protected]>
Gerrit-Reviewer: Kiril Nesenko <[email protected]>
Gerrit-Reviewer: Sandro Bonazzola <[email protected]>
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches