Bug 612115 - Provisioning: Unable to upgrade/revert bundle to a latest/previous version at same Root Deployment Directory
Summary: Provisioning: Unable to upgrade/revert bundle to a latest/previous version at...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: RHQ Project
Classification: Other
Component: Provisioning
Version: 3.0.0
Hardware: All
OS: Linux
urgent
medium
Target Milestone: ---
: ---
Assignee: Jay Shaughnessy
QA Contact: Sunil Kondkar
URL:
Whiteboard:
Depends On:
Blocks: jon-sprint12-bugs
TreeView+ depends on / blocked
 
Reported: 2010-07-07 10:54 UTC by Sudhir D
Modified: 2010-08-12 16:56 UTC (History)
1 user (show)

Fixed In Version: 2.4
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2010-08-12 16:56:20 UTC
Embargoed:


Attachments (Terms of Use)

Description Sudhir D 2010-07-07 10:54:32 UTC
Description of problem:
Unable to upgrade/revert bundle to a latest/previous version at same path

Version-Release number of selected component (if applicable):
jon-server-2.4.0.GA_QA Build# 51

How reproducible:
Always

Steps to Reproduce:
1. Go to Administration->Content->Bundles
2. Select the existing bundle
3. Click on Deploy.
4. Provide the existing Root Deployment directory where we want to upgrade/revert the bundle to latest/previous version.
  
Actual results:
Throws constraint voilation error.

Expected results:
In place upgrade/degrade of version should be allowed.

Additional info:
log snippet:

java.lang.Exception: java.lang.RuntimeException:javax.transaction.RollbackException: [com.arjuna.ats.internal.jta.transaction.arjunacore.commitwhenaborted] [com.arjuna.ats.internal.jta.transaction.arjunacore.commitwhenaborted] Can't commit because the transaction is in aborted state -> javax.transaction.RollbackException:[com.arjuna.ats.internal.jta.transaction.arjunacore.commitwhenaborted] [com.arjuna.ats.internal.jta.transaction.arjunacore.commitwhenaborted] Can't commit because the transaction is in aborted state -> javax.persistence.EntityExistsException:org.hibernate.exception.ConstraintViolationException: Could not execute JDBC batch update -> org.hibernate.exception.ConstraintViolationException:Could not execute JDBC batch update -> java.sql.BatchUpdateException:Batch entry 0 insert into RHQ_BUNDLE_DESTINATION (NAME, DESCRIPTION, DEPLOY_DIR, CTIME, MTIME, BUNDLE_ID, GROUP_ID, ID) values ('dhcp6-1.1', NULL, '/root/Desktop/JON/LATEST', '1278479759447', '1278479759447', '10001', '10001', '10013') was aborted. Call getNextException to see the cause.[SQLException=Batch entry 0 insert into RHQ_BUNDLE_DESTINATION (NAME, DESCRIPTION, DEPLOY_DIR, CTIME, MTIME, BUNDLE_ID, GROUP_ID, ID) values ('dhcp6-1.1', NULL, '/root/Desktop/JON/LATEST', '1278479759447', '1278479759447', '10001', '10001', '10013') was aborted. Call getNextException to see the cause. -> ERROR: duplicate key value violates unique constraint "rhq_bundle_destination_unique"(error-code=0,sql-state=23505)]

Comment 1 Jay Shaughnessy 2010-07-07 19:51:11 UTC
fix commit: 91c9d1fb7849b9966f60a2cdeb8bca1903e3389c

The problem here is that the user tried to create the same destination twice. Meaning, A bundle can have multiple destinations, but each must be unique, meaning for a Bundle, two destinations can not have the same deploy directory and target group (of platforms).

Once a destination exists and you want to deploy to it *again*, you do it from the destination view's Deploy button.

I've improved handling of this situation and display a (hopefully) useful message.

Comment 2 Sunil Kondkar 2010-07-08 11:31:52 UTC
Verified on jon-2.4.0.GA_QA build#52

If a destination exists and user tries to upgrade bundle to the same destination, below message is displayed.

"Failed to create destination, it may already exist. (Note, for an existing destination deploy from the Destination view)"

Comment 3 Corey Welton 2010-08-12 16:56:20 UTC
Mass-closure of verified bugs against JON.


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