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 854415 Details for
Bug 1057148
[RFE] anamon should monitor and upload also anaconda-tb files
[?]
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]
patch
0001-Watch-also-for-anaconda-tb-files.patch (text/plain), 2.61 KB, created by
Marian Ganisin
on 2014-01-23 14:17:56 UTC
(
hide
)
Description:
patch
Filename:
MIME Type:
Creator:
Marian Ganisin
Created:
2014-01-23 14:17:56 UTC
Size:
2.61 KB
patch
obsolete
>From fd1386b6dd0010e6d6b7c51d8ee61bc6f9b2aaca Mon Sep 17 00:00:00 2001 >From: Marian Ganisin <mganisin@redhat.com> >Date: Thu, 23 Jan 2014 15:00:40 +0100 >Subject: [PATCH] Watch also for anaconda-tb-* files > >In case of traceback the installer anaconda saves the the traceback >information and all the important data in /tmp/anaconda-tb-... file. >This patch modifies anamon to watch also such file(s) and upload it to >the server if exists. >--- > LabController/aux/anamon | 40 ++++++++++++++++++++++++++++++++++++++++ > 1 file changed, 40 insertions(+) > >diff --git a/LabController/aux/anamon b/LabController/aux/anamon >index e7425cd..b1f9b49 100644 >--- a/LabController/aux/anamon >+++ b/LabController/aux/anamon >@@ -22,6 +22,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA > 02110-1301 USA > """ > >+import glob > import os > import errno > import sys >@@ -50,6 +51,44 @@ except ImportError, e: > if not hasattr(shlex, "split"): > shlex.split = lambda s: s.split(" ") > >+ >+class WildCardWatcher: >+ """Implements necessary subset of WatchedFile interface and allows >+ to watch file(s) based on "standard" pattern matching >+ (see glob module in standard Python library)""" >+ >+ def __init__(self, filepattern, prefix=""): >+ self.filepattern = filepattern >+ self.prefix = prefix >+ self._files = {} >+ >+ def get_watched_files(self): >+ for filename in glob.glob(self.filepattern): >+ if filename not in self._files: >+ alias = self.prefix + os.path.basename(filename) >+ self._files[filename] = WatchedFile(filename, alias) >+ return self._files.values() >+ >+ def _forward(self, method, *args, **kwargs): >+ result = [] >+ for item in self.get_watched_files(): >+ result.append(getattr(item, method)(*args, **kwargs)) >+ return result >+ >+ def exists(self): >+ result = self._forward("exists") >+ if len(result) == 0: >+ return False >+ else: >+ # combine result of each .exists() call into one value >+ # using logical 'or' operator (if at least one file exists >+ # then return True) >+ return reduce(lambda x, y: x or y, result) >+ >+ def update(self): >+ self._forward("update") >+ >+ > class WatchedFile: > def __init__(self, fn, alias): > self.fn = fn >@@ -180,6 +219,7 @@ def anamon_loop(): > WatchedFile("/tmp/anacdump.txt", "anacdump.txt"), > WatchedFile("/tmp/modprobe.conf", "modprobe.conf"), > WatchedFile("/tmp/ifcfg.log", "ifcfg.log"), >+ WildCardWatcher("/tmp/anaconda-tb-*") > ] > > # Setup '/mnt/sysimage' watcher >-- >1.8.4.2 >
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 1057148
: 854415