Bug 632709

Summary: [6.1 FEAT] makedumpfile port to zLinux.
Product: Red Hat Enterprise Linux 6 Reporter: IBM Bug Proxy <bugproxy>
Component: kexec-toolsAssignee: Cong Wang <amwang>
Status: CLOSED ERRATA QA Contact: Han Pingtian <phan>
Severity: high Docs Contact:
Priority: high    
Version: 6.1CC: gmuelas, jjarvis, nhorman, nobody+PNT0273897, qcai, rkhan, sbest
Target Milestone: betaKeywords: FutureFeature
Target Release: 6.1   
Hardware: s390x   
OS: All   
Whiteboard:
Fixed In Version: kexec-tools-2_0_0-156_el6 Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-05-19 14:15:35 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 659731    
Bug Blocks: 538808, 580566, 633869    
Attachments:
Description Flags
kexec-tools-2.0.0-makedumpfile-s390-port.patch (backport)
none
kexec-tools.spec.patch
none
Updated patch for spec file
none
Updated patch for spec file none

Description IBM Bug Proxy 2010-09-10 19:11:23 UTC
1. Feature Overview:
Feature Id: [67116]
a. Name of Feature: [6.1 FEAT] makedumpfile port to zLinux.
b. Feature Description
makedumpfile port to zLinux.

zLinux kernel crash dumps have traditionally not been in ELF core format. We now have infrastructure
to convert the zLinux dumps to ELF core format. Subsequently, we'll need to compress these dumps.
Work is on to port makedumpfile for compressing these dumps to s390.

We intend to push this infrastructure to upstream makedumpfile too.


2. Feature Details:
Sponsor: LTC RAS
Architectures:  zSeries - 64 native, 

Arch Specificity: both
Affects Kernel Modules: Field does not exist
Delivery Mechanism: Direct from Community
Category: other
Request Type: Package - Update Version
d. Upstream Acceptance: Field does not exist
Sponsor Priority P3
f. Severity: high
IBM Confidential: No
Code Contribution: IBM code
g. Component Version Target:---

3. Business Case
With zLinux gaining facility to report dumps in ELF core format, we'd want one tool (makedumpfile)
to take care of filtering it, as it does with other platforms.

4. Primary contact at Red Hat:
John Jarvis, jjarvis

5. Primary contacts at Partner:
Project Management Contact:
Michael W. Wortman, wortman.com

Technical contact(s):
MAHESH J. SALGAONKAR, mahesh.salgaonkar.com

Comment 2 John Jarvis 2010-09-21 17:45:51 UTC
Is this a request against the dump component or for a new package?

Comment 3 John Jarvis 2010-09-21 17:46:33 UTC
IBM is signed up to test and provide feedback.

