Bug 1066432

Summary: syncing erratum to the channel do not schedules actions on subscribed systems with "auto errata updates: yes"
Product: [Community] Spacewalk Reporter: Jan Hutař <jhutar>
Component: WebUIAssignee: Stephen Herr <sherr>
Status: CLOSED CURRENTRELEASE QA Contact: Red Hat Satellite QA List <satqe-list>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 2.1   
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: spacewalk-java-2.3.13-1 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-04-14 19:03:40 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:
Bug Depends On:    
Bug Blocks: 1207293    

Description Jan Hutař 2014-02-18 11:55:28 UTC
Description of problem:
When I sync new erratum to the channel, Spacewalk do not schedules actions on systems subscribed to this channel which have "auto errata updates: yes".


Version-Release number of selected component (if applicable):
spacewalk-java-2.1.145-1.el5


How reproducible:
always


Steps to Reproduce:
1. Have empty Spacewalk and two dumps of one channel
   (one without erratas, one full)
2. Sync dump without erratas and register system int it
3. Install all the old package versions for which you will have errata
   when you sync full dump later
4. Make that system "Auto Errata Update: Yes"
5. Sync full dump to the Satellite
6. Wait (~30 minutes), so errata update events are scheduled for the system


Actual results:
No events are scheduled


Expected results:
Errata update events for erratas synced in step "5." which are applicable for your system should be scheduled


Additional info:
After this, when you go to Errata -> Manage Errata -> <some_of_the_synced_erratas> -> Send email notification, waits few minutes and events for <some_of_the_synced_erratas> will be auto-scheduled for the system.

Comment 4 Jan Hutař 2014-02-18 12:32:44 UTC
Same steps to reproduce on Satellite 5.6.0 with spacewalk-java-2.0.2-58.el6sat.noarch works as expected.

Comment 5 Stephen Herr 2014-06-26 12:45:25 UTC
I believe that problem is, in a nutshell, that the Errata Mailer / Errata AutoUpdate queries now depend on the rhnServerNeededCache table. Depending on that cache instead of re-calculating all that information ourselves was the essence of the speedup for those queries. The problem seems to be that the rhnServerNeededCache table has not been completely updated by the time that Taskomatic begins processing Errata off of rhnErrataQueue. We need to find a way to block the errata task until rhnServerNeededCache is updated.

Comment 6 Stephen Herr 2014-07-30 20:05:45 UTC
This should be fixed in Spacewalk master:
f4613da692eaa571c2cfd7035d9a9f1cc9ca89f9

I'm also adding another commit that is not required but that will make future installations of Spacewalk run the ErrataCache task more frequently. You can't really do that as part of an upgrade, because it's not simply updating Spacewalk's database but you'd have to find a way to call into Quartz's api so it can update its database, which is not easy on an upgrade. The user can always update the Quartz schedule manually for ErrataCache to be "0 * * * * ?" to have the same effect for upgrades.
817c4b94c754d2eb3845b2b14ee4750b32121cdd

Comment 7 Grant Gainey 2015-03-23 16:59:21 UTC
Moving bugs to ON_QA as we move to release Spacewalk 2.3

Comment 8 Grant Gainey 2015-04-14 19:03:40 UTC
Spacewalk 2.3 has been released. See

https://fedorahosted.org/spacewalk/wiki/ReleaseNotes23