I've got a clean Spacewalk 1.1 installation with Oracle 11g R2 as a backend 
database running on CentOS 5.5 and I'm having some problems with 
spacewalk-repo-sync.

When I run spacewalk-repo-sync, either from command line or through the web-ui 
no yum repodata is generated so when clients try to do a yum check-update the 
channel shows no packages.
The repodata (like filelist.xml.gz and primary.xml.gz) only contains a skeleton 
configuration; created upon channel creation, and spacewalk-repo-sync should be 
modifying these files after a succesfull sync.

[r...@spacewalk test-channel]# pwd
/var/cache/rhn/repodata/test-channel

[r...@spacewalk test-channel]# zcat primary.xml.gz 
<?xml version="1.0" encoding="UTF-8"?>
<metadata packages="0" xmlns="http://linux.duke.edu/metadata/common"; 
xmlns:rpm="http://linux.duke.edu/metadata/rpm"/>

[r...@spacewalk test-channel]# zcat filelists.xml.gz 
<?xml version="1.0" encoding="UTF-8"?>
<filelists packages="0" xmlns="http://linux.duke.edu/metadata/filelists"/>

The channel gets populated with packages, I can browse the newly synced 
packages through the Spacewalk web-ui. 
But since no modification is being done on the repodata, yum sees no packages 
and clients can't recieve updates.

After a successfull sync I observe a task being created by Taskomatic, by 
firing up sqlplus and doing a SELECT * FROM RHNTASKQUEUE

ORG_ID  TASK_NAME   TASK_DATA  PRIORITY  EARLIEST
------  ----------- ---------- --------- ----------
1       repo_sync   134        0         22-AUG-10

Shortly thereafter the RHNTASKQUEUE is empty and 
/var/log/rhn/rhn_taskomatic_daemon.log shows the following exception:

