Bug 576301 - Auto-update feature schedules errata for systems that do not need errata
Summary: Auto-update feature schedules errata for systems that do not need errata
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite 5
Classification: Red Hat
Component: Other
Version: 530
Hardware: All
OS: Linux
low
medium
Target Milestone: ---
Assignee: Justin Sherrill
QA Contact: Petr Sklenar
URL:
Whiteboard:
Depends On:
Blocks: sat531-blockers
TreeView+ depends on / blocked
 
Reported: 2010-03-23 18:47 UTC by Justin Sherrill
Modified: 2018-10-27 12:16 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2010-06-22 14:05:27 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2010:0498 0 normal SHIPPED_LIVE Red Hat Network Satellite bug fix update 2010-06-22 14:03:13 UTC

Description Justin Sherrill 2010-03-23 18:47:31 UTC
Description of problem:

The auto-update feature will schedule errata for all systems in the errata's channels regardless of whether the errata is applicable to it.


How reproducible:


Steps to Reproduce:
1. Enable auto-update on several systems
2. Ensure that at least one of the systems will need the upcoming errata and one won't
3. sat-sync in order to pull in the new errata
  
Actual results:
Errata apply is scheduled for all systems with auto-update enabled


Expected results:
Errata apply is only scheduled for systems with auto-update enabled that need the errata.

Comment 1 Justin Sherrill 2010-03-23 20:06:14 UTC
affected query in task_queries:



<mode name="errataqueue_find_autoupdate_servers">
  <query params="errata_id, channel_id">
SELECT DISTINCT
       S.id AS server_id, S.org_id org_id
  FROM rhnServer S
 WHERE EXISTS (SELECT 1 FROM rhnChannelErrata CE, rhnServerChannel SC
                       WHERE CE.errata_id = :errata_id
                         AND SC.channel_id = CE.channel_id
                         AND SC.server_id = S.id)
 AND EXISTS 
   (SELECT 1 FROM rhnServerFeaturesView SFV WHERE 
    SFV.server_id = S.id AND SFV.label = 'ftr_auto_errata_updates')
 AND s.auto_update IS NOT NULL AND UPPER(s.auto_update) = 'Y'                         
ORDER BY S.org_id
  </query>
</mode>



Need to limit servers by needed errata  (rhnServerNeededCache)

Comment 3 Justin Sherrill 2010-03-26 20:16:05 UTC
Fixed in spacewalk git 51dc1dc669bc1ac048c9c6af9060b408db0a054d