Comment 4 IBM Bug Proxy 2010-09-22 11:21:14 UTC
------- Comment From mahesh.ibm.com 2010-09-22 07:10 EDT-------
(In reply to comment #4)
> Is this a request against the dump component or for a new package?
>

This feature is to enhance makedumpfile tool to support filtering/compressing of ELF kernel crash dumps on s390. We hope to have the zLinux filtering specific patch integrated upstream soon, so RHEL 6.1 will either need to pick up the newer makedumpfile with zLinux support or incorporate a port of it in their package.

Since makedumpfile is shipped as part of kexec-tools rpm, we'll have a challenge for s390 -- kexec is not supported on s390 and hence there is no corresponding kexec-tools package. We would either need to:
1. Have intelligent in the kexec-tools spec file to build only makedumpfile for s390
2. OR have a makedumpfile rpm separately for s390.

Redhat,

What is the preferred approach here?

Comment 5 Adam Tkac 2010-09-23 07:48:20 UTC
Reassigning to proper component, makedumpfile is part of kexec-tools.

Comment 6 IBM Bug Proxy 2010-10-04 16:29:16 UTC
------- Comment From rsisk.com 2010-10-04 11:14 EDT-------
Code Upstream Status: Not Started

Comment 7 IBM Bug Proxy 2010-10-28 08:40:46 UTC
------- Comment From mahesh.ibm.com 2010-10-28 04:39 EDT-------
(In reply to comment #5)
> (In reply to comment #4)
> > Is this a request against the dump component or for a new package?
> >
>
> This feature is to enhance makedumpfile tool to support filtering/compressing
> of ELF kernel crash dumps on s390. We hope to have the zLinux filtering
> specific patch integrated upstream soon, so RHEL 6.1 will either need to pick
> up the newer makedumpfile with zLinux support or incorporate a port of it in
> their package.
>
> Since makedumpfile is shipped as part of kexec-tools rpm, we'll have a
> challenge for s390 -- kexec is not supported on s390 and hence there is no
> corresponding kexec-tools package. We would either need to:
> 1. Have intelligent in the kexec-tools spec file to build only makedumpfile for
> s390
> 2. OR have a makedumpfile rpm separately for s390.
>
>
> Redhat,
>
> What is the preferred approach here?

Hi Redhat,

We haven't received any response for the above qeury. Can you please let us know what is the preferred approach here?

Thanks,

Comment 8 IBM Bug Proxy 2010-11-16 06:20:57 UTC
------- Comment From mahesh.ibm.com 2010-11-16 01:17 EDT-------
The s390 port patch has been accepted and merged into upstream makedumpfile

============================================
commit 0f7076d6f179f9bbd446c3e21eb63c52369a0f0d
Author: Mahesh Salgaonkar <mahesh.ibm.com>
Date:   Mon Nov 15 12:39:17 2010 +0900

[PATCH] Add support for s390x crashdump analysis.

This patch adds support for processing s390x kernel crashdumps.

The changes have been tested on s390x system.
The dump compression and filtering (for all dump levels 1,2,4,8,16 and 31)
tests are succussfull.

Signed-off-by: Mahesh Salgaonkar <mahesh.ibm.com>
Signed-off-by: Michael Holzheu <holzheu.com>
============================================

The latest release of makedumpfile-1.3.7 includes the s390 port patch.

Comment 9 Cong Wang 2010-11-16 07:48:24 UTC
IBM, would you mind to backport that patch to makedumpfile-1.3.5 which is the one we used in kexec-tools. Ideally, it would be very nice if you can make a patch against the latest kexec-tools srpm.

Thanks!

Comment 10 IBM Bug Proxy 2010-11-19 12:12:41 UTC
Created attachment 461532 [details]
kexec-tools-2.0.0-makedumpfile-s390-port.patch (backport)


------- Comment on attachment From mahesh.ibm.com 2010-11-19 07:02 EDT-------


Please find the backported patch that cleanly applies on kexec-tools-2.0.0-145.el6.s390x from RHEL6.0. This patch includes following commits from upstream makedumpfile:

1.  commit 1fb344e934f87b9c124e487a21e111c7bdc977ba
     [PATCH] Add ELF note section to the kdump-compressed format.
2.  commit 0178d1fb180fdb7f1185de3d5097563a16ab40b2
     [PATCH] Add the description about version 4.
3.  commit be83d98318561db5c2f474c34880df557b284af0
     [PATCH] Fix right nr_cpus in kdump main header.
4.  commit 8bb3436b1c13f02796d417b2f76af4ed642e51c9
     [PATCH] Fix the size of "log_end" which has been changed since linux-2.6.25
5.  commit 0f7076d6f179f9bbd446c3e21eb63c52369a0f0d
     [PATCH] Add support for s390x crashdump analysis.

Comment 11 IBM Bug Proxy 2010-11-19 12:12:46 UTC
Created attachment 461533 [details]
kexec-tools.spec.patch


------- Comment on attachment From mahesh.ibm.com 2010-11-19 07:09 EDT-------


This patch enables kexec-tools package to deploy makedumpfile tool for s390x architecure. This patch cleanly applies on kexec-tools.spec file of kexec-tools-2.0.0-145.el6.s390x from RHEL6.0.

Redhat ships the makedumpfile tool through kexec-tools package and s390x does not use Kdump functionality, the kexec-tools package was never supported for s390x. Hence this patch enables kexec-tools rpm package to build and install only makedumpfile tool and related files on s390x architecture keeping the existing functionality (unpacking/building kexec-tools, kdump scripts and makedumpfile) intact for other architectures.

With this patch applied on kexec-tools.spec, we should be able to get makedumpfile tool land on s390x system.

Comment 12 Cong Wang 2010-11-22 09:19:03 UTC
IBM, thanks very much!

I fixed a couple of issues in the patch from you:

1) We moved makedumpfile to /usr/sbin in 2.0.0-151;

2) s390 patch should be put as Patch401 in spec file.

However, there is still one small issue that I can't fix, it is a compile error:

makedumpfile.c: In function 'is_kvaddr':
makedumpfile.c:1495: error: 'KVBASE' undeclared (first use in this function)
makedumpfile.c:1495: error: (Each undeclared identifier is reported only once
makedumpfile.c:1495: error: for each function it appears in.)

I got this on s390, it is fine on s390x. I think you missed to define KVBASE for s390? So, could you please provide an updated version of kexec-tools-2.0.0-makedumpfile-s390-port.patch?

Thanks again!

Comment 13 Cong Wang 2010-11-22 09:25:35 UTC
Hmm, it seems you only make "makedumpfile" support s390x, then why we still define s390 in spec file? :)

