Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 612115 - Provisioning: Unable to upgrade/revert bundle to a latest/previous version at same Root Deployment Directory
Provisioning: Unable to upgrade/revert bundle to a latest/previous version at...
Status: CLOSED CURRENTRELEASE
Product: RHQ Project
Classification: Other
Component: Provisioning (Show other bugs)
3.0.0
All Linux
urgent Severity medium (vote)
: ---
: ---
Assigned To: Jay Shaughnessy
Sunil Kondkar
:
Depends On:
Blocks: jon-sprint12-bugs
  Show dependency treegraph
 
Reported: 2010-07-07 06:54 EDT by Sudhir D
Modified: 2010-08-12 12:56 EDT (History)
1 user (show)

See Also:
Fixed In Version: 2.4
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2010-08-12 12:56:20 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Sudhir D 2010-07-07 06:54:32 EDT
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 15:51:11 EDT
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 07:31:52 EDT
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 12:56:20 EDT
Mass-closure of verified bugs against JON.

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