Bug 494538

Summary: Installation of rhnmd brings in another 12 packages, including httpd
Product: Red Hat Satellite 5 Reporter: Jan Pazdziora <jpazdziora>
Component: MonitoringAssignee: Miroslav Suchý <msuchy>
Status: CLOSED CURRENTRELEASE QA Contact: Preethi Thomas <pthomas>
Severity: high Docs Contact:
Priority: low    
Version: 530CC: cperry, mzazrivec, pthomas
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: sat530 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2009-09-10 18:49:23 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: 463877    

Description Jan Pazdziora 2009-04-07 11:59:01 UTC
Description of problem:

When installing rhnmd on a client which I'd like to monitor, additional dependencies like httpd are installed. This seems like an unnecessary bloat and regression against rhnmd we used to have.

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

rhnmd-5.1.7-1.el5sat.i386.rpm

How reproducible:

Deterministic.

Steps to Reproduce:
1. Install RHEL 5, @base.
2. Register it to Satellite or hosted, give the machine RHN Tools channel.
3. Try to install rhnmd.
  
Actual results:

# yum install rhnmd
Loaded plugins: rhnplugin, security
rhel-i386-server-5                                                                                                                       | 1.3 kB     00:00     
rhn-tools-rhel-i386-server-5                                                                                                             |  871 B     00:00     
primary.xml.gz                                                                                                                           |  34 kB     00:00     
rhn-tools-rhel-i386-server-5                                   418/418
Setting up Install Process
Parsing package install arguments
Resolving Dependencies
--> Running transaction check
---> Package rhnmd.i386 0:5.1.7-1.el5sat set to be updated
--> Processing Dependency: nocpulse-common for package: rhnmd
--> Running transaction check
---> Package nocpulse-common.noarch 0:2.1.8-1.el5sat set to be updated
--> Processing Dependency: perl(IO::AtomicFile) for package: nocpulse-common
--> Processing Dependency: httpd for package: nocpulse-common
--> Processing Dependency: perl(LWP::UserAgent) for package: nocpulse-common
--> Processing Dependency: perl(DBI) for package: nocpulse-common
--> Running transaction check
---> Package perl-DBI.i386 0:1.52-2.el5 set to be updated
---> Package perl-libwww-perl.noarch 0:5.805-1.1.1 set to be updated
--> Processing Dependency: perl-HTML-Parser >= 3.33 for package: perl-libwww-perl
--> Processing Dependency: perl(Compress::Zlib) for package: perl-libwww-perl
--> Processing Dependency: perl(HTML::Entities) for package: perl-libwww-perl
--> Processing Dependency: perl(URI::Escape) for package: perl-libwww-perl
--> Processing Dependency: perl(URI::URL) for package: perl-libwww-perl
--> Processing Dependency: perl(URI) for package: perl-libwww-perl
--> Processing Dependency: perl(URI::Heuristic) for package: perl-libwww-perl
---> Package perl-IO-stringy.noarch 0:2.109-11.el5 set to be updated
---> Package httpd.i386 0:2.2.3-22.el5 set to be updated
filelists.xml.gz                                                                                                                         |  14 MB     00:07     
filelists.xml.gz                                                                                                                         |  22 kB     00:00     
--> Processing Dependency: libaprutil-1.so.0 for package: httpd
--> Processing Dependency: libapr-1.so.0 for package: httpd
--> Running transaction check
---> Package perl-URI.noarch 0:1.35-3 set to be updated
---> Package apr-util.i386 0:1.2.7-7.el5 set to be updated
--> Processing Dependency: libpq.so.4 for package: apr-util
---> Package perl-HTML-Parser.i386 0:3.55-1.fc6 set to be updated
--> Processing Dependency: perl-HTML-Tagset >= 3.03 for package: perl-HTML-Parser
--> Processing Dependency: perl(HTML::Tagset) for package: perl-HTML-Parser
---> Package apr.i386 0:1.2.7-11 set to be updated
---> Package perl-Compress-Zlib.i386 0:1.42-1.fc6 set to be updated
--> Running transaction check
---> Package postgresql-libs.i386 0:8.1.11-1.el5_1.1 set to be updated
---> Package perl-HTML-Tagset.noarch 0:3.10-2.1.1 set to be updated
--> Finished Dependency Resolution

Dependencies Resolved