Comment 14 Cong Wang 2010-11-22 09:35:22 UTC
Created attachment 461953 [details]
Updated patch for spec file

IBM, if you need to change spec file, please use this updated version from me. If not, just ignore it. Thanks.

Comment 16 IBM Bug Proxy 2010-11-22 16:31:34 UTC
------- Comment From mahesh.ibm.com 2010-11-22 11:20 EDT-------
(In reply to comment #14)
> Hmm, it seems you only make "makedumpfile" support s390x, then why we still
> define s390 in spec file? :)

Oops, my mistake. Yes, makedumpfile support is only for s390x and I should not have defined s390 in spec file. I will move s390 under ExcludeArch and post the new patch.

Thanks for your review.

Comment 17 IBM Bug Proxy 2010-11-22 16:41:56 UTC
------- Comment From mahesh.ibm.com 2010-11-22 11:40 EDT-------
(In reply to comment #15)
> BTW, the lastest kexec-tools is here:
>
> https://brewweb.devel.redhat.com/buildinfo?buildID=149753
>
> or
>
> http://download.devel.redhat.com/brewroot/packages/kexec-tools/2.0.0/155.el6/src/
>
> Thanks.

Hi Steve,

I am unable to access above links. Can you please help me to get these files?

Thanks,
-Mahesh.

Comment 18 Cong Wang 2010-11-23 02:58:26 UTC
Created attachment 462209 [details]
Updated patch for spec file

IBM, never mind. I simply remove "s390" from all "ifarch" and "ifnarch", and put it back to ExcludeArch. Please review this patch.

Thanks!

Comment 19 Cong Wang 2010-11-23 03:03:45 UTC
Oh, I also rename the patch to kexec-tools-2.0.0-makedumpfile-s390x-port.patch. With the patch in comment #18 applied, I can build rpm successfully on s390x.

Steve, if you want to get the rpm's, please use this one:

https://brewweb.devel.redhat.com/taskinfo?taskID=2908654

Thanks.

Comment 20 IBM Bug Proxy 2010-11-25 02:11:09 UTC
------- Comment From mahesh.ibm.com 2010-11-24 21:08 EDT-------
(In reply to comment #19)
> Created an attachment (id=57782) [details]
> Updated patch for spec file
>
>
> ------- Comment on attachment From amwang 2010-11-22 21:58:26
> EDT-------
>
>
> IBM, never mind. I simply remove "s390" from all "ifarch" and "ifnarch", and
> put it back to ExcludeArch. Please review this patch.
>
> Thanks!

Hi Redhat,

Thanks for making change. The patch looks fine. I got the latest kexec-tools source rpm and tested it on s390x system and works fine.

Thanks,
-Mahesh.

Comment 21 IBM Bug Proxy 2010-11-26 03:51:13 UTC
------- Comment From mahesh.ibm.com 2010-11-25 22:46 EDT-------
(In reply to comment #19)
> Created an attachment (id=57782) [details]
> Updated patch for spec file
>
>
> ------- Comment on attachment From amwang 2010-11-22 21:58:26
> EDT-------
>
>
> IBM, never mind. I simply remove "s390" from all "ifarch" and "ifnarch", and
> put it back to ExcludeArch. Please review this patch.
>
> Thanks!

Hi Redhat,

Will this patch go into RHEL6.1 ?

Comment 22 Cong Wang 2010-11-26 04:09:03 UTC
(In reply to comment #21)
> Hi Redhat,
> 
> Will this patch go into RHEL6.1 ?

Yes, it is already in kexec-tools-2_0_0-156_el6.

Comment 23 John Jarvis 2010-11-30 20:37:03 UTC
This enhancement request was evaluated by the full Red Hat Enterprise Linux 
team for inclusion in a Red Hat Enterprise Linux minor release.   As a 
result of this evaluation, Red Hat has tentatively approved inclusion of 
this feature in the next Red Hat Enterprise Linux Update minor release.   
While it is a goal to include this enhancement in the next minor release 
of Red Hat Enterprise Linux, the enhancement is not yet committed for 
inclusion in the next minor release pending the next phase of actual 
code integration and successful Red Hat and partner testing.

Comment 24 Gonzalo Muelas Serrano 2010-12-03 10:30:12 UTC
Hello Red Hat,
in previous releases, without this feature, kexec-tools was not provided with RHEL on System z because System z had no use of it.

Now that we will have a port/supprot of makedumpfile on RHEL 6.1 on System z, will the kexec-tools package automaticaly be build and included for RHEL 6.1 on System z, or do we need a separate bugzilla to track the delivery of kexec-tools in RHEL on System z?

Thank you for your support!

Comment 25 John Jarvis 2010-12-03 14:07:38 UTC
Please open a separate Bugzilla to request and track the kexec-tools work item.

Comment 26 Gonzalo Muelas Serrano 2010-12-03 15:21:23 UTC
Ok, done: RH Bug 659731 - Build and include kexec-tools on System z

Comment 29 IBM Bug Proxy 2011-02-02 14:42:39 UTC
------- Comment From mgrf.com 2011-02-02 09:38 EDT-------
for the record  -  I want to note that  the s390 build of kexec tools will need to contain only the makedumpfile parts.
kexec or ancillary tools are currently not required for s390.

Would you agree to let IBM review the first build?

Comment 31 Cong Wang 2011-02-03 11:47:19 UTC
(In reply to comment #29)
Yeah, please. Thanks.

Comment 34 John Jarvis 2011-03-09 18:38:49 UTC
IBM is signed up to test and provide feedback.

Comment 35 Han Pingtian 2011-03-10 04:05:28 UTC
The patch has been included in -156.el6. Set sanitonly flag.

Comment 36 IBM Bug Proxy 2011-04-06 17:53:10 UTC
------- Comment From tpnoonan.com 2011-04-06 13:46 EDT-------
defect 71114  -  RH692449- [RHEL6.1] makedumpfile fails to generate filtered dumps with -d 16 & 31 option values
is blocking verifcation of this feature

Comment 37 errata-xmlrpc 2011-05-19 14:15:35 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHBA-2011-0736.html