Bug 563987 - [raw-config]Commits fails to check if the file is actually changed or not and commits even without changes.
Summary: [raw-config]Commits fails to check if the file is actually changed or not and...
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: RHQ Project
Classification: Other
Component: Configuration
Version: unspecified
Hardware: All
OS: Linux
high
medium
Target Milestone: ---
: ---
Assignee: RHQ Project Maintainer
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks: rhq_spearhead
TreeView+ depends on / blocked
 
Reported: 2010-02-11 16:52 UTC by Preethi Thomas
Modified: 2010-09-13 20:24 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2010-09-13 20:24:55 UTC
Embargoed:


Attachments (Terms of Use)

Description Preethi Thomas 2010-02-11 16:52:25 UTC
Description of problem:
Commits fails to check if the file is actually changed or not and commits even without changes.

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


How reproducible:


Steps to Reproduce:
1. Login to RHQ server with agent running
2. Select the any of the resources from the test plugin
3. Click on the configure tab
4. Click on Edit
5.do not change anything and click on commit
  
Actual results:

It saves over & over again when you click on commit even if nothing has changed (jsanda: There are two issues here. The first is navigation which has been resolved. The second is that committing from raw mode when no changes have been made still allows you to perform an update. 

It used behave correctly From structured . no update will happen if there are no changes and this is the expected behavior). 


Expected Result


Commit should check if the files are actually changed. No update will happen if there are no changes and this is the expected behavior.

Comment 1 John Sanda 2010-02-11 18:30:13 UTC
After a bit of investigation and some testing with the raw-config-test plugin, no commit happens neither for RawServer (which supports raw only) nor for StructuredServer (which supports structured only) when the configuration has not been changed. 

If you try to update StructuredAndRawServer (supports structured and raw) from the structured tab without having clicked on the raw tab, no commit happens. If you click on the raw tab though, which results in a translation operation, then try to update without modifying the configuration, a commit will happen. If however you go directly to the raw tab, bypassing translation, then you will get the expected results. You can go directly to the raw tab by submitting a GET for /rhq/resource/configuration/edit.xhtml?id=<resource_id>&tab=raw

Comment 2 wes hayutin 2010-02-16 16:57:19 UTC
Temporarily adding the keyword "SubBug" so we can be sure we have accounted for all the bugs.

keyword:
new = Tracking + FutureFeature + SubBug

Comment 3 wes hayutin 2010-02-16 17:02:25 UTC
making sure we're not missing any bugs in rhq_triage

Comment 4 John Sanda 2010-02-16 19:43:13 UTC
This may actually be a bug in the test plugin itself. The execution path for determing whether or not the config has actually changed is the same regardless of the configuration format, be it structured, raw, or both. And I am only seeing this with the Structured and Raw Server from the test plugin.

Preethi, have you observed this for other resources?

Comment 5 Corey Welton 2010-09-13 20:24:55 UTC
Closing as Wontfix


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