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 847744 Details for
Bug 1035774
cluster module needs to pass --from to crm_report
[?]
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]
Pass a --from parameter when calling crm_report
sos-bz1035774-pass-from-arg-to-crm_report.patch (text/plain), 2.29 KB, created by
Bryn M. Reeves
on 2014-01-09 17:38:38 UTC
(
hide
)
Description:
Pass a --from parameter when calling crm_report
Filename:
MIME Type:
Creator:
Bryn M. Reeves
Created:
2014-01-09 17:38:38 UTC
Size:
2.29 KB
patch
obsolete
>commit 6b6c20c309af96da3fe239eb00cca549cb8e45b9 >Author: Bryn M. Reeves <bmr@redhat.com> >Date: Thu Jan 9 17:32:06 2014 +0000 > > Pass --from argument to crm_report script > > The crm_report script expects a --from date and will not collect > data unless this is passed. Default to passing a value 72 hours > before the current time and add a 'crm_from' option to the cluster > module to allow the user to override this. > >diff --git a/sos/plugins/cluster.py b/sos/plugins/cluster.py >index aef5879..8c6d880 100644 >--- a/sos/plugins/cluster.py >+++ b/sos/plugins/cluster.py >@@ -15,12 +15,14 @@ > import sos.plugintools > import os, re > from glob import glob >+from datetime import datetime, timedelta > > class cluster(sos.plugintools.PluginBase): > """cluster suite and GFS related information > """ > > optionList = [("gfslockdump", 'gather output of gfs lockdumps', 'slow', False), >+ ("crm_from", 'specify the --from parameter passed to crm_report', 'fast', False), > ('lockdump', 'gather dlm lockdumps', 'slow', False)] > > def checkenabled(self): >@@ -98,8 +100,20 @@ class cluster(sos.plugintools.PluginBase): > self.collectExtOutput("fence_tool dump") > self.collectExtOutput("dlm_tool dump") > self.collectExtOutput("dlm_tool ls -n") >+ # crm_report needs to be given a --from "YYYY-MM-DD HH:MM:SS" start >+ # time in order to collect data. >+ crm_from = (datetime.today() >+ - timedelta(hours=72)).strftime("%Y-%m-%d %H:%m:%S") >+ if self.getOption('crm_from') != False: >+ if re.match(r'\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}', >+ str(self.getOption('crm_from'))): >+ crm_from = self.getOption('crm_from') >+ else: >+ self.soslog.error("crm_from parameter '%s' is not a valid date" >+ % self.getOption('crm_from')) > crm_dest = os.path.join(self.cInfo['cmddir'], 'cluster', 'crm_report') >- self.collectExtOutput("crm_report -S --dest %s" % crm_dest) >+ self.collectExtOutput('crm_report -S -d --dest %s --from "%s"' >+ % (crm_dest, crm_from)) > > def do_lockdump(self): > rhelver = self.policy().rhelVersion()
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 1035774
: 847744