Bug 1358726 - ORA-00001: unique constraint (RHNSAT.RHN_TASKO_RUN_ID_PK) violated
Summary: ORA-00001: unique constraint (RHNSAT.RHN_TASKO_RUN_ID_PK) violated
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Satellite 5
Classification: Red Hat
Component: Upgrades
Version: 570
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Tomáš Kašpárek
QA Contact: Red Hat Satellite QA List
URL:
Whiteboard:
Depends On:
Blocks: sat580-upgrades
TreeView+ depends on / blocked
 
Reported: 2016-07-21 11:38 UTC by Pavel Studeník
Modified: 2017-01-26 15:38 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-01-26 15:38:07 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Pavel Studeník 2016-07-21 11:38:09 UTC
Description of problem:
Hi, I migrated Satellite 5.5 to 5.7 with external oracle on new operating system. I proceeded by documentation in rhn-upgrade satellite-and-os-upgrade-oracle.txt and after migration I recipe tracebacks in taskomatic logging file:

INFO   | jvm 1    | 2016/07/21 13:26:00 | 2016-07-21 13:26:00,743 [DefaultQuartzScheduler_Worker-3] WARN  org.hibernate.util.JDBCExceptionReporter - SQL Error: 1, SQLState: 23000
INFO   | jvm 1    | 2016/07/21 13:26:00 | 2016-07-21 13:26:00,743 [DefaultQuartzScheduler_Worker-3] ERROR org.hibernate.util.JDBCExceptionReporter - ORA-00001: unique constraint (RHNSAT.RHN_TASKO_RUN_ID_PK) violated
INFO   | jvm 1    | 2016/07/21 13:26:00 |
INFO   | jvm 1    | 2016/07/21 13:26:00 | 2016-07-21 13:26:00,743 [DefaultQuartzScheduler_Worker-3] ERROR org.hibernate.event.def.AbstractFlushingEventListener - Could not synchronize database state with session
INFO   | jvm 1    | 2016/07/21 13:26:00 | org.hibernate.exception.ConstraintViolationException: could not insert: [com.redhat.rhn.taskomatic.TaskoRun]
INFO   | jvm 1    | 2016/07/21 13:26:00 |       at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:94)
INFO   | jvm 1    | 2016/07/21 13:26:00 |       at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:66)
INFO   | jvm 1    | 2016/07/21 13:26:00 |       at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2285)
INFO   | jvm 1    | 2016/07/21 13:26:00 |       at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2678)
INFO   | jvm 1    | 2016/07/21 13:26:00 |       at org.hibernate.action.EntityInsertAction.execute(EntityInsertAction.java:79)
INFO   | jvm 1    | 2016/07/21 13:26:00 |       at org.hibernate.engine.ActionQueue.execute(ActionQueue.java:278)

Version-Release number of selected component (if applicable):
rhn-upgrade-5.7.0.33-1.el6sat.noarch
satellite-schema-5.7.0.23-1.el6sat.noarch
spacewalk-schema-2.3.2-26.el6sat.noarch


How reproducible:
always with oracle

Steps to Reproduce:
1. install satellite 5.7 (without yum update)
2. restore old database
3. spacewalk-schema-upgrade
Schema upgrade: [satellite-schema-5.5.0.15-1.el5sat] -> [satellite-schema-5.7.0.11-1.el6sat]
Searching for upgrade path: [satellite-schema-5.5.0.15-1] -> [satellite-schema-5.7.0.11-1]
Searching for upgrade path: [satellite-schema-5.5.0.15] -> [satellite-schema-5.7.0.11]
Searching for upgrade path: [satellite-schema-5.5.0] -> [satellite-schema-5.7.0]
Searching for upgrade path: [satellite-schema-5.5] -> [satellite-schema-5.7]
The path: [satellite-schema-5.5] -> [satellite-schema-5.6] -> [satellite-schema-5.7]
Planning to run spacewalk-sql with [/var/log/spacewalk/schema-upgrade/20160721-115729-script.sql]
4. update system from prod..
5. run schema-upgrade again
Schema upgrade: [satellite-schema-5.7.0.11-1.el6sat] -> [satellite-schema-5.7.0.23-1.el6sat]
Searching for upgrade path: [satellite-schema-5.7.0.11-1] -> [satellite-schema-5.7.0.23-1]
Searching for upgrade path: [satellite-schema-5.7.0.11] -> [satellite-schema-5.7.0.23]
The path: [satellite-schema-5.7.0.11] -> [satellite-schema-5.7.0.14] -> [satellite-schema-5.7.0.15] -> [satellite-schema-5.7.0.16] -> [satellite-schema-5.7.0.17] -> [satellite-schema-5.7.0.18] -> [satellite-schema-5.7.0.19] -> [satellite-schema-5.7.0.20] -> [satellite-schema-5.7.0.22] -> [satellite-schema-5.7.0.23]
6. satellite restart

