Bug 877073 - Failed plugin installation should not install plugin JAR in database
Failed plugin installation should not install plugin JAR in database
Status: NEW
Product: RHQ Project
Classification: Other
Component: Core Server, Plugins (Show other bugs)
Unspecified Unspecified
unspecified Severity medium (vote)
: ---
: ---
Assigned To: RHQ Project Maintainer
Mike Foley
Depends On:
  Show dependency treegraph
Reported: 2012-11-15 11:20 EST by John Sanda
Modified: 2012-11-15 11:20 EST (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed:
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description John Sanda 2012-11-15 11:20:24 EST
Description of problem:
During plugin installation, persisting the plugin jar file and persisting the plugin meta data are done in two, separate transactions. The jar file is persisted followed by the meta data. If an error occurs while installing the meta data that transaction is rolled back, but the newer jar file is still in the database.

A common example of how this might happen is deploying a plugin where a field in the descriptor excedes its max length. This is somewhat related to bug 857189 in that it is another case where we need support for application level rollback.

If it a completely new plugin, then we could delete the row from the rhq_plugin table and log an appropriate message. If it is an upgrade situation, then we should copy the original plugin from the database, and if an error occurs while persisting meta data, then we can re-insert the original plugin and log an appropriate message.

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1. Modify the name of a resource type in a plugin descriptor so that the length exceeds 100 characters.
2. Install the plugin.
3. You should see error messages in the server log about a database constraint violoation.
4. Query the rhq_plugin table and you will find the plugin there, but it should not be.
Actual results:

Expected results:

Additional info:

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