Bug 563987 - [raw-config]Commits fails to check if the file is actually changed or not and commits even without changes.
[raw-config]Commits fails to check if the file is actually changed or not and...
Status: CLOSED WONTFIX
Product: RHQ Project
Classification: Other
Component: Configuration (Show other bugs)
unspecified
All Linux
high Severity medium (vote)
: ---
: ---
Assigned To: RHQ Project Maintainer
: SubBug
Depends On:
Blocks: rhq_spearhead
  Show dependency treegraph
 
Reported: 2010-02-11 11:52 EST by Preethi Thomas
Modified: 2010-09-13 16:24 EDT (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2010-09-13 16:24:55 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 Preethi Thomas 2010-02-11 11:52:25 EST
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 13:30:13 EST
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 11:57:19 EST
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 12:02:25 EST
making sure we're not missing any bugs in rhq_triage
Comment 4 John Sanda 2010-02-16 14:43:13 EST
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 16:24:55 EDT
Closing as Wontfix

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