Actual results:
tracaback in taskomatic's logging file

Expected results:
without tracebacks

Additional info:

INFO   | jvm 1    | 2016/07/21 13:26:01 | 2016-07-21 13:26:01,519 [DefaultQuartzScheduler_Worker-4] WARN  org.hibernate.util.JDBCExceptionReporter - SQL Error: 1, SQLState: 23000
INFO   | jvm 1    | 2016/07/21 13:26:01 | 2016-07-21 13:26:01,519 [DefaultQuartzScheduler_Worker-4] ERROR org.hibernate.util.JDBCExceptionReporter - ORA-00001: unique constraint (RHNSAT.RHN_TASKO_RUN_ID_PK) violated
INFO   | jvm 1    | 2016/07/21 13:26:01 |
INFO   | jvm 1    | 2016/07/21 13:26:01 | 2016-07-21 13:26:01,519 [DefaultQuartzScheduler_Worker-4] ERROR org.hibernate.event.def.AbstractFlushingEventListener - Could not synchronize database state with session
INFO   | jvm 1    | 2016/07/21 13:26:01 | org.hibernate.exception.ConstraintViolationException: could not insert: [com.redhat.rhn.taskomatic.TaskoRun]
INFO   | jvm 1    | 2016/07/21 13:26:01 |       at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:94)
INFO   | jvm 1    | 2016/07/21 13:26:01 |       at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:66)
INFO   | jvm 1    | 2016/07/21 13:26:01 |       at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2285)
INFO   | jvm 1    | 2016/07/21 13:26:01 |       at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2678)
INFO   | jvm 1    | 2016/07/21 13:26:01 |       at org.hibernate.action.EntityInsertAction.execute(EntityInsertAction.java:79)
INFO   | jvm 1    | 2016/07/21 13:26:01 |       at org.hibernate.engine.ActionQueue.execute(ActionQueue.java:278)
INFO   | jvm 1    | 2016/07/21 13:26:01 |       at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:262)
INFO   | jvm 1    | 2016/07/21 13:26:01 |       at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:166)
INFO   | jvm 1    | 2016/07/21 13:26:01 |       at org.hibernate.event.def.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:321)
INFO   | jvm 1    | 2016/07/21 13:26:01 |       at org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:50)
INFO   | jvm 1    | 2016/07/21 13:26:01 |       at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:1030)
INFO   | jvm 1    | 2016/07/21 13:26:01 |       at org.hibernate.impl.SessionImpl.managedFlush(SessionImpl.java:367)
INFO   | jvm 1    | 2016/07/21 13:26:01 |       at org.hibernate.transaction.JDBCTransaction.commit(JDBCTransaction.java:137)
INFO   | jvm 1    | 2016/07/21 13:26:01 |       at com.redhat.rhn.common.hibernate.ConnectionManager.closeSession(ConnectionManager.java:307)
INFO   | jvm 1    | 2016/07/21 13:26:01 |       at com.redhat.rhn.common.hibernate.HibernateFactory.closeSession(HibernateFactory.java:356)
INFO   | jvm 1    | 2016/07/21 13:26:01 |       at com.redhat.rhn.taskomatic.TaskoJob.execute(TaskoJob.java:207)
INFO   | jvm 1    | 2016/07/21 13:26:01 |       at org.quartz.core.JobRunShell.run(JobRunShell.java:216)
INFO   | jvm 1    | 2016/07/21 13:26:01 |       at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:549)
INFO   | jvm 1    | 2016/07/21 13:26:01 | Caused by:
INFO   | jvm 1    | 2016/07/21 13:26:01 | java.sql.SQLException: ORA-00001: unique constraint (RHNSAT.RHN_TASKO_RUN_ID_PK) violated


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