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 697060 Details for
Bug 910951
kdump via nfs fails: net parameter is no longer supported in /etc/kdump.conf
[?]
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]
kdump patch to use nfs parameter in kdump.conf
kdump.patch (text/plain), 5.96 KB, created by
Greg Nichols
on 2013-02-14 01:36:33 UTC
(
hide
)
Description:
kdump patch to use nfs parameter in kdump.conf
Filename:
MIME Type:
Creator:
Greg Nichols
Created:
2013-02-14 01:36:33 UTC
Size:
5.96 KB
patch
obsolete
>diff --git a/tests/kdump/kdump.py b/tests/kdump/kdump.py >index a089a9c..9b40779 100644 >--- a/tests/kdump/kdump.py >+++ b/tests/kdump/kdump.py >@@ -240,7 +240,7 @@ class KDumpTest(Test): > configFile.dump() > print "--------------------\n" > coreCollector = configFile.getParameter("core_collector") >- net = configFile.getParameter("net") >+ nfs = configFile.getParameter("nfs") > linkDelay = configFile.getParameter("link_delay") > local = configFile.getParameter(fstype) if fstype else "" > except IOError, exception: >@@ -266,24 +266,27 @@ class KDumpTest(Test): > configFile.addParameter(fstype, uuid) > restart = True > >- if net: >- print "Removing net parameter for local target dump" >- configFile.removeParameter("net") >+ if nfs: >+ print "Removing nfs parameter for local target dump" >+ configFile.removeParameter("nfs") > restart = True > # configure for nfs dump > elif self.getLogicalDeviceName() == Constants.nfs: >- if net: >- print "NFS dump target set to %s" % net >+ if nfs: >+ print "NFS dump target set to %s" % nfs > else: > if self.getTestServer() and self.getTestServer() != "unknown": > # Note: the assumption is that the environment for the SUT is the same as > # the environment for the server being used - both have the same server > # directory setting. >- net = "%s:%s/%s" % (self.getTestServer(), >+ nfs = "%s:%s/%s" % (self.getTestServer(), > self.environment.getServerDirectory(), > self.environment.getServerExport()) >- print "Adding net %s to %s" % (net, self.kdumpConfigPath) >- configFile.addParameter("net", net) >+ print "Adding nfs %s to %s" % (nfs, self.kdumpConfigPath) >+ configFile.addParameter("nfs", nfs) >+ >+ # we need to mount it locally or kdump won't start >+ self.mountNFSDumpDirectory(configFile) > restart = True > else: > print "Error: v7 test server not set for NFS dump" >@@ -360,14 +363,15 @@ class KDumpTest(Test): > > # find the vmcore image file matching the timestamp > # vmcore directories are like this: 127.0.0.1-2011-03-10-13:18:27 >- vmcoreDirectoryPattern = re.compile("(?P<ipaddr>[0-9]+\.[0-9]+\.[0-9]+)-(?P<date>[0-9]+-[0-9]+-[0-9]+)-(?P<time>[0-9]+:[0-9]+:[0-9]+)") >+ # but wait, it's now 127.0.0.1-2013.02.13-11:10:57 (not the date fields use . as a separator! >+ vmcoreDirectoryPattern = re.compile("(?P<ipaddr>[0-9]+\.[0-9]+\.[0-9]+)-(?P<date>[0-9]+(-|\.)[0-9]+(-|\.)[0-9]+)-(?P<time>[0-9]+:[0-9]+:[0-9]+)") > minimumDuration = None > directoryMatch = None > for (root,dirs,files) in os.walk(imageDirectory): > for dir in dirs: > match = vmcoreDirectoryPattern.search(dir) > if match: >- timestamp = "%s %s" % (match.group("date"), match.group("time")) >+ timestamp = "%s %s" % (match.group("date").replace(".", "-"), match.group("time")) > duration = self.continuation.getDuration(timestamp) > print "%s took %s" % (dir, duration) > if not directoryMatch or (duration.seconds < minimumDuration): >@@ -408,26 +412,38 @@ class KDumpTest(Test): > imageDirectory = "/var/crash" > > # if nfs network dump, mount the filesystem >- net = configFile.getParameter("net") >- if net: >- print "Attempting to mount net setting %s as nfs." % net >- try: >- localPath = "v7-net" >- Command("mkdir %s" % localPath).echo() >- Command("mount %s %s" % (net, localPath)).echo() >- if os.path.isabs(imageDirectory): >- imageDirectory = localPath + imageDirectory >- else: >- imageDirectory = os.path.join(localPath, imageDirectory) >- except V7CommandException, exception: >- print "Error: could not mount nfs image directory" >- print exception >- print exception.command.printErrors() >- return None >+ if configFile.getParameter("nfs"): >+ imageDirectory = self.mountNFSDumpDirectory(configFile) > >- print "Looking for vmcore image directories under " + imageDirectory >+ if imageDirectory: >+ print "Looking for vmcore image directories under " + imageDirectory >+ else: >+ print "Error: could not find image directory." > return imageDirectory >- >+ >+ def mountNFSDumpDirectory(self, configFile): >+ nfs = configFile.getParameter("nfs") >+ imageDirectory = configFile.getParameter("path") >+ if not imageDirectory: >+ imageDirectory = "/var/crash" >+ print "Attempting to mount nfs setting %s as nfs." % nfs >+ try: >+ localPath = "v7-nfs" >+ Command("mkdir %s" % localPath).echo() >+ Command("mount %s %s" % (nfs, localPath)).echo() >+ if os.path.isabs(imageDirectory): >+ imageDirectory = localPath + imageDirectory >+ else: >+ imageDirectory = os.path.join(localPath, imageDirectory) >+ return imageDirectory >+ except V7CommandException, exception: >+ print "Error: could not mount nfs image directory" >+ print exception >+ print exception.command.printErrors() >+ return None >+ >+ #otherwise >+ return None > > def run(self): > PASSED = 0
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 910951
:
697059
|
697060
|
697277