================================================================================================================================================================
 Package                                Arch                       Version                               Repository                                        Size
================================================================================================================================================================
Installing:
 rhnmd                                  i386                       5.1.7-1.el5sat                        rhn-tools-rhel-i386-server-5                      15 k
Installing for dependencies:
 apr                                    i386                       1.2.7-11                              rhel-i386-server-5                               123 k
 apr-util                               i386                       1.2.7-7.el5                           rhel-i386-server-5                                76 k
 httpd                                  i386                       2.2.3-22.el5                          rhel-i386-server-5                               1.2 M
 nocpulse-common                        noarch                     2.1.8-1.el5sat                        rhn-tools-rhel-i386-server-5                      12 k
 perl-Compress-Zlib                     i386                       1.42-1.fc6                            rhel-i386-server-5                                52 k
 perl-DBI                               i386                       1.52-2.el5                            rhel-i386-server-5                               605 k
 perl-HTML-Parser                       i386                       3.55-1.fc6                            rhel-i386-server-5                                92 k
 perl-HTML-Tagset                       noarch                     3.10-2.1.1                            rhel-i386-server-5                                14 k
 perl-IO-stringy                        noarch                     2.109-11.el5                          rhn-tools-rhel-i386-server-5                      70 k
 perl-URI                               noarch                     1.35-3                                rhel-i386-server-5                               116 k
 perl-libwww-perl                       noarch                     5.805-1.1.1                           rhel-i386-server-5                               376 k
 postgresql-libs                        i386                       8.1.11-1.el5_1.1                      rhel-i386-server-5                               196 k

Transaction Summary
================================================================================================================================================================
Install     13 Package(s)         
Update       0 Package(s)         
Remove       0 Package(s)         

Total download size: 2.9 M
Is this ok [y/N]: y
Downloading Packages:
(1/13): nocpulse-common-2.1.8-1.el5sat.noarch.rpm                                                                                        |  12 kB     00:00     
(2/13): perl-HTML-Tagset-3.10-2.1.1.noarch.rpm                                                                                           |  14 kB     00:00     
(3/13): rhnmd-5.1.7-1.el5sat.i386.rpm                                                                                                    |  15 kB     00:00     
(4/13): perl-Compress-Zlib-1.42-1.fc6.i386.rpm                                                                                           |  52 kB     00:00     
(5/13): perl-IO-stringy-2.109-11.el5.noarch.rpm                                                                                          |  70 kB     00:00     
(6/13): apr-util-1.2.7-7.el5.i386.rpm                                                                                                    |  76 kB     00:00     
(7/13): perl-HTML-Parser-3.55-1.fc6.i386.rpm                                                                                             |  92 kB     00:00     
(8/13): perl-URI-1.35-3.noarch.rpm                                                                                                       | 116 kB     00:00     
(9/13): apr-1.2.7-11.i386.rpm                                                                                                            | 123 kB     00:00     
(10/13): postgresql-libs-8.1.11-1.el5_1.1.i386.rpm                                                                                       | 196 kB     00:00     
(11/13): perl-libwww-perl-5.805-1.1.1.noarch.rpm                                                                                         | 376 kB     00:00     
(12/13): perl-DBI-1.52-2.el5.i386.rpm                                                                                                    | 605 kB     00:00     
(13/13): httpd-2.2.3-22.el5.i386.rpm                                                                                                     | 1.2 MB     00:00     
----------------------------------------------------------------------------------------------------------------------------------------------------------------
Total                                                                                                                           147 kB/s | 2.9 MB     00:20     

Expected results:

Only rhnmd package installed, no nocpulse-common, no httpd.

Additional info:

The change in behaviour seems to have been introduced by commit

commit 85607831bbcb364304ca2f2a8f68dee5b1848640
Author: Miroslav Suchý <msuchy>
Date:   Wed Mar 11 14:12:53 2009 +0100

    489573 - remove generating keys and leave it on nocpulse-common

and diff

--- a/monitoring/rhnmd/rhnmd.spec
+++ b/monitoring/rhnmd/rhnmd.spec
@@ -11,7 +11,7 @@ License:   GPLv2
 Group:     System Environment/Daemons
 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 Requires:  openssh-server openssh
-Conflicts: NPusers nocpulse-common
+Requires:  nocpulse-common
 BuildRequires: pam-devel gcc
 
 %description

