Bug 750895 - Unable to detach drift definition from template in UI
Unable to detach drift definition from template in UI
Product: RHQ Project
Classification: Other
Component: drift (Show other bugs)
Unspecified Unspecified
medium Severity medium (vote)
: ---
: JON 3.0.0
Assigned To: John Sanda
Mike Foley
Depends On:
Blocks: 707225 749899
  Show dependency treegraph
Reported: 2011-11-02 14:04 EDT by John Sanda
Modified: 2012-02-07 14:27 EST (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed:
Type: ---
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 2011-11-02 14:04:19 EDT
Description of problem:
If you go to edit a resource drift definition and set the 'Attached to Template' field to no, the change is not persisted in the database. Consequently, you are not able to detach a definition from the template from which it originated.

It is possible however to detach through the CLI. The problem though is not in in the UI. It just manifests itself in the UI because of the method calls made in the UI to apply the update to underlying DriftDefinition object.

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

How reproducible:

Steps to Reproduce:
1. Go to create or edit a resource drift definition
2. Set the 'Attached to Template' field to no (i.e., false)
3. Save the change
Actual results:
The definition is still attached in the database.

Expected results:
The definition should be detached.

Additional info:
The problem is in DriftDefinition.setConfiguration. This is method called to actually update the definition in the UI. When I added the attached flag, I forgot to update the setConfiguration method to update the attached property along with the other properties that are updated in this method.
Comment 1 John Sanda 2011-11-02 15:25:15 EDT
Updating DriftDefinition to update its attached field when the underlying configuration is updated.

master branch commit hash:  1eb5ab398ad4c37cee6aed9c069cb1887a1fe2b2
release_jon3.x commit hash: 8955805230d595349a578326ff570946e96a80fd
Comment 2 Mike Foley 2011-11-03 14:44:18 EDT
verified build #684
Comment 3 Mike Foley 2012-02-07 14:26:14 EST
Comment 4 Mike Foley 2012-02-07 14:27:46 EST
changing status of VERIFIED BZs for JON 2.4.2 and JON 3.0 to CLOSED/CURRENTRELEASE

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