INFO   | jvm 1    | 2010/08/22 00:30:00 | 2010-08-22 00:30:00,069 
[DefaultQuartzScheduler_Worker-2] ERROR 
org.hibernate.event.def.AbstractFlushingEventListener - Could not synchronize 
database state with session
INFO   | jvm 1    | 2010/08/22 00:30:00 | org.hibernate.StaleStateException: 
Batch update returned unexpected row count from update [0]; actual row count: 
0; expected: 1
INFO   | jvm 1    | 2010/08/22 00:30:00 |       at 
org.hibernate.jdbc.Expectations$BasicExpectation.checkBatched(Expectations.java:61)
INFO   | jvm 1    | 2010/08/22 00:30:00 |       at 
org.hibernate.jdbc.Expectations$BasicExpectation.verifyOutcome(Expectations.java:46)
INFO   | jvm 1    | 2010/08/22 00:30:00 |       at 
org.hibernate.jdbc.NonBatchingBatcher.addToBatch(NonBatchingBatcher.java:24)
INFO   | jvm 1    | 2010/08/22 00:30:00 |       at 
org.hibernate.persister.entity.AbstractEntityPersister.delete(AbstractEntityPersister.java:2520)
INFO   | jvm 1    | 2010/08/22 00:30:00 |       at 
org.hibernate.persister.entity.AbstractEntityPersister.delete(AbstractEntityPersister.java:2697)
INFO   | jvm 1    | 2010/08/22 00:30:00 |       at 
org.hibernate.action.EntityDeleteAction.execute(EntityDeleteAction.java:74)
INFO   | jvm 1    | 2010/08/22 00:30:00 |       at 
org.hibernate.engine.ActionQueue.execute(ActionQueue.java:250)
INFO   | jvm 1    | 2010/08/22 00:30:00 |       at 
org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:234)
INFO   | jvm 1    | 2010/08/22 00:30:00 |       at 
org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:146)
INFO   | jvm 1    | 2010/08/22 00:30:00 |       at 
org.hibernate.event.def.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:298)
INFO   | jvm 1    | 2010/08/22 00:30:00 |       at 
org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:27)
INFO   | jvm 1    | 2010/08/22 00:30:00 |       at 
org.hibernate.impl.SessionImpl.flush(SessionImpl.java:1000)
INFO   | jvm 1    | 2010/08/22 00:30:00 |       at 
com.redhat.rhn.common.db.datasource.CachedStatement.stealConnection(CachedStatement.java:853)
INFO   | jvm 1    | 2010/08/22 00:30:00 |       at 
com.redhat.rhn.common.db.datasource.CachedStatement.execute(CachedStatement.java:441)
INFO   | jvm 1    | 2010/08/22 00:30:00 |       at 
com.redhat.rhn.common.db.datasource.CachedStatement.execute(CachedStatement.java:431)
INFO   | jvm 1    | 2010/08/22 00:30:00 |       at 
com.redhat.rhn.common.db.datasource.CachedStatement.execute(CachedStatement.java:335)
INFO   | jvm 1    | 2010/08/22 00:30:00 |       at 
com.redhat.rhn.common.db.datasource.CachedStatement.execute(CachedStatement.java:340)
INFO   | jvm 1    | 2010/08/22 00:30:00 |       at 
com.redhat.rhn.common.db.datasource.CachedStatement.execute(CachedStatement.java:280)
INFO   | jvm 1    | 2010/08/22 00:30:00 |       at 
com.redhat.rhn.common.db.datasource.SelectMode.execute(SelectMode.java:105)
INFO   | jvm 1    | 2010/08/22 00:30:00 |       at 
com.redhat.rhn.taskomatic.task.errata.ErrataQueueDriver.getCandidates(ErrataQueueDriver.java:58)
INFO   | jvm 1    | 2010/08/22 00:30:00 |       at 
com.redhat.rhn.taskomatic.task.threaded.TaskQueue.run(TaskQueue.java:106)
INFO   | jvm 1    | 2010/08/22 00:30:00 |       at 
com.redhat.rhn.taskomatic.task.ErrataQueue.execute(ErrataQueue.java:58)
INFO   | jvm 1    | 2010/08/22 00:30:00 |       at 
com.redhat.rhn.taskomatic.task.SingleThreadedTestableTask.execute(SingleThreadedTestableTask.java:54)
INFO   | jvm 1    | 2010/08/22 00:30:00 |       at 
org.quartz.core.JobRunShell.run(JobRunShell.java:214)
INFO   | jvm 1    | 2010/08/22 00:30:00 |       at 
org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:549)
INFO   | jvm 1    | 2010/08/22 00:30:00 | 2010-08-22 00:30:00,077 
[DefaultQuartzScheduler_Worker-2] ERROR 
org.hibernate.event.def.AbstractFlushingEventListener - Could not synchronize 
database state with session
INFO   | jvm 1    | 2010/08/22 00:30:00 | org.hibernate.StaleStateException: 
Batch update returned unexpected row count from update [0]; actual row count: 
0; expected: 1
INFO   | jvm 1    | 2010/08/22 00:30:00 |       at 
org.hibernate.jdbc.Expectations$BasicExpectation.checkBatched(Expectations.java:61)
INFO   | jvm 1    | 2010/08/22 00:30:00 |       at 
org.hibernate.jdbc.Expectations$BasicExpectation.verifyOutcome(Expectations.java:46)
INFO   | jvm 1    | 2010/08/22 00:30:00 |       at 
org.hibernate.jdbc.NonBatchingBatcher.addToBatch(NonBatchingBatcher.java:24)
INFO   | jvm 1    | 2010/08/22 00:30:00 |       at 
org.hibernate.persister.entity.AbstractEntityPersister.delete(AbstractEntityPersister.java:2520)
INFO   | jvm 1    | 2010/08/22 00:30:00 |       at 
org.hibernate.persister.entity.AbstractEntityPersister.delete(AbstractEntityPersister.java:2697)
INFO   | jvm 1    | 2010/08/22 00:30:00 |       at 
org.hibernate.action.EntityDeleteAction.execute(EntityDeleteAction.java:74)
INFO   | jvm 1    | 2010/08/22 00:30:00 |       at 
org.hibernate.engine.ActionQueue.execute(ActionQueue.java:250)
INFO   | jvm 1    | 2010/08/22 00:30:00 |       at 
org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:234)
INFO   | jvm 1    | 2010/08/22 00:30:00 |       at 
org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:146)
INFO   | jvm 1    | 2010/08/22 00:30:00 |       at 
org.hibernate.event.def.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:298)
INFO   | jvm 1    | 2010/08/22 00:30:00 |       at 
org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:27)
INFO   | jvm 1    | 2010/08/22 00:30:00 |       at 
org.hibernate.impl.SessionImpl.flush(SessionImpl.java:1000)
INFO   | jvm 1    | 2010/08/22 00:30:00 |       at 
org.hibernate.impl.SessionImpl.managedFlush(SessionImpl.java:338)
INFO   | jvm 1    | 2010/08/22 00:30:00 |       at 
org.hibernate.transaction.JDBCTransaction.commit(JDBCTransaction.java:106)
INFO   | jvm 1    | 2010/08/22 00:30:00 |       at 
com.redhat.rhn.common.hibernate.ConnectionManager.closeSession(ConnectionManager.java:305)
INFO   | jvm 1    | 2010/08/22 00:30:00 |       at 
com.redhat.rhn.common.hibernate.HibernateFactory.closeSession(HibernateFactory.java:343)
INFO   | jvm 1    | 2010/08/22 00:30:00 |       at 
com.redhat.rhn.taskomatic.task.errata.ErrataQueueDriver.getCandidates(ErrataQueueDriver.java:67)
INFO   | jvm 1    | 2010/08/22 00:30:00 |       at 
com.redhat.rhn.taskomatic.task.threaded.TaskQueue.run(TaskQueue.java:106)
INFO   | jvm 1    | 2010/08/22 00:30:00 |       at 
com.redhat.rhn.taskomatic.task.ErrataQueue.execute(ErrataQueue.java:58)
INFO   | jvm 1    | 2010/08/22 00:30:00 |       at 
com.redhat.rhn.taskomatic.task.SingleThreadedTestableTask.execute(SingleThreadedTestableTask.java:54)
INFO   | jvm 1    | 2010/08/22 00:30:00 |       at 
org.quartz.core.JobRunShell.run(JobRunShell.java:214)
INFO   | jvm 1    | 2010/08/22 00:30:00 |       at 
org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:549)
INFO   | jvm 1    | 2010/08/22 00:30:00 | 2010-08-22 00:30:00,080 
[DefaultQuartzScheduler_Worker-10] ERROR 
org.hibernate.event.def.AbstractFlushingEventListener - Could not synchronize 
database state with session
INFO   | jvm 1    | 2010/08/22 00:30:00 | org.hibernate.StaleStateException: 
Batch update returned unexpected row count from update [0]; actual row count: 
0; expected: 1
INFO   | jvm 1    | 2010/08/22 00:30:00 |       at 
org.hibernate.jdbc.Expectations$BasicExpectation.checkBatched(Expectations.java:61)
INFO   | jvm 1    | 2010/08/22 00:30:00 |       at 
org.hibernate.jdbc.Expectations$BasicExpectation.verifyOutcome(Expectations.java:46)
INFO   | jvm 1    | 2010/08/22 00:30:00 |       at 
org.hibernate.jdbc.NonBatchingBatcher.addToBatch(NonBatchingBatcher.java:24)
INFO   | jvm 1    | 2010/08/22 00:30:00 |       at 
org.hibernate.persister.entity.AbstractEntityPersister.delete(AbstractEntityPersister.java:2520)
INFO   | jvm 1    | 2010/08/22 00:30:00 |       at 
org.hibernate.persister.entity.AbstractEntityPersister.delete(AbstractEntityPersister.java:2697)
INFO   | jvm 1    | 2010/08/22 00:30:00 |       at 
org.hibernate.action.EntityDeleteAction.execute(EntityDeleteAction.java:74)
INFO   | jvm 1    | 2010/08/22 00:30:00 |       at 
org.hibernate.engine.ActionQueue.execute(ActionQueue.java:250)
INFO   | jvm 1    | 2010/08/22 00:30:00 |       at 
org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:234)
INFO   | jvm 1    | 2010/08/22 00:30:00 |       at 
org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:146)
INFO   | jvm 1    | 2010/08/22 00:30:00 |       at 
org.hibernate.event.def.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:298)
INFO   | jvm 1    | 2010/08/22 00:30:00 |       at 
org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:27)
INFO   | jvm 1    | 2010/08/22 00:30:00 |       at 
org.hibernate.impl.SessionImpl.flush(SessionImpl.java:1000)
INFO   | jvm 1    | 2010/08/22 00:30:00 |       at 
com.redhat.rhn.common.db.datasource.CachedStatement.stealConnection(CachedStatement.java:853)
INFO   | jvm 1    | 2010/08/22 00:30:00 |       at 
com.redhat.rhn.common.db.datasource.CachedStatement.executeCallable(CachedStatement.java:502)
INFO   | jvm 1    | 2010/08/22 00:30:00 |       at 
com.redhat.rhn.common.db.datasource.CallableMode.execute(CallableMode.java:34)
INFO   | jvm 1    | 2010/08/22 00:30:00 |       at 
com.redhat.rhn.taskomatic.task.SessionCleanup.run(SessionCleanup.java:93)
INFO   | jvm 1    | 2010/08/22 00:30:00 |       at 
com.redhat.rhn.taskomatic.task.SingleThreadedTask.execute(SingleThreadedTask.java:55)
INFO   | jvm 1    | 2010/08/22 00:30:00 |       at 
org.quartz.core.JobRunShell.run(JobRunShell.java:214)
INFO   | jvm 1    | 2010/08/22 00:30:00 |       at 
org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:549)
INFO   | jvm 1    | 2010/08/22 00:30:00 | 2010-08-22 00:30:00,080 
[DefaultQuartzScheduler_Worker-2] ERROR 
com.redhat.rhn.taskomatic.core.SchedulerKernel - 
com.redhat.rhn.common.hibernate.HibernateRuntimeException: HibernateException 
executing CachedStatement
INFO   | jvm 1    | 2010/08/22 00:30:00 | 2010-08-22 00:30:00,102 
[DefaultQuartzScheduler_Worker-10] ERROR 
com.redhat.rhn.taskomatic.core.SchedulerKernel - 
com.redhat.rhn.common.hibernate.HibernateRuntimeException: HibernateException 
executing CachedStatement

So I'm guessing the repodata task is unable to run and that's the root cause of 
my woes.

But here's the twist:
After I use spacewalk-repo-sync to sync a remote yum repo to a channel, I fire 
up rhnpush and push a single local rpm package to the channel and voila! Then 
the repodata gets modified, including information about all other packages in 
the channel, as well as the local rpm package itself.

Does anyone know what might be going on here?

-- 
Arnar 'Addi' Gunnarsson     | System Administrator
http://addi.org/GPG-KEY.asc | RHCE ยท MCSA

_______________________________________________
Spacewalk-list mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/spacewalk-list

Reply via email to