The change tries to delegate the user and group setup to nocpulse-common. Alas, the price that we pay seems to be too high.

Comment 1 Jan Pazdziora 2009-04-07 12:03:36 UTC
We've discussed the issue with Mirek briefly.

One possibility is to just revert the part of that commit and do the useradd and groupadd (after getent) in rhnmd's .spec, just like we've done it before.

Another possibility is to untangle rhnmd from monitoring, introduce new user name (rhnmd, perhaps) instead of the current nocpulse. That way we would not need to Conflict with that nocpulse-common nor Require it, and these packages could even coexist, in case we wanted to monitor the machine on which the Satellite or the scout is running.

Comment 2 Miroslav Suchý 2009-04-07 12:58:02 UTC
nocpulse account name is hardcoded in lots of probes. If we change the name we had to somehow provide upgrade of existing probes customer may have.

Comment 3 Brandon Perkins 2009-04-07 15:29:23 UTC
Approved.  Please use your best judgment to fix.  Cliff and I think splitting out a separate common package might be the best option.

Comment 4 Clifford Perry 2009-04-07 15:31:40 UTC
I was thinking maybe a nocpulse-common-common  or nocpulse-common-users package which is used for user creation and both rhnmd and nocpulse-common require... but heck, I will allow you guys to figure out the fix, even if it is to conflict with nocpulse-common again and allow rhnmd to do the user creation stuff. 

Cliff

Comment 5 Miroslav Suchý 2009-04-10 13:43:11 UTC
I split user creation to both packages. And in nocpulse-common just add to group apache if nocpulse user previously exist (due creation by rhnmd).
Rhnmd and nocpulse-common now do not conflict and nocpulse-common is not prerequisite of rhnmd. 
Hopefuly when we make change in rhnmd we do not forget to update nocpulse-common and vice versa.

Commited as 265c3cdfc4fddf463c6dfe66533cf63439d15bdb
Fixed in: nocpulse-common-2.1.9-1, rhnmd-5.3.2-1

Comment 6 Preethi Thomas 2009-04-15 16:21:31 UTC
fails_qa
Satellite-5.3.0-RHEL4-re20090414.0-i386-embedded-oracle.iso.
tested on rhel4 satellite 530 with a rhel4 client.
[root@fjs-0-07 ~]# up2date rhnmd

Fetching Obsoletes list for channel: rhel-i386-as-4...
########################################

Fetching Obsoletes list for channel: rhn-tools-rhel-4-as-i386...
########################################

Fetching rpm headers...
########################################

Name                                    Version        Rel     
----------------------------------------------------------
rhnmd                                   5.3.0          3.el4sat          i386  


Testing package set / solving RPM inter-dependencies...
########################################
apr-0.9.4-24.9.i386.rpm:    ########################## Done.                   
apr-util-0.9.4-22.el4.i386. ########################## Done.                   
httpd-2.0.52-41.ent.4.i386. ########################## Done.                   
httpd-suexec-2.0.52-41.ent. ########################## Done.                   
nocpulse-common-2.1.8-1.el4 ########################## Done.                   
The package nocpulse-common-2.1.8-1.el4sat is not signed with a GPG signature.  Aborting...
Package nocpulse-common-2.1.8-1.el4sat does not have a GPG signature.
 Aborting...
[root@fjs-0-07 ~]# vi /etc/sysconfig/rhn/up2date
[root@fjs-0-07 ~]# up2date rhnmd

Fetching Obsoletes list for channel: rhel-i386-as-4...

Fetching Obsoletes list for channel: rhn-tools-rhel-4-as-i386...

Fetching rpm headers...
########################################

Name                                    Version        Rel     
----------------------------------------------------------
rhnmd                                   5.3.0          3.el4sat          i386  


Testing package set / solving RPM inter-dependencies...
########################################
apr-0.9.4-24.9.i386.rpm:    ########################## Done.                   
apr-util-0.9.4-22.el4.i386. ########################## Done.                   
httpd-2.0.52-41.ent.4.i386. ########################## Done.                   
httpd-suexec-2.0.52-41.ent. ########################## Done.                   
nocpulse-common-2.1.8-1.el4 ########################## Done.                   
perl-DBI-1.40-9.i386.rpm:   ########################## Done.                   
perl-HTML-Parser-3.55-1.el4 ########################## Done.                   
perl-IO-stringy-2.109-11.el ########################## Done.                   
perl-URI-1.30-4.noarch.rpm: ########################## Done.                   
perl-libwww-perl-5.79-5.noa ########################## Done.                   
rhnmd-5.3.0-3.el4sat.i386.r ########################## Done.                   
perl-HTML-Tagset-3.03-30.no ########################## Done.                   
Preparing              ########################################### [100%]

