Bug 486526

Summary: satellite-debug - additional data: usage, sudoers/user/group info, and database optimizer settings
Product: Red Hat Satellite 5 Reporter: Xixi <xdmoon>
Component: OtherAssignee: Milan Zázrivec <mzazrivec>
Status: CLOSED CURRENTRELEASE QA Contact: Michael Mráka <mmraka>
Severity: medium Docs Contact:
Priority: medium    
Version: 520CC: cperry, jpazdziora, tlestach, xdmoon
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: sat530 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 495217 518163 (view as bug list) Environment:
Last Closed: 2009-09-10 20:33:32 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:    
Bug Blocks: 456985, 495217    
Attachments:
Description Flags
example of schema upgrades history output none

Description Xixi 2009-02-20 06:13:59 UTC
Description of problem:

Listed below would 3 useful additions to satellite-debug - I can break them out into separate bugs, if needed.

1. Usage information:

This is very useful information and frequently requested especially in cases of large deployments and/or performance problems.  The results from the following queries gives a general picture of the deployment size and usage of the Satellite, including the number of servers, packages, channels, etc.. -

select count(*) from rhnpackagename;
select count(*) from rhnpackage;
select count(*) from rhnchannelpackage;
select count(*) from rhnchannel;
select count(*) from rhnserverchannel;
select count(*) from rhnserver;
select count(*) from rhnservergroup;
select count(*) from rhnservergroupmembers;
select count(*) from rhnUserManagedServerGroups;
select count(*) from rhnUserDefaultSystemGroups; 

Additionally, in the case of users who for some reason cannot or prefer not to give this information to be queried, a "--no-usage" option can be added to not run these queries and include results in the satellite-debug tar.

2. The sudoers file and tomcat, apache, and oracle user/group information

There're a significant number and types of problems that are caused by incorrect/missing configuration in /etc/sudoers and/or user/group setup in the /etc/passwd and /etc/group files.  Including /etc/sudoers file, and the output of grepping for tomcat, apache, and oracle in /etc/passwd and /etc/group would be very useful.

3. Oracle configuration

Starting with Satellite 5.2.0, the supported/embedded oracle database version is 10g (from 9i), this in addition to some performance issues that are currently under investigation have resulted in some workaround being applied, to avoid future confusion, it would be very useful to query these configurations in the database for Satellites 5.2.0 and above:

select dbms_stats.get_param('METHOD_OPT') from dual;
select value from v$parameter where name='optimizer_mode';
select value from v$parameter where name='optimizer_index_cost_adj';
SELECT X.KSPPINM NAME, DECODE(BITAND(KSPPIFLG/256, 1), 1, 'TRUE', 'FALSE') SESMOD, DECODE( BITAND(KSPPIFLG/65536, 3), 1, 'IMMEDIATE', 2, 'DEFERRED', 3, 'IMMEDIATE', 'FALSE' ) SYSMOD, KSPPDESC DESCRIPTION FROM SYS.X_$KSPPI X WHERE X.INST_ID = USERENV('INSTANCE') AND X.KSPPINM = '_optimizer_cost_based_transformation' ; 

Version-Release number of selected component (if applicable):
All.

How reproducible:
See above.

Steps to Reproduce:
1.
2.
3.
  
Actual results:


Expected results:


Additional info:

Comment 2 Milan Zázrivec 2009-03-26 13:09:40 UTC
spacewlak.git master:
bf56c0495d6cfe4f59b7bc0ec15b9acb13148486
1766b8bb663b179c2ced25bb6b0dc19e9c852374
b8db0d49f6add0b6449243ecd56b4ef0ccb84f37

Additional data included into spacewalk-debug archive:
* /etc/sudoers
* apache, oracle, tomcat, nocpulse entries from /etc/{passwd,group}
* database: row counts for all rhnsat tables
* database: select dbms_stats.get_param('METHOD_OPT') from dual;
* database: show parameter

All database statistics are put into db-stats/db-stats.log

Comment 3 Jan Pazdziora (Red Hat) 2009-04-06 10:33:39 UTC
Added 78bf864796b0612fb3e848138714ae2266622ce7 for db-stats/ to database/ rename, and 9067493f14e8c1505bf00b875fa2ef27677b7331 for alert.log backup.

Comment 4 Milan Zázrivec 2009-04-10 12:56:17 UTC
Created attachment 339087 [details]
example of schema upgrades history output

Commits dac2399e8a258e5122d781b054a29739f32c749c in spacewalk.git master
and 75fbc57c370d51bec64698515b4559b94fd4cd1c in spacewalk.git VADER
added history of schema upgrades to the debug output.

Comment 5 Milan Zázrivec 2009-04-27 13:16:17 UTC
We need couple of other stuff:
* content of /var/log/spacewalk/schema-upgrade
* /var/log/audit/audit.log (when applicable)
* content of /rhnsat/admin/rhnsat/bdump (when applicable)

Comment 6 Milan Zázrivec 2009-04-28 13:44:03 UTC
spacewalk.git master:
b2500601799478b0c73a99e2403991f8c4ad6030
ac7b8ac43a024810cdd6ffeba5c8242a1a03db44
954b237c56d1214b05d63ce1581bbf89c0dc7d49

spacewalk.git VADER:
6721b6ceaef893b1cdfab6b0aa58a9583cc4330f
9a4ac6ad7d09e3d1dc13895c9b42d1aa013d3ec5
548302b2dc04935d34016ac3ce27f2e527d56d89

Comment 7 Milan Zázrivec 2009-04-30 10:24:28 UTC
Commits f704c382642eee72c801bacc07f82a26a28d16cb in spacewalk.git VADER
and 5ae487f8c15da04d6c6da8dfcf76052753a56363 in spacewalk.git master
add logs from /rhnsat/admin/rhnsat/logs into the archive.

Comment 8 Milan Zázrivec 2009-05-11 17:26:55 UTC
spacewalk-backend-tools-0.5.28-13

Comment 10 Milan Zázrivec 2009-05-13 14:08:13 UTC
spacewalk.git master: 52ba8b386da2dbe886ac284c5064caa8cc5bb183
spacewalk.git VADER: d5d695d5f13806def9c418ccc8ccfd50c9fa3aae

Comment 11 Milan Zázrivec 2009-05-20 19:15:18 UTC
spacewalk-backend-tools-0.5.28-14

Comment 12 Michael Mráka 2009-05-28 15:19:18 UTC
Verified.

# rpm -q spacewalk-backend-tools
spacewalk-backend-tools-0.5.28-15.el4sat

Comment 13 Tomas Lestach 2009-08-18 10:35:00 UTC
select count(*) from rhnUserManagedServerGroups;
is missing in the spacewalk-debug/database/db-stats.log.

Comment 14 Tomas Lestach 2009-08-18 15:28:30 UTC
Will discuss, if rhnUserManagedServerGroups information is necessarily needed, if so a new BZ will be created.

Otherwise moving to RELEASE_PENDING (stage validation)

Comment 15 Tomas Lestach 2009-08-19 09:19:59 UTC
Created Bug#518163 for missing rhnUserManagedServerGroups info.

Comment 16 Brandon Perkins 2009-09-10 20:33:32 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/RHEA-2009-1434.html