Bug 442466 - Errata 'Affected Systems' count is incorrect (often 0)
Errata 'Affected Systems' count is incorrect (often 0)
Status: CLOSED CURRENTRELEASE
Product: Red Hat Satellite 5
Classification: Red Hat
Component: WebUI (Show other bugs)
500
All Linux
high Severity high
: ---
: ---
Assigned To: Mike McCune
Steve Salevan
:
Depends On:
Blocks: 429319 448773
  Show dependency treegraph
 
Reported: 2008-04-14 18:06 EDT by Mike McCune
Modified: 2010-10-22 20:02 EDT (History)
4 users (show)

See Also:
Fixed In Version: sat511
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2008-08-13 15:02:50 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Mike McCune 2008-04-14 18:06:29 EDT
If you create a custom errata, add packages to this custom errata and then
publish the errata you will see the following:

* The "Affected Systems" for this custom errata will remain at 0
* Systems that actually need this errata will never show them needing the errata
* You will won't be able to apply the errata to any systems

The only workaround is to change the ordering:

* Create errata
* Publish errata
* Add packages to errata

By adding the packages to the errata after it is published the Affected Systems
will be calculated properly.
Comment 7 Mike McCune 2008-04-22 19:32:07 EDT
There were a number of changes made while fixing this bug:

1) We fixed the ordering problem noted in comment #1.  Now if you create an
errata, add packages, then publish, the "Affected Systems" count will be
recalculated.

2) We also changed the way the code is executed that recalculates the "Affected
Systems" to begin execution *immediately* instead of waiting for Taskomatic to
start recalculating the counts.  

NOTE: The overall speed required to recalculate the Affected Systems for any
given errata has not changed.  On our older hardware for example:

Time required to recalculate the Affected Systems for an errata with:

* 3 Packages
* 2 Channels with a total of ~2300 systems
* End total of ~1800 affected systems

Results were approx ~20 minutes on the following hardware:

1xCPU Mobile Intel(R) Pentium(R) III CPU - M  1200MHz
2GB RAM
Embedded Oracle Database

See BZ https://bugzilla.redhat.com/show_bug.cgi?id=443718 for future plans to
enhance the speed of this recalculation.


Comment 9 Clifford Perry 2008-05-02 14:39:18 EDT
Flip from ON_DEV to MODIFIED. MASS move for Sat bugs. 
Comment 11 Jeff Browning 2008-05-21 16:44:50 EDT
Fails QA using this test:

1) Clone the RHEL 4 AS channel
2) Register a RHEL 4 system to the sat
3) Subscribe the system to the cloned channel
4) Run up2date -u on the system
5) Create an errata, add  redhat-release-4AS-7 rpm to it, publish it, and
associate it with the cloned channel
6) rpm -Uvh --oldpackage
http://barn.rhndev.redhat.com/engarchive2/released/RHEL-4/U1/AS/i386/tree/RedHat/RPMS/redhat-release-4AS-2.4.i386.rpm
on the test system to replace redhat-release with an older version
7) up2date -p and up2date -l on the system
8) Confirm that  redhat-release-4AS-7 is listed in up2date -l
9) Check the system list in the Web UI, and drill down into the packages for
that system

For me, while redhat-release-4AS-7 is listed as a package that the system needs,
my errata is not listed as containing this rpm. Looking at the errata itself, it
also does not list any affected systems.
Comment 13 Mike McCune 2008-06-05 14:48:56 EDT
working in this one.
Comment 14 Mike McCune 2008-06-05 16:23:30 EDT
In comment #11 your errata wasn't showing up as affecting your system because
there are previous errata in that channel that contain redhat-release.  There is
a rule in Satellite that a channel will only have 1 errata that applies to a
given system containing a given package.

So if systemX has package foo-1.0.0 and channel has:

Errata1: foo-1.1.0
Errata2: foo-1.1.0

the only Errata that will Affect systemX is Errata1

New steps to test this bug:

1) Clone the RHEL 4 AS channel
2) Register a RHEL 4 system to the sat
3) Subscribe the system to the cloned channel
4) Run up2date -u on the system
5) Install testAutoFile-1-1.0.i386.rpm from
trunk/qa/automation/gold/src/main/resources
6) rhnpush  testAutoFile*.rpm (make sure you get both revs into the channel)
from trunk/qa/automation/gold/src/main/resources into cloned channel on satellite.
7) Create an errata, add testAutoFile-2-1.0 to it, publish it, and
associate it with the cloned channel
8) up2date -p and up2date -l on the system
9) Confirm that  redhat-release-4AS-7 is listed in up2date -l
10) Check the system list in the Web UI, and drill down into the packages for
that system.  Verify that the package testAutoFile-2-1.0 and the Errata from
step 7 both apply to the system.

Comment 15 Mike McCune 2008-06-05 17:25:24 EDT
moving ON_QA.  Only correction to above testplan is I put in the wrong rpm name
in step 9.  make sure you see testAutoFile-2.1.0
Comment 16 Steve Salevan 2008-06-16 17:34:51 EDT
QA Contact -> ssalevan

Followed the test plan in comment #14 and most of the bug seems to check out. 
The errata was successfully created, the testAutoFile-2.1.0 package associated
with it, and the Satellite successfully noted that my system was affected by it
after an up2date -p.

Additionally, the system, upon running an up2date -l, detected the new package
attached to the errata.  Finally, after drilling down into the System page, the
errata was shown to be applicable to the system, and I opened up the link
provided on the System's errata update page.  Upon drilling into the errata and
clicking on the "Packages" tab, the Satellite reported that there were no
packages associated with the applicable errata, despite having added the package
when I created it.

Hence, due to the rest of these positive signs, this looks like inconsistent
behavior and I'm moving this bug over to FAILS_QA.
Comment 17 Mike McCune 2008-06-23 19:17:04 EDT
the above issue is BZ :

https://bugzilla.redhat.com/show_bug.cgi?id=425031

Moving back to ON_QA.  
Comment 18 Steve Salevan 2008-06-24 10:46:24 EDT
OK; I've re-tested and it appears that this bug is now verified.  Moving to
VERIFIED.
Comment 20 Brandon Perkins 2008-08-13 15:02:50 EDT
5.1.1 Satellite is now GA, bugs Closed for Current Release.
Comment 21 Brandon Perkins 2008-08-13 15:08:02 EDT
5.1.1 Satellite is now GA, bugs Closed for Current Release.

Note You need to log in before you can comment on or make changes to this bug.