Installing...
   1:apr                    ########################################### [100%]
   2:apr-util               ########################################### [100%]
   3:perl-HTML-Tagset       ########################################### [100%]
   4:perl-HTML-Parser       ########################################### [100%]
   5:perl-URI               ########################################### [100%]
   6:perl-libwww-perl       ########################################### [100%]
   7:perl-IO-stringy        ########################################### [100%]
   8:perl-DBI               ########################################### [100%]
   9:httpd                  ########################################### [100%]
  10:httpd-suexec           ########################################### [100%]
  11:nocpulse-common        ########################################### [100%]
  12:rhnmd                  ########################################### [100%]
The following packages were added to your selection to satisfy dependencies:

Name                                    Version        Release
--------------------------------------------------------------
apr                                     0.9.4          24.9                
apr-util                                0.9.4          22.el4              
httpd                                   2.0.52         41.ent.4            
httpd-suexec                            2.0.52         41.ent.4            
nocpulse-common                         2.1.8          1.el4sat            
perl-DBI                                1.40           9                   
perl-HTML-Parser                        3.55           1.el4               
perl-IO-stringy                         2.109          11.el4              
perl-URI                                1.30           4                   
perl-libwww-perl                        5.79           5                   
perl-HTML-Tagset                        3.03           30                  

[root@fjs-0-07 ~]#

Comment 7 Miroslav Suchý 2009-04-16 08:10:03 UTC
You are trying to install rhnmd-5.3.0-3.el4sat, but fix was in rhnmd-5.3.2-1
The new package has not been included in this iso due rel-eng (nanny?) mistake.
Will have to wait till next iso.

Comment 8 Miroslav Suchý 2009-04-22 08:19:47 UTC
*** Bug 496958 has been marked as a duplicate of this bug. ***

Comment 9 Preethi Thomas 2009-04-30 16:05:54 UTC
verified
[root@rlx-3-24 ~]# yum install rhnmd
Loaded plugins: rhnplugin, security
rhel-i386-server-5                                       | 1.3 kB     00:00     
primary.xml.gz                                           | 2.0 MB     00:00     
rhel-i386-server-5                                             5223/5223
rhn-tools-rhel-i386-server-5                             |  871 B     00:00     
primary.xml.gz                                           |  32 kB     00:00     
rhn-tools-rhel-i386-server-5                                   406/406
Setting up Install Process
Parsing package install arguments
Resolving Dependencies
--> Running transaction check
---> Package rhnmd.i386 0:5.3.0-4.el5sat set to be updated
--> Finished Dependency Resolution

Dependencies Resolved

================================================================================
 Package   Arch     Version              Repository                        Size
================================================================================
Installing:
 rhnmd     i386     5.3.0-4.el5sat       rhn-tools-rhel-i386-server-5      16 k

Transaction Summary
================================================================================
Install      1 Package(s)         
Update       0 Package(s)         
Remove       0 Package(s)         

Total download size: 16 k
Is this ok [y/N]: y
Downloading Packages:
rhnmd-5.3.0-4.el5sat.i386.rpm                            |  16 kB     00:00     
Running rpm_check_debug
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
  Installing     : rhnmd                                             [1/1] 

Installed: rhnmd.i386 0:5.3.0-4.el5sat
Complete!

Comment 10 Milan Zázrivec 2009-09-02 14:31:56 UTC
# rpm -q --requires rhnmd
/bin/bash  
/bin/sh  
/bin/sh  
/bin/sh  
/bin/sh  
config(rhnmd) = 5.3.0-4.el5sat
libc.so.6  
libc.so.6(GLIBC_2.1.3)  
openssh  
openssh-server  
rpmlib(CompressedFileNames) <= 3.0.4-1
rpmlib(PayloadFilesHavePrefix) <= 4.0-1
rtld(GNU_HASH)
# rpm -q rhnmd
rhnmd-5.3.0-4.el5sat

RELEASE_PENDING

Comment 11 Brandon Perkins 2009-09-10 18:49:23 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