Comment 11 Justin Sherrill 2010-06-10 14:22:51 UTC
INFO   | jvm 4    | 2010/06/10 07:37:36 |       ... 25 more
INFO   | jvm 4    | 2010/06/10 07:37:38 | 2010-06-10 07:37:38,023 [Thread-19] ERROR com.redhat.rhn.taskomatic.task.ErrataQueue - Errata: 49, Org Id: null
INFO   | jvm 4    | 2010/06/10 07:37:38 | com.redhat.rhn.common.db.WrappedSQLException: ORA-00932: inconsistent datatypes: expected UDT got CHAR
INFO   | jvm 4    | 2010/06/10 07:37:38 |
INFO   | jvm 4    | 2010/06/10 07:37:38 |       at java.lang.Throwable.<init>(Throwable.java:67)
INFO   | jvm 4    | 2010/06/10 07:37:38 |       at java.sql.SQLException.<init>(SQLException.java:101)
INFO   | jvm 4    | 2010/06/10 07:37:38 |       at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:112)
INFO   | jvm 4    | 2010/06/10 07:37:38 |       at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:331)
INFO   | jvm 4    | 2010/06/10 07:37:38 |       at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:288)
INFO   | jvm 4    | 2010/06/10 07:37:38 |       at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:745)
INFO   | jvm 4    | 2010/06/10 07:37:38 |       at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:219)
INFO   | jvm 4    | 2010/06/10 07:37:38 |       at oracle.jdbc.driver.T4CPreparedStatement.executeForDescribe(T4CPreparedStatement.java:813)
INFO   | jvm 4    | 2010/06/10 07:37:38 |       at oracle.jdbc.driver.OracleStatement.executeMaybeDescribe(OracleStatement.java)
INFO   | jvm 4    | 2010/06/10 07:37:38 |       at oracle.jdbc.driver.T4CPreparedStatement.executeMaybeDescribe(T4CPreparedStatement.java:854)
INFO   | jvm 4    | 2010/06/10 07:37:38 |       at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1154)
INFO   | jvm 4    | 2010/06/10 07:37:38 |       at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3370)
INFO   | jvm 4    | 2010/06/10 07:37:38 |       at oracle.jdbc.driver.OraclePreparedStatement.execute(OraclePreparedStatement.java:3476)
INFO   | jvm 4    | 2010/06/10 07:37:38 |       at com.mchange.v2.c3p0.impl.NewProxyPreparedStatement.execute(NewProxyPreparedStatement.java:651)
INFO   | jvm 4    | 2010/06/10 07:37:38 |       at com.redhat.rhn.common.db.NamedPreparedStatement.execute(NamedPreparedStatement.java:137)
INFO   | jvm 4    | 2010/06/10 07:37:38 |       at com.redhat.rhn.common.db.datasource.CachedStatement.execute(CachedStatement.java:454)
INFO   | jvm 4    | 2010/06/10 07:37:38 |       at com.redhat.rhn.common.db.datasource.CachedStatement.execute(CachedStatement.java:431)
INFO   | jvm 4    | 2010/06/10 07:37:38 |       at com.redhat.rhn.common.db.datasource.CachedStatement.execute(CachedStatement.java:335)
INFO   | jvm 4    | 2010/06/10 07:37:38 |       at com.redhat.rhn.common.db.datasource.CachedStatement.execute(CachedStatement.java:340)
INFO   | jvm 4    | 2010/06/10 07:37:38 |       at com.redhat.rhn.common.db.datasource.CachedStatement.execute(CachedStatement.java:280)
INFO   | jvm 4    | 2010/06/10 07:37:38 |       at com.redhat.rhn.common.db.datasource.SelectMode.execute(SelectMode.java)
INFO   | jvm 4    | 2010/06/10 07:37:38 |       at com.redhat.rhn.taskomatic.task.errata.ErrataQueueWorker.scheduleAutoUpdates(ErrataQueueWorker.java:163)
INFO   | jvm 4    | 2010/06/10 07:37:38 |       at com.redhat.rhn.taskomatic.task.errata.ErrataQueueWorker.run(ErrataQueueWorker.java:75)
INFO   | jvm 4    | 2010/06/10 07:37:38 |       at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:761)
INFO   | jvm 4    | 2010/06/10 07:37:38 |       at java.lang.Thread.run(Thread.java:736)
INFO   | jvm 4    | 2010/06/10 07:37:38 | Caused by:
INFO   | jvm 4    | 2010/06/10 07:37:38 | java.sql.SQLException: ORA-00932: inconsistent datatypes: expected UDT got CHAR
INFO   | jvm 4    | 2010/06/10 07:37:38 |
INFO   | jvm 4    | 2010/06/10 07:37:38 |       ... 25 more

Comment 12 Petr Sklenar 2010-06-10 14:23:54 UTC
switching to assigned

Comment 13 Justin Sherrill 2010-06-10 14:46:25 UTC
Doh!

I had actually fixed this issue previously but forgot to cherry pick it (because i forgot to add it to this bug). 

Fixed in spacewalk master:
de970c54

Comment 14 Justin Sherrill 2010-06-10 14:54:52 UTC
Also:
3cce803fb9e1ca1e59cc8e79ac9d211b8eca7942

Comment 17 Petr Sklenar 2010-06-14 13:31:31 UTC
testing procedure:
reproduced scenario from Comment 1

tested with: sat530 updates + errata's packages:
spacewalk-java-0.5.44-80.el5sat
spacewalk-java-config-0.5.44-80.el5sat
spacewalk-java-lib-0.5.44-80.el5sat
spacewalk-taskomatic-0.5.44-80.el5sat    

--
works as expected, Verified

Comment 19 errata-xmlrpc 2010-06-22 14:05:27 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/RHBA-2010-0498.html


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