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.
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)
Fixed in spacewalk git 51dc1dc669bc1ac048c9c6af9060b408db0a054d
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
switching to assigned
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
Also: 3cce803fb9e1ca1e59cc8e79ac9d211b8eca7942
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
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