Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 1148375

Summary: tomcat plugin of sosreport to take tomcat v.7 instead of 6
Product: Red Hat Enterprise Linux 7 Reporter: Pavel Moravec <pmoravec>
Component: sosAssignee: Bryn M. Reeves <bmr>
Status: CLOSED ERRATA QA Contact: David Kutálek <dkutalek>
Severity: medium Docs Contact:
Priority: medium    
Version: 7.0CC: agk, dkutalek, pmoravec
Target Milestone: rc   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: sos-3.2-6.el7 Doc Type: Bug Fix
Doc Text:
no docs needed
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-03-05 11:23:56 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
Patch applicable to RHEL7 sos branch
none
Patch applicable to upstream sos
none
upstream patch none

Description Pavel Moravec 2014-10-01 10:12:47 UTC
Description of problem:
Since RHEL7 has tomcat 7, it is worth gathering tomcat 7 relevant logs/config in sosreport, instead of tomcat6. I.e. /var/log/tomcat6 -> /var/log/tomcat.


Version-Release number of selected component (if applicable):
sos-3.0-23.el7.noarch


How reproducible:
100%


Steps to Reproduce:
1. Run sosreport
2. Check if tomcat 7 relevant data are gathered


Actual results:
$ find <sosreport_dir> | grep tomcat
./etc/sysconfig/tomcat
./etc/selinux/targeted/modules/active/modules/tomcat.pp
./etc/logrotate.d/tomcat
./etc/systemd/system/multi-user.target.wants/tomcat.service
./usr/lib/systemd/system/tomcat.service
./lib/systemd/system/tomcat.service
$


Expected results:
/var/log/tomcat gathered
/etc/tomcat gathered


Additional info:
Checked with tomcat experts:
There might be context and datasource configuration files under $TOMCAT_DIR/conf/Catalina that can contain passwords - but it is quite complex to error-prone identify and obfuscate them.

So it should be enough to obfuscate plaintext passwords in tomcat-users.xml , like https://bugzilla.redhat.com/show_bug.cgi?id=1088070#c2 already does.

Comment 1 Pavel Moravec 2014-10-01 11:06:16 UTC
Created attachment 943015 [details]
Patch applicable to RHEL7 sos branch

As RHEL7 contains only tomcat7, dont bother with tomcat6 (but cf. bz1088070).

Comment 2 Pavel Moravec 2014-10-01 11:06:48 UTC
Created attachment 943016 [details]
Patch applicable to upstream sos

Comment 3 Bryn M. Reeves 2014-10-15 14:44:25 UTC
Since we are proposing rebasing sos to 3.2 in RHEL6 I don't think we can rip out the tomcat6 support just yet.

Could you respin the upstream patch to allow collection of both versions? (a single plugin is fine - they are both small/simple enough).

Also don't forget that we are rebasing in bug 1026962 so patches for RHEL7 need to apply to upstream (unless they are for 7.0.z which stays on 3.0-23).

Comment 4 Pavel Moravec 2014-10-17 07:39:21 UTC
Created attachment 947808 [details]
upstream patch

Upstream patch applicable to rebased sos on RHEL7.

Upstream sos tested on RHEL7 (simple copy&paste of changes in tomcat.py wont work as downstream sos does not have Plugin::do_path_regex_sub until sos rebase), tomcat config&logs gathered, passwords in tomcat-users.xml replaced.

Comment 5 Bryn M. Reeves 2014-10-20 07:59:24 UTC
For some reason the patch in comment #4 doesn't apply (it looks like it should..):

$ patch -p1 < /tmp/tomcat.patch 
patching file sos/plugins/tomcat.py
Hunk #1 FAILED at 22.
1 out of 1 hunk FAILED -- saving rejects to file sos/plugins/tomcat.py.rej

$ git apply /tmp/tomcat.patch
error: patch failed: sos/plugins/tomcat.py:22

I'll apply the changes by hand.

Comment 9 errata-xmlrpc 2015-03-05 11:23:56 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHBA-2015-0532.html